/* VARIABLES & RESET */
:root {
    --primary-blue: #1181c6;
    --navy-blue: #00274c;
    --accent-gold: #b77a36;
    --light-grey: #f8f9fa;
    --text-dark: #333333;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 80px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
}

/* UTILITY CLASSES */
.bg-navy {
    background-color: var(--navy-blue);
}

.bg-primary-blue {
    background-color: var(--primary-blue);
}

.bg-light {
    background-color: var(--light-grey);
}

.bg-white {
    background-color: var(--white);
}

.text-white {
    color: var(--white);
}

.color-navy {
    color: var(--navy-blue);
}

.color-primary-blue {
    color: var(--primary-blue);
}

.py-5 {
    padding: 4rem 0;
}

.p-4 {
    padding: 2rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.ms-3 {
    margin-left: 1rem;
}

.d-inline {
    display: inline-block;
}

.text-uppercase {
    text-transform: uppercase;
}

.font-weight-bold {
    font-weight: 700;
}

.shadow-sm {
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.rounded {
    border-radius: 8px;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--navy-blue);
    font-weight: 700;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: 1px;
}

h2 {
    font-size: 2rem;
}

.lead {
    font-size: 1.2rem;
    font-weight: 400;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin: 0 auto;
}

/* HEADER & NAV */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 60px;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy-blue);
    margin-left: 25px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: color 0.3s;
}

    .nav-links a:hover, .nav-links a.active {
        color: var(--primary-blue);
    }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--navy-blue);
    cursor: pointer;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 4px;
    transition: 0.3s;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

    .btn-primary:hover {
        background-color: var(--navy-blue);
    }

/* HERO SECTION */
.hero-section {
    background: url('https://via.placeholder.com/1920x1080/00274c/ffffff?text=Airy+Investment+Maldives') center/cover no-repeat;
    position: relative;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 39, 76, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

    .hero-content h1 {
        color: var(--white);
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

/* PAGE HEADERS */
.page-header {
    margin-top: 0;
}

    .page-header h1 {
        color: var(--white);
    }

/* LAYOUTS */
.split-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

    .split-layout > div {
        flex: 1;
        min-width: 300px;
    }

.reverse-layout {
    flex-direction: row-reverse;
}

/* LISTS */
.service-list.custom-bullet {
    list-style: none;
}

    .service-list.custom-bullet li {
        position: relative;
        padding-left: 30px;
        margin-bottom: 12px;
        font-weight: 600;
    }

        .service-list.custom-bullet li::before {
            content: '\f00c';
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            position: absolute;
            left: 0;
            color: var(--primary-blue);
        }

/* GRIDS (Team & Contact) */
.team-grid, .contact-info-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* PORTFOLIO */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--navy-blue);
    padding: 8px 20px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

    .filter-btn.active, .filter-btn:hover {
        background: var(--primary-blue);
        color: var(--white);
    }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.portfolio-img {
    height: 220px;
    overflow: hidden;
}

    .portfolio-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s;
    }

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 20px;
    text-align: center;
    border-bottom: 4px solid var(--accent-gold);
}

/* =========================================
   Map Container
   ========================================= */
.map-container {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
    border: 4px solid var(--white);
    background-color: var(--light-grey);
}

    .map-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

/* Make map slightly smaller on mobile devices */
@media (max-width: 768px) {
    .map-container {
        height: 350px;
    }
}

/* FOOTER */
.main-footer {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 20px 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

        .nav-links a {
            margin: 15px 20px;
            display: block;
        }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* =========================================
   MODERN TRANSITIONS & ANIMATIONS
   ========================================= */

/* 1. Scroll Reveal Base Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

    /* Active State (Triggered by JS) */
    .reveal.active,
    .reveal-left.active,
    .reveal-right.active,
    .reveal-scale.active {
        opacity: 1;
        transform: translate(0) scale(1);
    }

/* Staggered Delays for Grid Items */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* 2. Enhanced Navigation Hover */
.nav-links a {
    position: relative;
}

    .nav-links a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -5px;
        left: 0;
        background-color: var(--primary-blue);
        transition: width 0.3s ease-in-out;
    }

    .nav-links a:hover::after, .nav-links a.active::after {
        width: 100%;
    }

/* 3. Modern Button Fill Effect */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease;
}

    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        background-color: var(--navy-blue);
        transition: width 0.4s cubic-bezier(0.5, 0, 0, 1);
        z-index: -1;
    }

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    color: var(--white);
    background-color: transparent; /* Lets the ::before background show */
}

/* 4. Smooth Card Elevations */
.service-card, .team-card, .contact-detail, .portfolio-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

    .service-card:hover, .team-card:hover, .contact-detail:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 35px rgba(0,39,76,0.15); /* Tinted shadow matching navy blue */
    }

/* Image Zoom on Hover (for split layouts) */
.image-content {
    overflow: hidden;
}

    .image-content img {
        transition: transform 0.6s ease;
    }

    .image-content:hover img {
        transform: scale(1.08);
    }

/* =========================================
   Team Photos Profile Styling
   ========================================= */
.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Makes the image a perfect circle */
    object-fit: cover; /* Ensures the image fills the circle without stretching */
    border: 4px solid var(--white);
    box-shadow: 0 5px 15px rgba(0, 39, 76, 0.2);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.team-card:hover .team-photo {
    transform: scale(1.05);
    border-color: var(--primary-blue);
}

/* =========================================
   HERO SECTION (Updated for Video)
   ========================================= */
.hero-section {
    position: relative;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    overflow: hidden; /* Ensures the video doesn't break out of the section */
    background-color: var(--navy-blue); /* Fallback while video loads */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%); /* Centers the video perfectly */
    object-fit: cover; /* Ensures it covers the area without stretching */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 39, 76, 0.7); /* Dark navy tint */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Keeps text above the video and overlay */
    color: var(--white);
}

    .hero-content h1 {
        color: var(--white);
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

/* =========================================
   LIGHTBOX GALLERY MODAL
   ========================================= */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999; /* Sits on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 15, 30, 0.95); /* Deep navy translucent background */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    text-align: center;
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
        border: 4px solid var(--white);
        border-radius: 4px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

.lightbox-counter {
    color: var(--white);
    font-family: var(--font-heading);
    margin-top: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Controls */
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    z-index: 10000;
}

    .lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
        color: var(--primary-blue);
        transform: scale(1.1);
    }

.lightbox-close {
    top: 30px;
    right: 40px;
}

.lightbox-prev {
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
        font-size: 2rem;
    }

    .lightbox-next {
        right: 10px;
        font-size: 2rem;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }
}

/* =========================================
   MOBILE OVERFLOW & HEADER FIXES
   ========================================= */

/* 1. Lock the horizontal scroll globally */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 2. Header and Menu Button specific tweaks */
@media (max-width: 768px) {
    /* Ensure the container doesn't stretch past the screen */
    .main-header .container {
        width: 100%;
        padding-left: 5%;
        padding-right: 5%;
    }

    /* Improve the touch target area and spacing */
    .mobile-menu-btn {
        display: block;
        padding: 8px 12px;
        margin-right: -5px; /* Offsets the padding so it visually aligns */
        font-size: 1.8rem;
    }

    /* Scale the logo down slightly on very narrow screens so it doesn't fight the menu */
    .logo img {
        height: auto;
        max-height: 50px;
        max-width: 200px;
    }
}