/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d71b36;
    --primary-dark: #b0152a;
    --accent-color: #f39902;
    --accent-dark: #d17a01;
    --brand-red: #d71b36;
    --brand-yellow: #f39902;
    --brand-black: #000000;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --error-color: #dc2626;
    --text-primary: #000000;
    --text-secondary: #4b5563;
    --bg-light: #fef3f3;
    --bg-white: #ffffff;
    --border-color: #fecaca;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(215, 27, 54, 0.1), 0 4px 6px -2px rgba(215, 27, 54, 0.05);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: 0.25s ease;
    --glow-primary: 0 0 0 3px rgba(215, 27, 54, 0.15);
}

html {
    scroll-behavior: smooth;
}

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-light);
    font-feature-settings: "kern" 1, "liga" 1;
}

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

/* Header & Navigation */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
    background: rgba(215, 27, 54, 0.08);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay & side menu */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-overlay.is-open {
    pointer-events: auto;
    opacity: 1;
}

.nav-side {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.25rem 0;
}

.nav-side.is-open {
    transform: translateX(0);
}

.nav-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.nav-side-logo {
    font-size: 1.25rem;
}

.nav-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    transition: background var(--transition), color var(--transition);
}

.nav-close:hover {
    background: rgba(215, 27, 54, 0.08);
    color: var(--primary-color);
}

.nav-close:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-close-icon {
    font-weight: 300;
}

.nav-side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-side-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-side-link {
    display: block;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.nav-side-link:hover,
.nav-side-link.active {
    background: rgba(215, 27, 54, 0.06);
    color: var(--primary-color);
}

.nav-side-link-login {
    margin: 0.75rem 1.25rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-yellow));
    color: white !important;
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.nav-side-link-login:hover {
    opacity: 0.95;
    color: white !important;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    text-decoration: none;
    transition: opacity var(--transition), transform var(--transition);
}

.nav-brand a:hover {
    opacity: 0.9;
}

.nav-brand a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.brand-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.vhmexpress-text-logo {
    font-weight: 800;
    background: linear-gradient(90deg, #d71b36, #f39902);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.vhmexpress-text-logo.brand-logo {
    font-size: 1.6rem;
    line-height: 50px;
}

.vhmexpress-text-logo.footer-logo {
    font-size: 1.6rem;
    line-height: 50px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 2px 2px 0px var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

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

.nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.nav-link-login {
    padding: 0.5rem 1rem;
    background-color: var(--brand-red);
    color: white !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background-color var(--transition), box-shadow var(--transition);
}

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

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

.nav-link-login:focus-visible {
    box-shadow: var(--glow-primary);
    outline: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-yellow) 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* --- Index page: hero background animations (theme colors only) --- */
.page-home .hero.hero-animated {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-yellow) 50%, var(--brand-red) 100%);
    background-size: 200% 200%;
    animation: heroGradientShift 12s ease-in-out infinite;
}

@keyframes heroGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: heroShapeFloat 20s ease-in-out infinite;
}

.hero-shape-1 { width: 280px; height: 280px; top: -80px; left: -60px; animation-delay: 0s; animation-duration: 18s; }
.hero-shape-2 { width: 180px; height: 180px; top: 40%; right: -40px; animation-delay: -4s; animation-duration: 22s; background: rgba(255, 255, 255, 0.05); }
.hero-shape-3 { width: 120px; height: 120px; bottom: 10%; left: 15%; animation-delay: -8s; animation-duration: 16s; }
.hero-shape-4 { width: 220px; height: 220px; top: 20%; right: 20%; animation-delay: -2s; animation-duration: 24s; background: rgba(255, 255, 255, 0.04); }
.hero-shape-5 { width: 90px; height: 90px; bottom: -30px; right: 25%; animation-delay: -6s; animation-duration: 19s; }
.hero-shape-6 { width: 160px; height: 160px; top: 60%; left: -50px; animation-delay: -10s; animation-duration: 21s; background: rgba(255, 255, 255, 0.05); }

