/* 
   Haven Engineers - Ultimate Premium Styles
   Theme: Charcoal & Gold Luxury
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Premium Palette */
    --color-primary: #0F172A;
    /* Darker Slate */
    --color-primary-light: #1E293B;
    /* Card BG */
    --color-accent: #D4AF37;
    /* Metallic Gold */
    --color-accent-dark: #B08D26;
    --color-accent-light: #F3E5AB;
    /* Champagne */
    --color-text-main: #E2E8F0;
    --color-text-muted: #94A3B8;
    --color-bg: #0B1120;
    /* Deepest Navy/Black */
    --color-bg-alt: #162033;
    --color-white: #FFFFFF;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #F3E5AB 50%, #B08D26 100%);
    --gradient-dark: linear-gradient(to bottom, #0F172A, #0B1120);

    /* Dimensions */
    --header-height: 80px;
    --top-bar-height: 40px;
    --border-radius: 4px;

    /* Effects */
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    --glass: rgba(15, 23, 42, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --backdrop: blur(16px);

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-alt: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body.light-mode {
    --color-bg: #F8FAFC;
    --color-bg-alt: #FFFFFF;
    --color-primary: #FFFFFF;
    --color-primary-light: #F1F5F9;
    --color-text-main: #1E293B;
    --color-text-muted: #64748B;
    --color-text-main: #333;
    --glass: rgba(255, 255, 255, 0.95);
    --gradient-dark: linear-gradient(to bottom, #FFFFFF, #F1F5F9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    line-height: 1.2;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4 {
    color: #0F172A;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-gold {
    color: var(--color-accent);
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.bg-alt {
    background-color: var(--color-bg-alt);
}

.d-flex {
    display: flex;
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

/* Top Bar */
.top-bar {
    height: var(--top-bar-height);
    background: var(--color-black, #000);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    z-index: 1001;
    position: relative;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.top-info span {
    margin-right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.top-info i {
    color: var(--color-accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 30px;
    border-radius: 4px;
    font-family: var(--font-alt);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #0F172A;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent);
    color: #0F172A;
}

/* Header */
header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

header.scrolled {
    background: var(--glass);
    backdrop-filter: var(--backdrop);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-main);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--color-accent);
    transition: 0.3s;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Hero */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* BG Image Fallback is managed by video wrapper or removed */
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    /* Slightly darker video for better text contrast */
    filter: brightness(0.8);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(8px);
    border-left: 5px solid var(--color-accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* Enhance Text Readability */
}

.hero h5 {
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-alt);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* About */
.about-section-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
}

.about-img-wrapper img {
    border-radius: var(--border-radius);
    position: relative;
    z-index: 2;
}

.about-img-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 60%;
    background: var(--color-accent);
    z-index: 1;
    border-radius: var(--border-radius);
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Services */
.services-section {
    background: var(--color-bg-alt);
}

.services-grid-dense {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card-dense {
    background: var(--color-primary-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    /* Uniform Height */
    justify-content: space-between;
}

.service-card-dense:hover {
    background: var(--color-white);
    transform: translateY(-5px);
}

.service-card-dense:hover h3,
.service-card-dense:hover p {
    color: #0F172A;
}

.service-card-dense:hover .icon-box {
    background: var(--color-accent);
    color: #fff;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.service-card-dense h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-alt);
    transition: 0.3s;
}

.service-card-dense p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: 0.3s;
}

/* Stats Bar */
.stats-bar {
    background: #000;
    padding: 4rem 0;
    color: #fff;
    margin-top: 4rem;
}

.stats-grid-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

.stat-num {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Contact Form Overlap */
.contact-overlay-section {
    position: relative;
    padding-top: 4rem;
    padding-bottom: 8rem;
    background: linear-gradient(rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1429497419816-9ca5cfb454bd?auto=format&fit=crop&q=80') center/cover fixed;
}

.footer-contact-card {
    background: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    position: absolute;
    right: 1.5rem;
    bottom: -50px;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

body.light-mode .footer-contact-card {
    background: #fff;
    border: 1px solid #eee;
}

body.dark-mode .footer-contact-card {
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact-card h3 {
    color: #0F172A;
    margin-bottom: 1.5rem;
}

body.dark-mode .footer-contact-card h3 {
    color: #fff;
}

.form-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    background: transparent;
}

body.dark-mode .form-input {
    border-color: #444;
    color: #fff;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Footer */
footer {
    background: #0F172A;
    padding-top: 6rem;
    padding-bottom: 2rem;
    border-top: 5px solid var(--color-accent);
}

.footer-content {
    color: #94A3B8;
    font-size: 0.9rem;
}

/* --- ADVANCED FEATURES --- */

/* Preloader */
/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0B1120;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

/* New Year Sequence */
.new-year-seq {
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: 0.5s ease;
    display: none;
}

.new-year-seq.active {
    opacity: 1;
    transform: scale(1);
    display: block;
}

.ny-year {
    font-size: 5rem;
    font-weight: 700;
    background: linear-gradient(to right, #D4AF37, #F3E5AB, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.ny-text {
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* Fireworks Effect (Simple CSS) */
.firework {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: 0 0 #fff;
    animation: firework 1s infinite;
}

@keyframes firework {
    0% {
        transform: translate(-50%, -50%);
        box-shadow: 0 0 #fff;
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%);
        box-shadow:
            -60px -60px 0px #F3E5AB, 60px -60px 0px #D4AF37,
            -60px 60px 0px #D4AF37, 60px 60px 0px #F3E5AB,
            -30px -90px 0px #fff, 30px -90px 0px #fff,
            -90px 0px 0px #D4AF37, 90px 0px 0px #F3E5AB;
        opacity: 0;
    }
}


@keyframes fadeOutSafety {
    to {
        visibility: hidden;
        pointer-events: none;
    }
}

.loader-content {
    text-align: center;
}

.loader-logo {
    height: 60px;
    margin-bottom: 2rem;
    animation: pulseLogo 2s infinite;
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0));
    }
}

.loader-bar-bg {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.loader-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--color-accent);
    animation: linkProgress 2s ease-in-out forwards;
}

@keyframes linkProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Logo Slider */
.client-section {
    padding: 3rem 0;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.slide-track {
    display: flex;
    width: calc(150px * 14);
    animation: scroll 30s linear infinite;
    gap: 3rem;
}

.slide {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: 0.3s;
    filter: grayscale(100%);
}

.slide:hover {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.slide i {
    font-size: 3rem;
    color: var(--color-text-main);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-150px * 7 - 21rem));
    }
}

/* Responsive */
@media (max-width: 992px) {
    .about-section-layout {
        grid-template-columns: 1fr;
    }

    .footer-contact-card {
        position: relative;
        bottom: 0;
        right: 0;
        max-width: 100%;
        margin-top: 2rem;
    }

    footer {
        padding-top: 3rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-bg);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 2px solid var(--color-accent);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}

/* Advanced Footer */
footer {
    background: #0B1120;
    padding-top: 5rem;
    padding-bottom: 2rem;
    border-top: 5px solid var(--color-accent);
    color: #94A3B8;
}

.footer-advanced-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-widget h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-accent);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #94A3B8;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--color-accent);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 992px) {
    .footer-advanced-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-advanced-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Page Header for Inner Pages */
.page-header {
    height: 50vh;
    background: linear-gradient(rgba(11, 17, 32, 0.7), rgba(11, 17, 32, 0.9)), url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&q=80') center/cover fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-bottom: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.breadcrumb {
    color: var(--color-accent);
    font-family: var(--font-alt);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.content-block {
    margin-bottom: 4rem;
}

.content-block h2 {
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.content-block p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.vision-card {
    background: var(--color-primary-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    text-align: center;
    transition: 0.3s;
}

.vision-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
}

.vision-card i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.contact-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-panel {
    background: var(--color-primary-light);
    padding: 3rem;
    border-radius: var(--border-radius);
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-top: 5px;
}

/* Advanced Footer */
footer {
    background: #0B1120;
    padding-top: 5rem;
    padding-bottom: 2rem;
    border-top: 5px solid var(--color-accent);
    color: #94A3B8;
}

.footer-advanced-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-widget h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-accent);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #94A3B8;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--color-accent);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 992px) {
    .footer-advanced-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-advanced-grid {
        grid-template-columns: 1fr;
    }


    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Projects Page Enhancements --- */

/* Featured Project */
.featured-project {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.fp-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 500px;
}

.fp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.fp-image:hover img {
    transform: scale(1.05);
}

.fp-content h4 {
    color: var(--color-accent);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.fp-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.spec-item h5 {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.spec-item p {
    color: #fff;
    font-weight: 600;
}


/* --- New Projects Gallery Redesign --- */

.gallery-section {
    padding: 0 0 4rem 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.filter-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding-bottom: 5px;
    transition: 0.3s;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.filter-tab.active,
.filter-tab:hover {
    color: var(--color-accent);
}

.filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    /* Align with border-bottom of container */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: #fff;
    font-size: 1.4rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.2rem;
    transform: translateY(20px);
    transition: 0.3s;
}

.gallery-overlay p {
    color: var(--color-accent);
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: 0.3s 0.1s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.gallery-item:hover .gallery-overlay h3,
.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
}

/* Dynamic Spans for Masonry Effect */
.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
    height: 624px;
    /* 300*2 + 24 gap */
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.wide {
        grid-column: span 2;
    }

    .gallery-item.tall {
        height: 624px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
        height: 300px;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
}

/* Social Posts Slider */
.posts-slider {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) #1e293b;
}

.posts-slider::-webkit-scrollbar {
    height: 8px;
}

.posts-slider::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

.posts-slider::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

.post-card {
    min-width: 300px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    cursor: pointer;
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* or contain if they are flyers with text */
    object-fit: contain;
    background: #000;
    transition: transform 0.5s;
}

.post-card:hover img {
    transform: scale(1.05);
}


.lightbox.active {
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--color-accent);
}

@media (max-width: 992px) {
    .featured-project {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .fp-image {
        height: 350px;
    }
}

/* Hero Enhancements */
.hero-slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: #0B1120;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.5s ease-in-out, transform 6s ease;
    z-index: -1;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 0;
}

.hero-overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;

    /* Fix Footer Social Icons Visibility */
    .footer-widget .fab,
    .footer-widget .fas,
    .footer-widget .fa {
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: var(--color-accent) !important;
        background-clip: border-box !important;
        -webkit-background-clip: border-box !important;
    }

    .hero-overlay-gradient {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, rgba(11, 17, 32, 0.95) 0%, rgba(11, 17, 32, 0.8) 30%, rgba(11, 17, 32, 0.3) 100%);
        z-index: 2;
    }

    .hero-badge {
        display: inline-block;
        padding: 8px 16px;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid var(--color-accent);
        color: var(--color-accent);
        font-family: var(--font-alt);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 2px;
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
        border-radius: 4px;
        backdrop-filter: blur(4px);
    }

    .civil-hero {
        background: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 900px;
    }

    .hero-actions {
        display: flex;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    /* Tech Decoration */
    .hero-tech-deco {
        position: absolute;
        right: 5%;
        bottom: 20%;
        width: 200px;
        height: 200px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        z-index: 4;
        animation: spin 20s linear infinite;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-tech-deco::before {
        content: '';
        position: absolute;
        width: 80%;
        height: 80%;
        border: 1px dashed var(--color-accent);
        border-radius: 50%;
        opacity: 0.5;
    }

    .tech-line {
        width: 150%;
        height: 1px;
        background: var(--color-accent);
        opacity: 0.3;
    }

    @media (max-width: 768px) {
        .hero-tech-deco {
            display: none;
        }

        .hero-actions {
            flex-direction: column;
            gap: 1rem;
            width: 100%;
        }

        .btn {
            width: 100%;
            justify-content: center;
        }
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    /* Hero Button Shine & Text Animations */
    .btn-primary {
        position: relative;
        overflow: hidden;
    }

    .btn-primary::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: 0.5s;
    }

    .btn-primary:hover::after {
        left: 100%;
        transition: 0.7s;
    }

    .hero h1 {
        animation: fadeInUp 1s ease-out forwards;
        opacity: 0;
    }

    .hero-content p {
        animation: fadeInUp 1s ease-out 0.5s forwards;
        opacity: 0;
    }

    .hero-actions {
        animation: fadeInUp 1s ease-out 1s forwards;
        opacity: 0;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Cursor Interaction with Grid */
    .hero:hover .hero-overlay-grid {
        background-size: 52px 52px;
        transition: background-size 5s ease;
    }

    /* --- Comprehensive Mobile Responsiveness --- */

    @media (max-width: 992px) {
        .container {
            padding: 0 1.5rem;
        }

        /* Mobile Menu */
        .hamburger {
            display: flex;
        }

        .nav-links {
            position: fixed;
            top: 80px;
            left: 0;
            width: 100%;
            height: 100vh;
            background: #0B1120;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding-top: 4rem;
            transform: translateX(100%);
            transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .nav-links.active {
            transform: translateX(0);
        }

        .nav-links li {
            margin: 1.5rem 0;
            opacity: 0;
            transform: translateY(20px);
            transition: 0.4s;
        }

        .nav-links.active li {
            opacity: 1;
            transform: translateY(0);
            transition-delay: 0.2s;
        }

        .hero h1 {
            font-size: 3rem;
        }

        .about-section-layout {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        .about-img-wrapper {
            padding-left: 0;
        }
    }

    @media (max-width: 768px) {
        .stats-grid-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }

        .footer-advanced-grid {
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
        }
    }

    @media (max-width: 576px) {

        /* Global Types */
        h1 {
            font-size: 2.2rem;
        }

        h2 {
            font-size: 1.8rem;
        }

        .hero h1 {
            font-size: 2.4rem;
        }

        /* Components */
        .ny-year {
            font-size: 3.5rem;
        }

        .stats-grid-row {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        .footer-advanced-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        /* Gallery & Posts */
        .gallery-grid {
            grid-template-columns: 1fr;
        }

        .gallery-item,
        .gallery-item.wide,
        .gallery-item.tall {
            grid-column: span 1;
            grid-row: span 1;
            height: 250px;
        }

        .post-card {
            min-width: 260px;
            height: 260px;
        }

        /* Top Bar */
        .top-bar-content {
            flex-direction: column;
            gap: 5px;
            align-items: center;
        }

        .top-info span {
            margin: 0 5px;
            font-size: 0.75rem;
        }
    }