/* Premium Design System for Youyou Logistics */
:root {
    --primary: #ffffff;        /* White */
    --primary-light: #f8fafc;  /* Slate 50 */
    --accent: #1e293b;         /* Deep Slate */
    --accent-glow: rgba(30, 41, 59, 0.1);
    --gold: #475569;           /* Slate 600 */
    --text-main: #1e293b;      /* Slate 800 */
    --text-muted: #64748b;     /* Slate 500 */
    --bg-dark: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    padding-top: 80px; /* Default padding for fixed header */
}

h1, h2, h3, h4, h5, .logo {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    background: #ffffff;
    transition: var(--transition);
    border-bottom: 1px solid #eeeeee;
    display: flex;
    align-items: center;
}

header.scrolled {
    height: 70px;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid #f0f0f0;
}

header .container {
    height: 100%;
    gap: 60px;
}

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

/* Futuristic Logo */
.logo {
    font-size: 26px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #334155);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Nav Hover Effects */
.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

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

/* Consultation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.modal-content {
    background: white;
    width: 95%;
    max-width: 500px;
    padding: 40px;
    border-radius: 24px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-form input, .modal-form textarea {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--primary-light);
    font-size: 15px;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.modal-form input:focus, .modal-form textarea:focus {
    border-color: var(--text-main);
    background: white;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(30, 41, 59, 0.3);
    background: #0f172a;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--text-main);
}

/* Sections */
section {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(to right, #1e293b, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--text-muted);
    margin: 0 auto;
    border-radius: 2px;
}

/* Footer Modernization Classes */
.main-footer {
    background: #f8fafc;
    border-top: 1px solid var(--glass-border);
    padding-top: 80px;
}

.footer-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 80px;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    margin-left: 20px;
    position: relative;
    z-index: 2000; /* Higher than nav */
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* Contact Section Layout */
.contact-card-layout {
    background: var(--primary-light);
    padding: 60px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.contact-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.contact-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.cta-box {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 15px;
}

.cta-label {
    color: var(--text-main);
    margin-bottom: 10px;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-input {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 10px;
    color: var(--text-main);
    width: 100%;
}

.w-full {
    width: 100%;
}

/* Service Card Improvements */
.custom-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.service-link {
    margin-top: auto;
    padding-top: 20px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    opacity: 0.6;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.service-card:hover .service-link {
    opacity: 1;
}

.gold-link {
    color: var(--gold);
}

.route-icon {
    background: rgba(71, 85, 105, 0.1) !important;
    color: var(--gold) !important;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .nav-links {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Space for fixed header */
    }

    header {
        height: 70px;
        padding: 0;
        z-index: 2001; /* Must be higher than menu-overlay (1001) */
    }
    
    header.scrolled {
        height: 60px;
    }

    .logo {
        font-size: 18px; /* Smaller logo text on mobile */
    }

    .logo img {
        max-height: 35px !important;
    }

    .mobile-toggle {
        display: block;
        font-size: 26px;
        color: var(--text-main);
        cursor: pointer;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #ffffff !important; /* Force solid background */
        padding: 100px 40px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        z-index: 2002;
        visibility: hidden;
    }

    nav.active {
        right: 0 !important;
        visibility: visible !important;
    }

    .nav-links {
        flex-direction: column;
        gap: 30px;
    }

    .nav-links a {
        font-size: 20px;
        color: var(--text-main); /* Brighter text for better contrast */
        display: block;
        width: 100%;
    }

    .header-actions .btn {
        display: none; /* Hide button on mobile to save space */
    }

    .section-title h2 {
        font-size: 32px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .section-title h2 {
        font-size: 32px;
    }

    /* Dense Service Grid on Mobile */
    .service-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .service-card {
        padding: 30px 15px !important;
        border-radius: 16px !important;
    }

    .service-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    .service-card h3 {
        font-size: 16px !important;
    }

    .service-card p {
        font-size: 13px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* News Card Mobile optimization */
    .news-card {
        flex-direction: column !important;
        min-height: auto !important;
    }

    .news-cover {
        flex: 0 0 180px !important;
    }

    .news-content {
        padding: 20px !important;
    }

    .news-content h3 {
        font-size: 17px !important;
    }

    .footer-grid-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .container {
        padding: 0 20px;
    }

    /* Contact Section Mobile */
    .contact-card-layout {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .hero-slider {
        height: 60vh;
    }
}