@keyframes heroShapeFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    25% { transform: translate(15px, -20px) scale(1.05); opacity: 1; }
    50% { transform: translate(-10px, 15px) scale(0.98); opacity: 0.9; }
    75% { transform: translate(20px, 10px) scale(1.02); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
    .page-home .hero.hero-animated,
    .hero-shape,
    .cta-bg-dots {
        animation: none;
    }
    .hero-content-animate .hero-title,
    .hero-content-animate .hero-subtitle,
    .hero-content-animate .hero-buttons,
    .section-title-animate,
    .feature-card-stagger {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Hero content entrance */
.hero-content-animate .hero-title {
    animation: heroFadeUp 0.8s ease-out both;
}

.hero-content-animate .hero-subtitle {
    animation: heroFadeUp 0.8s ease-out 0.15s both;
}

.hero-content-animate .hero-buttons {
    animation: heroFadeUp 0.8s ease-out 0.3s both;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--glow-primary);
}

.btn-primary {
    background-color: var(--brand-red);
    color: white;
}

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

.btn-secondary {
    background-color: var(--brand-yellow);
    color: var(--text-primary);
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Features Section (Our Services) */
.features {
    padding: 4rem 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 1) 0%, rgba(243, 153, 2, 0.06) 35%, rgba(255, 255, 255, 1) 70%, rgba(215, 27, 54, 0.04) 100%);
    background-color: var(--bg-white);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(243, 153, 2, 0.04) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(215, 27, 54, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.features .container {
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.feature-card {
    position: relative;
    text-align: center;
    padding: 0;
    border-radius: 1rem;
    background: linear-gradient(145deg, var(--bg-white) 0%, rgba(254, 243, 243, 0.4) 100%);
    border: 1px solid rgba(215, 27, 54, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

/* Soft corner highlight — no border, just a gentle gradient blob */
.feature-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 153, 2, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(215, 27, 54, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(215, 27, 54, 0.15), 0 8px 20px -8px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(215, 27, 54, 0.08);
    border-color: rgba(215, 27, 54, 0.12);
}

.feature-card:hover::before {
    background: radial-gradient(circle, rgba(243, 153, 2, 0.12) 0%, transparent 70%);
}

.feature-card:hover::after {
    background: radial-gradient(circle, rgba(215, 27, 54, 0.1) 0%, transparent 70%);
}

/* Card inner spacing */
.feature-card .feature-icon {
    margin-top: 1.75rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.feature-card p {
    padding: 0 1.5rem 1.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.feature-icon {
    font-size: 2.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(254, 243, 243, 0.6) 100%);
    border: 1px solid rgba(215, 27, 54, 0.12);
    box-shadow: 0 2px 8px rgba(215, 27, 54, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.feature-card:hover .feature-icon {
    transform: scale(1.08);
    box-shadow: 0 8px 20px -4px rgba(215, 27, 54, 0.15), 0 2px 8px rgba(243, 153, 2, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(215, 27, 54, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(254, 243, 243, 0.8) 100%);
}

/* Index: section title and feature cards stagger */
.section-title-animate {
    animation: sectionFadeIn 0.6s ease-out both;
}

.features-animated .feature-card-stagger {
    opacity: 0;
    animation: cardFadeIn 0.5s ease-out both;
    animation-delay: calc(0.1s + var(--stagger, 0) * 0.08s);
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Section */
.cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-yellow) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    pointer-events: none;
}

.cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
}

/* Index: CTA subtle background motion */
.page-home .cta.cta-animated {
    position: relative;
}

.cta-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    animation: ctaDotsMove 25s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes ctaDotsMove {
    0% { background-position: 0 0; }
    100% { background-position: 28px 28px; }
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* About Section */
.about {
    padding: 4rem 0;
    background: linear-gradient(145deg, rgba(254, 243, 243, 1) 0%, rgba(255, 250, 240, 1) 40%, rgba(254, 243, 243, 1) 70%, rgba(243, 153, 2, 0.05) 100%);
    background-color: var(--bg-light);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse 80% 50% at 70% 20%, rgba(215, 27, 54, 0.05) 0%, transparent 55%),
                      radial-gradient(ellipse 60% 40% at 20% 80%, rgba(243, 153, 2, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: #000000;
    color: white;
    padding: 3rem 0 1.5rem;
    border-top: 3px solid var(--accent-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(243, 153, 2, 0.5), transparent);
    opacity: 0.8;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-section ul li a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-overlay {
        display: block;
    }

    .nav-side {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .brand-logo {
        height: 40px;
    }

    .footer-logo {
        height: 40px;
    }
}

@media (min-width: 769px) {
    .nav-side,
    .nav-overlay {
        display: none !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
