/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --primary-color: #1c5bbc;
    --primary-dark: #14428a;
    --primary-light: #4a82da;
    --accent-color: #ffffff;

    /* Backgrounds */
    --bg-dark: #0f1014;
    --bg-card: #1a1c23;
    --bg-glass: rgba(26, 28, 35, 0.7);

    /* Text */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;

    /* Typography */
    --font-heading: 'Orbitron', sans-serif;
    /* Modern, tech/auto feel */
    --font-body: 'Outfit', sans-serif;

    /* Spacing */
    --header-height: 100px;
    /* Increased for larger logo */

    /* Effects */
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(28, 91, 188, 0.4);
    --transition-fast: 0.3s ease;
}

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

html,
body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Prevent horizontal scroll globally */
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    /* text-transform: uppercase; Removed for sentence case */
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 80px 0;
    overflow: hidden;
    /* Prevent horizontal overflow */
}

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

/* =========================================
   2. UTILITIES
   ========================================= */
.text-primary {
    color: var(--primary-color);
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: block;
    /* changed from inline-block to block for margin auto */
    margin-left: auto;
    margin-right: auto;
    /* removed left/transform hack which caused overflow */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    box-shadow: var(--glow-primary);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--glow-primary);
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(28, 91, 188, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
}

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

/* =========================================
   3. HEADER
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    /* Prevent overflow */
    box-sizing: border-box;
    height: var(--header-height);
    background: rgba(15, 16, 20, 0.95);
    /* Better visibility */
    backdrop-filter: blur(10px);
    z-index: 9999 !important;
    /* Single strong z-index */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 10px;
    /* Ensure content doesn't touch edges */
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.nav__logo {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 5px 0;
}

.nav__logo img {
    max-height: 90px;
    /* Increased to make logo larger */
    width: auto;
    object-fit: contain;
}

.nav__menu {
    display: flex;
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    text-transform: uppercase;
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-color);
}

.nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    /* Use a nice dark car background instead of a logo */
    background: url('reed car.jpg') no-repeat center center/cover;
}

/* Overlay to darken background image */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 16, 20, 0.95) 0%, rgba(15, 16, 20, 0.7) 40%, rgba(15, 16, 20, 0.4) 100%);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero__subtitle {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    /* Added contrast */
}

.hero__text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* =========================================
   5. SERVICES AREA
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-fast);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   6. ABOUT SECTION
   ========================================= */
.about {
    background: #0b0c10;
}

.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__img {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.about__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(28, 91, 188, 0.2);
    opacity: 0;
    transition: var(--transition-fast);
}

.about__img:hover::after {
    opacity: 1;
}

.about__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* =========================================
   7. RECENT ADDITIONS (Gallery/Showcase)
   ========================================= */
.showcase-slider .item {
    margin: 0 10px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
}

.item-desc {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    transform: translateY(100px);
    transition: 0.5s ease;
}

.showcase-slider .item:hover .item-desc {
    transform: translateY(0);
}

/* =========================================
   8. CONTACT FORM
   ========================================= */
.contact-section {
    position: relative;
}

.contact-container {
    display: flex;
    justify-content: center;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 800px;
    /* Constrain width since it's now smaller */
    margin: 0 auto;
}

.contact-info {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Enforce 2 columns for symmetry */
    gap: 2rem;
    text-align: left;
    /* Ensure text aligns nicely */
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    /* Let grid handle gap */
}

/* Removed form styles */
.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(28, 91, 188, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* =========================================
   9. FOOTER
   ========================================= */
.footer {
    background: #07080a;
    padding: 40px 0 20px;
    /* Reduced top padding */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    /* Smaller base font */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Smaller minmax for tighter packing */
    gap: 2rem;
    /* Reduced gap */
    margin-bottom: 2rem;
    align-items: start;
}

/* Ensure footer about section stacks correctly */
.footer-about {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer h3 {
    margin-bottom: 1rem;
    /* Tighter headings */
    font-size: 1.1rem;
    /* Smaller headings */
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a,
.footer p {
    display: block;
    margin-bottom: 0.6rem;
    /* Tighter links */
    color: var(--text-muted);
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
    /* Smaller copyright */
}

/* =========================================
   10. MEDIA QUERIES
   ========================================= */
/* =========================================
   10. MEDIA QUERIES
   ========================================= */

/* TABLET & SMALL DESKTOP (max-width: 991px) */
@media (max-width: 991px) {

    /* Typography Adjustments (merged from 900px) */
    .section-title {
        font-size: 2rem;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    /* Mobile Navigation Logic */
    .nav__menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        /* Compact width */
        height: 100vh;
        background: rgba(26, 28, 35, 0.98);
        /* Less transparent for readability */
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 6rem;
        /* Less top padding */
        align-items: center;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        /* Sharper ease */
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.7);
        /* Deep shadow */
        overflow-y: auto;
        z-index: 20000;
        transform: translateX(100%);
        display: flex;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        /* Subtle definition */
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav__menu.show-menu {
        transform: translateX(0) !important;
        /* Slide in */
    }

    .nav__link {
        color: #fff !important;
        /* Force white text */
        font-size: 1.2rem;
    }

    .nav__toggle,
    .nav__close {
        display: block;
    }

    .nav__toggle {
        margin-left: auto;
        cursor: pointer;
        z-index: 10001;
        /* Ensure above header/menu */
        position: relative;
    }

    /* Layout adjustments */
    .about__container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        padding: 2rem;
        /* Keep padding adjustment */
    }

    /* Footer - Enforce 2 columns on tablet with compact gap */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        /* Reduced from 2rem */
        font-size: 0.85rem;
        /* Slightly smaller text on tablet */
    }
}

/* MOBILE (max-width: 767px) */
@media (max-width: 767px) {

    /* Services - Single column */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Buttons - Stacked and sizable */
    .hero__content .btn {
        display: inline-block;
        width: auto;
        min-width: 200px;
        margin: 0.5rem;
    }

    /* Navigation - Handled by 991px query (280px drawer) */
    /* .nav__menu width override removed */


    .nav {
        justify-content: space-between;
        width: 100%;
    }

    .nav__logo img {
        max-width: 120px;
    }

    /* Typography - Responsive scaling */
    .section-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        display: block;
        margin-left: auto;
        margin-right: auto;
        padding: 0 5px;
    }

    .hero__title {
        font-size: 1.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Spacing adjustments */
    .container {
        padding: 0 15px;
    }

    /* Contact - Single column on mobile */
    .contact-info {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    /* Footer - Compact Single Column */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .footer {
        padding: 30px 0 15px;
        /* Even smaller padding on mobile */
    }

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

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