/* AC Technician Website Delhi - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Inter:wght@300;600&display=swap');

:root {
    --primary: #023E8A; /* Deep Blue */
    --secondary: #0096C7; /* Cool Blue */
    --accent: #FB8500; /* Safety Orange */
    --light: #CAF0F8; /* Arctic Blue */
    --dark: #03045E;
    --white: #FFFFFF;
    --text: #212529;
    --gray: #6C757D;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

/* Header */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 800;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
}

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

nav ul li a {
    font-weight: 600;
    color: var(--text);
}

nav ul li a:hover {
    color: var(--secondary);
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(251, 133, 0, 0.3);
}

.btn-primary:hover {
    background-color: #e57a00;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(251, 133, 0, 0.4);
}

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

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-lang {
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Sections */
section {
    padding: 100px 5%;
}

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

/* Hero Section */
.hero {
    min-height: 80vh;
    padding: 40px 5%;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem); /* Fluid Typography */
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.25; /* Increased to prevent font cutoff */
}

.hero-content h1 span {
    color: var(--secondary);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    max-height: 60vh; /* Prevent image from pushing height on short viewports */
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

/* Service Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
}

.card i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

/* Reviews */
.review-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--accent);
}

.stars {
    color: #FFD700;
    margin-bottom: 0.5rem;
}

/* Contact */
.contact-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 5%;
    text-align: center;
}

/* Loading Spinner */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* =========================================
   PREMIUM GALLERY OVERHAUL 
   ========================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 4rem;
    padding: 3rem 0;
}

.gallery-item {
    background: var(--white);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(2, 62, 138, 0.06);
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(2, 62, 138, 0.03);
    height: 450px;
}

.gallery-item:hover {
    transform: translateY(-25px);
    box-shadow: 0 35px 70px rgba(2, 62, 138, 0.18);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-item:hover img {
    transform: scale(1.12);
}

/* Glassmorphism Caption Overlays */
.gallery-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 1.8rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    color: var(--dark);
    font-weight: 800;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Premium Badges */
.type-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(2, 62, 138, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.new-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    background: var(--accent);
    color: white;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 950;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(251, 133, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 12, 0.98);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px);
}

.lightbox-content {
    max-width: 95%;
    max-height: 85%;
    border-radius: 32px;
    box-shadow: 0 0 80px rgba(0,0,0,0.6);
    animation: luxuriousEntrance 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    border: 2px solid rgba(255,255,255,0.1);
}

@keyframes luxuriousEntrance {
    from { transform: scale(0.9) translateY(40px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-lightbox {
    position: absolute;
    top: 40px;
    right: 40px;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0.7;
}

.close-lightbox:hover {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--accent);
}

/* Service Category Headers */
.service-category {
    margin: 4rem 0 2rem;
    border-left: 8px solid var(--secondary);
    padding-left: 1.5rem;
    color: var(--dark);
}

.service-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card-compact {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.card-compact:hover {
    transform: translateX(10px);
    background: var(--light);
}

.card-compact i {
    font-size: 1.5rem;
    color: var(--secondary);
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2001; /* Higher than nav */
}

.menu-toggle span {
    width: 30px;
    height: 3.5px;
    background: var(--primary);
    border-radius: 10px;
    transition: var(--transition);
}

/* Active State for Hamburger (Morphs into X) */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* --- RESPONSIVE BREAKPOINTS --- */

/* TABLET VIEW (768px to 1024px) */
@media (max-width: 1024px) {
    .grid, .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .logo {
        font-size: 1.1rem;
    }
}

/* MOBILE NAV & SMALLER DEVICES (Up to 768px) */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 5%;
        justify-content: space-between;
        gap: 10px;
    }

    .logo {
        font-size: 1.15rem;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-toggle {
        display: flex; /* Show hamburger icon */
        order: 3;
        margin-left: 0.5rem;
    }

    .header-actions {
        order: 2;
        gap: 0.5rem;
    }

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

    .btn-lang {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off-screen by default */
        width: 80%;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
    }

    nav.active {
        right: 0; /* Slide in from the right */
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    nav ul li a {
        font-size: 1.5rem;
        font-weight: 700;
    }

    section {
        padding: 60px 4%;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding: 40px 5% 50px;
        margin-top: 20px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-image {
        margin-top: 30px;
        width: 100%;
        max-width: 450px;
    }

    .hero-image img {
        height: 280px;
        object-fit: cover;
        object-position: center top; /* Crops out bottom phone camera watermark */
        border-radius: 20px;
    }

    .grid, .gallery, .service-grid-compact {
        grid-template-columns: 1fr; /* Single column on phones */
    }

    .gallery-item {
        height: 300px;
    }

    /* Mobile Touch-Friendly Captions */
    .gallery-caption {
        transform: translateY(0) !important;
        opacity: 1 !important;
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.95);
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .contact-actions {
        flex-direction: column;
        width: 100%;
    }
    
    footer h3 {
        font-size: 1.2rem;
    }

    .mobile-lang-li {
        display: block;
        width: 100%;
        margin-top: 1.5rem;
        list-style: none;
    }

    .mobile-lang-li .btn-lang {
        width: 100%;
        padding: 0.8rem;
        font-size: 1.1rem;
    }
}

/* VERY SMALL SCREENS (Up to 480px) */
@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }
    header {
        padding: 0.6rem 4%;
    }
    .btn-lang {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* Base styles for mobile lang toggle list-item on desktop */
.mobile-lang-li {
    display: none;
}

/* Accessibility color contrast improvements for admin links */
footer a, .container a[href="admin.html"] {
    color: var(--light) !important;
    opacity: 0.85 !important;
    font-weight: bold;
    text-decoration: underline !important;
}

.container a[href="admin.html"]:hover {
    color: var(--accent) !important;
}
