/* Variables */
:root {
    --primary-color: #2c3e50; /* Dark Blue-Gray */
    --secondary-color: #34495e; /* Slightly darker */
    --accent-color: #e74c3c; /* A professional accent - muted red/terracotta */
    --text-color-dark: #333;
    --text-color-light: #ecf0f1;
    --bg-light: #f8f9fa; /* Light gray background */
    --bg-dark: #202b38; /* Dark background for footer */
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 96px;
    --border-radius: 8px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: #fff;
    overflow-x: hidden; /* Prevent horizontal scroll from reveal animations */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden; /* For reveal animations */
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3em;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 100%);
    margin: 0 auto;
    margin-top: var(--spacing-xs);
    border-radius: 2px;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    font-size: 1.15em;
    color: #555;
}

/* Header */
.header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px var(--shadow-light);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.nav-list {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    font-weight: 500;
    color: var(--primary-color);
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
    padding: 0;
    background: transparent;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh; /* viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-light);
    text-align: center;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.7); /* Darken image */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(52, 73, 94, 0.8)); /* Subtle gradient overlay */
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 900px;
    padding: 0 var(--spacing-md);
    transform: translateY(20px);
    opacity: 1;
    animation: fadeInSlideUp 1s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-delay: 0.5s;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5em;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    text-shadow: 2px 2px 8px var(--shadow-medium);
}

.hero-subtitle {
    font-size: 1.5em;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 5px var(--shadow-light);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-xl);
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    padding: var(--spacing-sm); /* Border effect */
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-medium);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.about-image-wrapper:hover {
    transform: scale(1);
}

.about-image {
    border-radius: calc(var(--border-radius) - var(--spacing-sm) / 2);
    filter: grayscale(0.2);
    transition: filter 0.3s ease;
}

.about-image:hover {
    filter: grayscale(0);
}

.about-content h2 {
    text-align: left;
    margin-bottom: var(--spacing-md);
}
.about-content h2::after {
    margin: 0;
    margin-top: var(--spacing-xs);
}

.about-content p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1em;
    line-height: 1.8;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Exactly 3 cards per row for desktop */
    gap: var(--spacing-md);
}

.service-card {
    background-color: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content if differing heights */
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px var(--shadow-medium);
    border-color: var(--accent-color);
}

.icon-wrapper {
    margin-bottom: var(--spacing-sm);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-icon {
    width: 35px;
    height: 35px;
    color: var(--text-color-light);
}

.service-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.6em;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.service-card .card-description {
    font-size: 1em;
    color: #666;
}

/* Process Section */
.process {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color-light);
}

.process .section-title,
.process .section-description {
    color: var(--text-color-light);
}

.process .section-title::after {
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--text-color-light) 100%);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.step {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white */
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); /* Glassmorphism effect */
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
}

.step-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.5em;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color-light);
}

.step-description {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
}

/* Insights Section */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Exactly 3 cards per row for desktop */
    gap: var(--spacing-md);
}

.insight-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.insight-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px var(--shadow-medium);
    border-color: var(--accent-color);
}

.insight-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.insight-card:hover .insight-image {
    transform: scale(1.05);
}

.insight-content {
    padding: var(--spacing-md);
}

.insight-content .card-title {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.insight-content .card-description {
    font-size: 0.95em;
    color: #666;
    margin-bottom: var(--spacing-sm);
}

.insight-date {
    font-size: 0.85em;
    color: #999;
    display: block;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Exactly 3 cards per row for desktop */
    gap: var(--spacing-md);
}

.testimonial-card {
    background-color: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px var(--shadow-light);
    border-left: 5px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-style: italic;
    color: #555;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px var(--shadow-medium);
}

.testimonial-card blockquote {
    font-size: 1.15em;
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.testimonial-card cite {
    display: block;
    text-align: right;
    font-style: normal;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95em;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--text-color-light);
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

.cta-banner .cta-title {
    font-family: var(--font-heading);
    font-size: 3em;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color-light);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.cta-banner .cta-description {
    font-size: 1.3em;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}


/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color-light);
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
    display: inline-block;
}

.footer-logo:hover {
    color: var(--accent-color);
}

.footer-tagline {
    font-size: 1.1em;
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.8);
}

.footer-copyright {
    font-size: 0.9em;
    margin-top: var(--spacing-md);
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Keyframe for initial hero animation */
@keyframes fadeInSlideUp {
    from {
        opacity: 1;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5em;
    }
    .section-title {
        font-size: 2.5em;
    }
    .cta-banner .cta-title {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }

    .nav {
        order: 3; /* Move nav below logo and toggle */
        flex-basis: 100%;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-in-out, opacity 0.3s ease;
        opacity: 1;
        transform: translateY(-10px);
        margin-top: var(--spacing-sm);
        visibility: hidden;
    }

    body.nav-open .nav {
        height: auto;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
        padding: var(--spacing-md) 0;
        background-color: var(--card-bg);
        border-top: 1px solid var(--border-color);
    }

    .nav-link {
        font-size: 1.1em;
        padding: 10px 0;
    }
    
    .nav-link::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 50%; /* Shorter line for mobile */
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1002; /* Ensure it's above the opened nav */
    }

    body.nav-open .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    body.nav-open .menu-toggle span:nth-child(2) {
        opacity: 1;
    }

    body.nav-open .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        height: 70vh;
    }
    .hero-title {
        font-size: 2.8em;
    }
    .hero-subtitle {
        font-size: 1.2em;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }
    .section-title {
        font-size: 2em;
    }
    .section-description {
        font-size: 1em;
        margin-bottom: var(--spacing-md);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    .about-content h2 {
        text-align: center;
    }
    .about-content h2::after {
        margin: 0 auto;
        margin-top: var(--spacing-xs);
    }


    .services-grid,
    .insights-grid,
    .testimonials-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .cta-banner .cta-title {
        font-size: 2em;
    }
    .cta-banner .cta-description {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2em;
    }
    .hero-subtitle {
        font-size: 1em;
    }
    .section-title {
        font-size: 1.8em;
    }
    .cta-banner .cta-title {
        font-size: 1.8em;
    }
}


/* Animation states when visible - FIXED: Only opacity: 1 */
.animate-fade-in-up.visible,
.animate-fade-in-left.visible,
.animate-fade-in-right.visible,
.animate-bounce-y.visible,
.section-scroll-animate.visible,
.text-animate-up.visible,
.reveal-item.visible,
.scroll-reveal.visible,
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in-up.visible.fade-in,
.section-scroll-animate.visible.fade-in {
    opacity: 1;
}

.animate-fade-in-up.visible.slide-up,
.section-scroll-animate.visible.slide-up {
    transform: translateY(0);
}
/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
