/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
:root {
    /* Colors */
    --clr-primary: #4caac9;
    --clr-primary-dark: #35819d;
    --clr-primary-light: #dceeef;

    --clr-secondary: #0a192f;
    --clr-secondary-light: #112240;

    --clr-bg-main: #ffffff;
    --clr-bg-light: #f8fafc;

    --clr-text-main: #334155;
    --clr-text-muted: #64748b;
    --clr-text-heading: #0f172a;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 40px -10px rgba(76, 170, 201, 0.15);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--clr-text-heading);
    line-height: 1.2;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

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

/* Base Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--clr-bg-light);
}

.bg-primary {
    background-color: var(--clr-primary);
}

.text-white {
    color: #ffffff !important;
}

.text-white h1,
.text-white h2,
.text-white h3,
.text-white p {
    color: #ffffff !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(76, 170, 201, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 170, 201, 0.4);
    color: white;
}

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

.btn-secondary:hover {
    background-color: var(--clr-secondary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--clr-primary-dark);
    color: var(--clr-primary-dark);
}

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

/* Utilities */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: 2rem;
}

.d-block {
    display: block;
}

.ms-2 {
    margin-left: 0.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--clr-primary) 0%, #1e4b5c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.img-fluid {
    width: 100%;
    height: auto;
}

.rounded-shadow {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    /* Increased from 80px */
    transition: height var(--transition-normal);
}

.header.scrolled .header-container {
    height: 80px;
    /* Increased from 70px */
}

.logo img {
    height: 70px;
    /* Increased from 50px */
    width: auto;
    transition: height var(--transition-normal);
}

.header.scrolled .logo img {
    height: 60px;
    /* Make logo slightly smaller on scroll */
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--clr-text-heading);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--clr-primary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: var(--clr-text-heading);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
    background-color: var(--clr-bg-light);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/team-group-mz-landscape.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 170, 201, 0.05) 0%, rgba(76, 170, 201, 0.1) 100%);
    border-radius: 50% 0 0 50%;
    z-index: 1;
    transform: translateX(20%);
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--clr-primary-light);
    color: var(--clr-primary-dark);
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    display: block;
    color: var(--clr-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    margin-bottom: 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--clr-primary-light);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    top: -20px;
    left: -20px;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-left: 4px solid var(--clr-primary);
}

.experience-badge .number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--clr-primary);
    font-family: var(--font-heading);
}

.experience-badge .text {
    font-size: 0.875rem;
    color: var(--clr-text-muted);
    font-weight: 500;
}

.feature-list {
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--clr-text-heading);
}

.feature-list i {
    color: var(--clr-primary);
    font-size: 1.25rem;
}

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

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    height: 100%;
}

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

.service-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    /* Adjusts the height proportionally based on width */
    overflow: hidden;
    background-color: var(--clr-bg-light);
    /* fallback if image doesn't fill entirely */
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keeps it filling the space, but aspect-ratio helps the crop */
    object-position: center;
    /* ensures the center of the image is what's focused */
    transition: transform var(--transition-slow);
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

.service-icon {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--clr-primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

.service-content {
    padding: 2.5rem 1.5rem 1.5rem;
}

.service-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-content p {
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-features {
    border-top: 1px solid var(--clr-bg-light);
    padding-top: 1.5rem;
}

.service-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--clr-text-main);
}

.service-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--clr-primary);
    font-weight: bold;
}

/* ==========================================================================
   Testimonial Section
   ========================================================================== */
.testimonial {
    position: relative;
    background: linear-gradient(135deg, var(--clr-secondary) 0%, #173252 100%);
}

.text-primary-light {
    color: var(--clr-primary-light);
    opacity: 0.5;
}

.testimonial-text {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.accordion-item {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.accordion-button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--clr-text-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-button i {
    transition: transform var(--transition-normal);
    color: var(--clr-primary);
}

.accordion-button[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.accordion-collapse {
    height: 0;
    overflow: hidden;
    transition: height var(--transition-normal);
}

.accordion-body {
    padding-bottom: 1.5rem;
    color: var(--clr-text-muted);
}

/* ==========================================================================
   CTA / Contact Form
   ========================================================================== */
.cta-section {
    position: relative;
    overflow: hidden;
}

/* Background aesthetic for CTA */
.cta-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50%;
    height: 120%;
    background: var(--clr-primary);
    opacity: 0.05;
    border-radius: 50% 0 0 50%;
    z-index: 0;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
}

.form-content {
    padding: 4rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.form-container {
    padding: 4rem;
    background-color: white;
}

.info-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-card i {
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.info-card h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.info-card p,
.info-card a {
    color: var(--clr-text-muted);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--clr-text-heading);
    font-size: 0.9rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: var(--clr-bg-light);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(76, 170, 201, 0.2);
    background-color: white;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-secondary);
    color: #cbd5e1;
    padding: 2rem 0;
    text-align: center;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-text {
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {

    .about-container,
    .faq-row,
    .glassmorphism {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        max-width: 300px;
    }

    .faq-header {
        text-align: center;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .navbar.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .form-content,
    .form-container {
        padding: 2rem;
    }
}

/* ==========================================================================
   Scroll Animations (IntersectionObserver classes)
   ========================================================================== */
.pre-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger logic for service cards */
.services-grid .service-card:nth-child(1).pre-animate {
    transition-delay: 0.1s;
}

.services-grid .service-card:nth-child(2).pre-animate {
    transition-delay: 0.2s;
}

.services-grid .service-card:nth-child(3).pre-animate {
    transition-delay: 0.3s;
}