/* Global Styles */
:root {
    --primary-color: #137fec;
    --primary-button: #0d5bbd;
    --primary-hover: #094a9d;
    --primary-text: #0960be;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-gray: #E5E7EB;
    --border-color: #DEE2E6;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --warning-color: #FFC107;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --container-max-width: 1200px;
    --container-padding: 20px;
    --header-height-desktop: 72px;
    --header-height-mobile: 60px;
    --logo-height-desktop: 48px;
    --logo-height-mobile: 34px;
    --surface-muted: #E5E7EB;
    --surface-muted-hover: #D1D5DB;
    --mobile-menu-radius: 16px;
    --mobile-menu-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
    --hero-height: 500px;
    --hero-height-mobile: 400px;
    --hero-overlay-opacity: 0.3;
    --section-padding: 80px 0;
    --section-padding-mobile: 50px 0;
}

[data-theme="dark"] {
    --primary-color: #137fec;
    --primary-button: #1a8fff;
    --primary-hover: #3d9bfd;
    --primary-text: #4da3ff;
    --text-primary: #E9ECEF;
    --text-secondary: #ADB5BD;
    --bg-primary: #212529;
    --bg-secondary: #343A40;
    --bg-gray: #4B5563;
    --border-color: #495057;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --surface-muted: #4B5563;
    --surface-muted-hover: #6B7280;
    --mobile-menu-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    padding-top: var(--header-height-desktop);
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height-desktop);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: var(--logo-height-desktop);
    width: auto;
    object-fit: contain;
    max-width: 350px;
}

/* Logo theme switching */
.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav {
    display: flex;
    gap: 30px;
    flex: 1;
    margin-left: 50px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.nav-link.active::after {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-sell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-button);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    height: 44px;
}

.btn-sell:hover {
    background-color: var(--primary-hover);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--surface-muted);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    height: 44px;
    width: 44px;
}

.btn-icon:hover {
    background-color: var(--surface-muted-hover);
}

.menu-toggle {
    display: none;
    position: relative;
    overflow: hidden;
}

.mobile-menu {
    overflow-x: hidden;
}

.menu-toggle svg {
    opacity: 0;
}

.menu-toggle::before,
.menu-toggle::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform: translateX(-50%);
    transform-origin: center;
    transition: transform 0.25s ease, box-shadow 0.2s ease, top 0.25s ease, opacity 0.2s ease;
}

.menu-toggle::before {
    top: 14px;
    box-shadow: 0 8px 0 currentColor;
}

.menu-toggle::after {
    top: 30px;
}

.menu-toggle.is-open::before {
    transform: translate(-50%, 8px) rotate(45deg);
    box-shadow: 0 0 0 currentColor;
}

.menu-toggle.is-open::after {
    top: 22px;
    transform: translateX(-50%) rotate(-45deg);
}
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
    z-index: 900;
}

.mobile-menu-inner {
    width: min(460px, calc(100% - 24px));
    margin: 10px auto 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--mobile-menu-radius);
    box-shadow: var(--mobile-menu-shadow);
    transform: translateY(-12px);
    opacity: 0;
    transition: var(--transition);
    overflow: hidden;
    max-height: 70vh;
}

.mobile-menu.is-open {
    pointer-events: auto;
    visibility: visible;
}

.mobile-menu.is-open .mobile-menu-inner {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 14px 8px;
}

.mobile-nav .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: transparent;
    font-weight: 600;
}

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

.mobile-nav .nav-link.active::after {
    display: none;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--border-color);
}

.btn-sell--full {
    flex: 1;
    justify-content: center;
}

.mobile-actions .theme-toggle {
    width: 44px;
    height: 44px;
}

body.menu-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        height: var(--header-height-mobile);
    }

    body {
        padding-top: var(--header-height-mobile);
    }

    .header--has-mobile .nav,
    .header--has-mobile .header-actions .btn-sell,
    .header--has-mobile .header-actions .theme-toggle {
        display: none;
    }

    .header--has-mobile .menu-toggle {
        display: flex;
    }

    .header--has-mobile .mobile-menu {
        display: flex;
    }

    .logo-img {
        height: var(--logo-height-mobile);
        max-width: 240px;
    }
}


/* Hero Section */
.hero {
    position: relative;
    height: var(--hero-height);
    background: linear-gradient(135deg, rgba(19, 127, 236, 0.8) 0%, rgba(13, 111, 212, 0.8) 100%), 
                url('../images/heroimage.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, var(--hero-overlay-opacity));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 10px 12px 10px 14px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-width: 700px;
    margin: 0 auto;
}

.search-icon {
    color: var(--text-secondary);
    margin-left: 4px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 4px;
    font-size: 16px;
    color: var(--text-primary);
    background: transparent;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-button);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-text);
    border: 2px solid var(--primary-color);
    padding: 12px 32px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--primary-button);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Section */
.section {
    padding: var(--section-padding);
}

.section-gray {
    background-color: var(--bg-secondary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-help {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-help:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-text);
}

.section-footer {
    text-align: center;
    margin-top: 50px;
}

/* Footer */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 15px;
}

.footer-logo .logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    max-width: 350px;
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-gray);
    color: var(--text-primary);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-button);
    color: white;
    transform: translateY(-2px);
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-text);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        height: var(--hero-height-mobile);
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
        padding: 12px 12px 14px;
    }

    .search-icon {
        display: none;
    }

    .search-box input {
        width: 100%;
        text-align: left;
    }

    .btn-primary {
        width: 100%;
    }

    .section {
        padding: var(--section-padding-mobile);
    }

    .section-title {
        font-size: 22px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        align-items: center;
        text-align: center;
    }

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

    .footer-logo {
        justify-content: center;
    }

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

    .footer-social {
        justify-content: center;
    }

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

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

    .footer-contact li {
        justify-content: center;
    }

    /* Split quick links into two columns on mobile */
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 16px;
        justify-items: center;
    }

    .footer-links li {
        margin-bottom: 0;
    }
}

