/* ===========================================
   Global Layout & Header (Responsive)
   =========================================== */

/* Global CSS Variables */
:root {
  /* Primary - Orange theme */
  --primary: #F5841F;
  --primary-dark: #D9740A;
  --primary-light: #FFB366;
  --primary-soft: #F7E8E1;

  /* Backgrounds */
  --background: #FFFFFF;
  --background-alt: #EDE0D9;
  --surface: #F8F6F6;

  /* Text */
  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-light: #999999;

  /* Borders */
  --border: #E0E0E0;
  --divider: #EEEEEE;

  /* Status */
  --error: #DC3545;
  --success: #28A745;
  --warning: #FFC107;
}

/* Global Reset/Base - matches original auth.css reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.global-header {
    background: white;
    height: 64px;
    border-bottom: 1px solid #E5E7EB;
    /* --border */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Header Left: Logo & Nav */
.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Header Center: Public nav links */
.header-center {
    display: flex;
    align-items: center;
    gap: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .header-center {
        display: none;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #F97316;
    /* --primary */
    font-weight: 800;
    font-size: 20px;
}

.header-logo:hover {
    color: #EA580C;
    /* --primary-dark roughly */
}

.header-nav {
    display: flex;
    gap: 24px;
}

/* Hide Nav on Mobile initially */
@media (max-width: 768px) {
    .header-nav {
        display: none;
        /* Simplification for v1 */
    }
}

.nav-item {
    text-decoration: none;
    color: #6B7280;
    /* --text-secondary */
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-item:hover {
    color: #F97316;
    /* --primary */
    background: #FFF7ED;
    /* --primary-soft */
}

.nav-item.active {
    color: #F97316;
    background: #FFF7ED;
    font-weight: 600;
}

/* Header Button (e.g. Sign Up) */
.header-btn {
    text-decoration: none;
    background-color: #F97316;
    /* --primary */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    height: fit-content;
}

.header-btn:hover {
    background-color: #EA580C;
    /* --primary-dark */
}

/* Header Right: User Menu */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 20px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu-btn:hover {
    background: #F3F4F6;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #FFEDD5;
    /* --primary-soft */
    border: 1px solid #E5E7EB;
}

.user-avatar-placeholder-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FFEDD5;
    color: #F97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #E5E7EB;
}

.user-name-small {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    /* --text */
    display: none;
}

@media (min-width: 640px) {
    .user-name-small {
        display: block;
    }
}

/* Dropdown Menu */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 200px;
    padding: 4px;
    display: none;
    /* Hidden by default */
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    border-radius: 8px;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-item:hover {
    background: #F3F4F6;
    color: #F97316;
}

.dropdown-item .mdi {
    font-size: 18px;
    color: #9CA3AF;
}

.dropdown-item:hover .mdi {
    color: #F97316;
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 4px 0;
}

/* Main Content Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .main-container {
        padding: 16px;
    }

    .header-container {
        padding: 0 16px;
    }
}

/* Flash Messages */
.flash-message {
    padding: 12px 24px;
    margin: 16px auto;
    max-width: 1200px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

.flash-notice,
.flash-success {
    background-color: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.flash-alert,
.flash-error {
    background-color: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

/* ===========================================
   Footer
   =========================================== */
.home-footer {
    background: #1A1A1A;
    color: white;
    padding: 48px 24px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: #F97316;
}

.footer-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-links-container {
    display: flex;
    gap: 64px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #F97316;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

@media (max-width: 640px) {
    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .footer-links-container {
        flex-direction: column;
        gap: 32px;
        align-items: center;
    }

    .footer-links {
        align-items: center;
    }
}