/* Gayadeed SD-JWT Demo - Shared Styles */
/* Version: 2.0.0 (Redesign) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #003366;
    --primary-dark: #00234D;
    --primary-light: #0073CE;
    --accent: #4F9EE8;
    --text-primary: #1A1A1A;
    --text-secondary: #5A6C7D;
    --text-tertiary: #8B95A1;
    --bg-white: #FFFFFF;
    --bg-gray: #F8F9FB;
    --border-light: #E5E8EB;
    --success: #10B981;
    --success-bg: #D1FAE5;
    --success-border: #6EE7B7;
    --error: #EF4444;
    --error-bg: #FEE2E2;
    --error-border: #FCA5A5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #00234D 0%, #003366 50%, #0073CE 100%);
    --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 158, 232, 0.3), transparent),
                      linear-gradient(180deg, #00234D 0%, #003366 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    color: var(--text-primary);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link, .logout-btn, .login-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.nav-link {
    color: var(--text-secondary);
}

.nav-link:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

.nav-link.primary, .logout-btn {
    background: var(--primary);
    color: white;
    border: none;
}

.nav-link.primary:hover, .logout-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-link {
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
}

.login-link:hover {
    background: var(--primary);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Container */
.container {
    flex: 1;
    padding: 60px 32px;
}

.content {
    max-width: 1280px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.02);
}

.hero-badge .badge-dot {
    width: 6px;
    height: 6px;
    background: #4ADE80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 18px;
    opacity: 0.92;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Cards */
.card, .path-card, .feature-card {
    position: relative;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card::before, .path-card::before, .feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover::before, .path-card:hover::before, .feature-card:hover::before {
    transform: scaleX(1);
}

.card:hover, .path-card:hover, .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 51, 102, 0.12);
}

.card-icon, .path-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 28px;
}

.path-icon {
    width: auto;
    height: auto;
    background: none;
    font-size: 64px;
}

.card h2, .card h3, .path-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card p, .path-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
}

.path-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.path-features li {
    color: var(--text-secondary);
    padding: 8px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.path-features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
    margin-right: 12px;
    font-size: 18px;
}

.badge, .path-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.badge.simple, .path-badge.educational {
    background: #E0F2FE;
    color: #0369A1;
}

.badge.featured, .path-badge.featured {
    background: #FEF3C7;
    color: #92400E;
}

.badge.technical {
    background: #E0E7FF;
    color: #4338CA;
}

.path-badge.new {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Buttons */
.btn, .cta-button, .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn.primary, .cta-button.primary, .submit-btn {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn.primary:hover, .cta-button.primary:hover, .submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn.secondary, .cta-button.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

.btn.secondary:hover, .cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.36);
}

.submit-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

/* Forms */
.form-container, .registration-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.form-container h2, .registration-container h2 {
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 700;
}

.form-container p, .registration-container p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

/* Override for disclosure checkboxes in sandbox - must use flex layout */
.form-group label.disclosure-checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.form-group input:not([type="checkbox"]), .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.form-group input[type="checkbox"] {
    width: auto;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Messages */
.message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.message.success {
    background: var(--success-bg);
    color: #065F46;
    border: 1px solid var(--success-border);
}

.message.error {
    background: var(--error-bg);
    color: #991B1B;
    border: 1px solid var(--error-border);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 32px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer p {
    font-size: 14px;
    opacity: 0.92;
    line-height: 1.6;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.footer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    object-position: center;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .form-container, .registration-container {
        padding: 32px 24px;
    }

    .header-content {
        padding: 16px 20px;
    }

    .container {
        padding: 40px 20px;
    }
}

/* Loading animation */
.loading {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
