:root {
    /* Brand Colors */
    --primary: #c40000;
    --primary-dark: #990000;
    --primary-gradient: linear-gradient(to bottom, #d92626, #b91c1c);
    --secondary: #0f172a;
    --accent: #fbbf24;

    /* Neutral Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --light-bg: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;

    /* Spacing & Sizing */
    --container-max: 1200px;
    --nav-height: 74px;
    --top-bar-height: 40px;
}

/* Base reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    touch-action: manipulation;
}

/* Global Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    /* Ensure container doesn't exceed parent */
}

/* Prevent horizontal scroll */
body,
html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 900;
    line-height: 1.1;
    color: var(--secondary);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
}

.section-title span {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(196, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(196, 0, 0, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Hero Sections */
.hero-section {
    padding: 160px 0;
    /* More breathing room */
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
    }
}

/* Hero Button Group */
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        gap: 12px;
        padding: 0 10px;
    }
}

/* Layout Utilities */
.section-padding {
    padding: 90px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

/* Header & Navbar */
.top-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.top-bar a {
    color: var(--white);
    font-weight: 900;
    margin-left: 5px;
    text-decoration: none;
}

header {
    background: var(--white);
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

@media(max-width: 768px) {
    .logo img {
        height: 35px;
    }
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    transition: 0.3s;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    background: var(--primary-gradient);
    color: var(--white) !important;
    padding: 8px 18px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile image optimization */
@media (max-width: 768px) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 70px 0;
    text-align: center;
}

.footer-logo {
    height: 45px;
    filter: brightness(0) invert(1);
    margin-bottom: 30px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Shared Hero Title */
.hero-title {
    font-size: 4rem;
    /* Standardized to Sell.html feel */
    line-height: 1.05;
    margin-bottom: 45px;
    /* Neater spacing */
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

.hero-subtitle {
    font-size: 1.6rem;
    /* Slightly larger */
    color: #cbd5e1;
    max-width: 850px;
    margin: 0 auto 60px;
    /* Neater spacing */
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1.15rem;
        margin-bottom: 35px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Hamburger Menu & Mobile Nav */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--secondary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 3px;
    position: relative;
}

/* Mobile Search Improvements */
input,
select,
textarea {
    font-size: 16px !important;
    /* Prevents auto-zoom on iOS */
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        /* Initial state: dark overlay */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* Center content vertically */
        padding: 0;
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        /* Fade in */
        right: 0;
        /* Reset right property if it was set before */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: none;
        /* Remove dividers for cleaner look */
        margin-bottom: 25px;
        opacity: 0;
        transform: translateY(20px);
        animation: slideUp 0.4s forwards;
    }

    /* Stagger animations for menu items */
    .nav-links.active li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        animation-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        animation-delay: 0.4s;
    }

    .nav-links.active li:nth-child(5) {
        animation-delay: 0.5s;
    }

    .nav-links a {
        font-size: 1.5rem;
        color: white;
        font-weight: 900;
        letter-spacing: 1px;
    }

    .nav-links a:hover {
        color: var(--primary);
    }

    @keyframes slideUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-cta {
        margin-top: 25px;
        text-align: center;
        background: var(--primary-gradient);
        color: var(--white) !important;
        border-radius: 8px;
        padding: 15px !important;
    }

    /* Hamburger Animation to X */
    .hamburger.active span {
        background: #ffffff !important;
        /* Forces Brilliant White */
        height: 3px;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        /* Glowing for visibility */
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Global Layout Adjustments */
    .section-padding {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    /* Hero adjustments */
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .container {
        padding: 0 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px !important;
    }

    .stat-num {
        font-size: 2.2rem !important;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.6rem;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
    }

    .top-bar {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* Benefit Tags */
.benefit-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    width: fit-content;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .benefit-tag {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Optimize scrolling performance */
    body {
        -webkit-overflow-scrolling: touch;
        will-change: scroll-position;
    }
    
    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .service-card:hover,
        .review-card:hover {
            transform: none;
        }
    }
}