/* ==========================================================================
   Cogito Coach - Unified Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. Base Reset & Typography
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
}

/* ==========================================================================
   2. CSS Variables (Brand Colors)
   ========================================================================== */

:root {
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-dark: #1a202c;
    --text-body: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 20px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 40px rgba(102, 126, 234, 0.15);
    --shadow-primary: 0 4px 15px rgba(102, 126, 234, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

/* ==========================================================================
   3. Navigation
   ========================================================================== */

nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-body);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-start);
    text-decoration: none;
}

.nav-cta {
    background: var(--primary-gradient);
    color: white !important;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: var(--shadow-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   4. Logo
   ========================================================================== */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo:hover {
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-primary);
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-slogan {
    font-size: 0.85rem;
    color: var(--primary-start);
    font-weight: 600;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-start);
    border: 2px solid var(--primary-start);
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary-start);
    color: white;
}

/* ==========================================================================
   6. Container & Layout
   ========================================================================== */

.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   7. Cards
   ========================================================================== */

.card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 48px;
}

.card-sm {
    padding: 32px;
}

/* ==========================================================================
   8. Section Headers
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 1.8rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ==========================================================================
   9. Typography Helpers
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
}

p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 12px;
}

ul {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 20px;
}

li {
    margin-bottom: 6px;
}

a {
    color: var(--primary-start);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   10. Highlight Box
   ========================================================================== */

.highlight-box {
    background: linear-gradient(135deg, #f0e6ff 0%, #e6f0ff 100%);
    border-left: 4px solid var(--primary-start);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 16px 0;
}

.highlight-box p {
    margin-bottom: 0;
}

/* ==========================================================================
   11. Forms
   ========================================================================== */

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.footer {
    background: #1a202c;
    padding: 40px 20px;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo span:first-child {
    font-size: 1.5rem;
}

.footer-logo span:last-child {
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    margin-left: 8px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 15px;
}

.footer-links a:hover {
    color: white;
}

.footer-legal {
    margin-bottom: 20px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 12px;
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: var(--text-light);
}

.footer-copyright {
    color: var(--text-body);
    font-size: 0.85rem;
}

/* Compact Footer (used on most pages) */
.footer-compact {
    background: #1a202c;
    padding: 24px 20px;
}

.footer-compact-inner {
    max-width: 900px;
    margin: 0 auto;
}

.footer-compact-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 16px;
}

.footer-compact-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: 700;
}

.footer-compact-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.footer-compact-divider {
    color: #4a5568;
}

.footer-compact-link {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-compact-link:hover {
    color: white;
    text-decoration: none;
}

.footer-compact-legal-link {
    color: #718096;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-compact-legal-link:hover {
    color: #a0aec0;
    text-decoration: none;
}

.footer-compact-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-compact-badge {
    text-decoration: none;
    background: #1a365d;
    color: #90cdf4;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.footer-compact-badge:hover {
    background: #2a4365;
    text-decoration: none;
}

.footer-compact-copyright {
    color: #4a5568;
    font-size: 0.8rem;
}

.footer-social-link {
    color: #4a5568;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    margin: 0 4px;
}

.footer-social-link:hover {
    color: #667eea;
}

.footer-social-link svg {
    vertical-align: middle;
}

/* ==========================================================================
   13. Modal
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
}

/* ==========================================================================
   14. Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

/* ==========================================================================
   15. Mobile Menu
   ========================================================================== */

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
    z-index: 1001;
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    nav {
        padding: 12px 0;
    }

    .nav-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .logo {
        flex: 1;
    }

    .logo-slogan {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 8px 20px 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        gap: 0;
        z-index: 1000;
        border-radius: 0 0 12px 12px;
        order: 3;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 14px 0;
        border-bottom: 1px solid var(--border-color);
        display: block;
        width: 100%;
        font-size: 1rem;
        font-weight: 500;
        text-align: left;
        color: var(--text-dark);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links .nav-cta {
        margin-top: 16px;
        text-align: center;
        border-bottom: none;
        padding: 14px 24px;
        font-size: 1rem;
        border-radius: 30px;
    }

    .card {
        padding: 28px 20px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .btn-primary {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-name {
        font-size: 1.3rem;
    }
}
