/*
================================================
TABLE OF CONTENTS
================================================
1.  :root Variables & General Styles
2.  Typography & Utility Classes
3.  Header & Navigation
4.  Hero Section
5.  Services Section
6.  How We Work Section
7.  Results / Stats Section
8.  Testimonials Section
9.  Final CTA Section
10. Footer
11. Sub-Page Styles (Contact, Legal)
12. Live Chat Widget
13. Animations & Keyframes
14. Responsive Media Queries
================================================
*/

/* 1. :root Variables & General Styles */
:root {
    --color-primary: #1B2A49;
    /* Navy Blue */
    --color-secondary: #00AEEF;
    /* Sky Blue */
    --color-background: #FFFFFF;
    --color-background-alt: #F8F9FA;
    --color-text: #495057;
    --color-headings: #212529;
    --color-border: #DEE2E6;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;

    --header-height: 80px;
    --border-radius: 8px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
    --section-padding: 100px 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-primary);
}

ul {
    list-style: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2. Typography & Utility Classes */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-headings);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 4rem);
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

.highlight {
    color: var(--color-secondary);
}

.subtitle {
    display: block;
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section-title p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--color-secondary);
    color: #FFF;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: 50px;
    border: 2px solid var(--color-secondary);
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
}

.cta-button:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cta-button.large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* 3. Header & Navigation */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow var(--transition-speed) ease, padding var(--transition-speed) ease;
    padding: 15px 0;
    border-bottom: 1px solid transparent;
}

#main-header.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    color: var(--color-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-link {
    color: var(--color-primary);
    font-weight: 500;
    font-family: var(--font-heading);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-secondary);
}

#hamburger-btn {
    display: none;
    background: none;
    border: none;
    z-index: 1001;
}

#hamburger-btn .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-primary);
    transition: all 0.3s ease-in-out;
}

/* 4. Hero Section */
#hero {
    padding: calc(var(--header-height) + 60px) 0 60px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-subheading {
    display: inline-block;
    margin-bottom: 1rem;
    background-color: #e6f7ff;
    color: var(--color-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

#hero h1 {
    margin-bottom: 1.5rem;
}

#hero p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2.5rem;
}

.trusted-by {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.trusted-by .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.trusted-by span {
    color: #6c757d;
    font-weight: 500;
    font-family: var(--font-heading);
}

.trusted-by .logos {
    display: flex;
    gap: 40px;
    align-items: center;
    filter: grayscale(100%);
    opacity: 0.6;
}

/* 5. Services Section */
#services {
    background-color: var(--color-background-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    transition: all var(--transition-speed) ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background-color: var(--color-secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

.service-card h3 {
    margin-bottom: 1rem;
}

/* 6. How We Work Section */
.results-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.process-step {
    padding: 2rem;
    border-left: 3px solid var(--color-secondary);
}

.process-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.process-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* 7. Results / Stats Section */
#results {
    background-color: var(--color-primary);
    color: #fff;
}

#results h2,
#results p {
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.stat-item .stat-number {
    font-size: 4rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin: 0;
}

/* 8. Testimonials Section */
#testimonials {
    background-color: var(--color-background-alt);
}

.testimonial-slider-wrapper {
    max-width: 800px;
    margin: 3rem auto 0;
    position: relative;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    text-align: center;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.quote {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-headings);
    margin-bottom: 2rem;
}

.author h4 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-primary);
}

.author span {
    color: var(--color-text);
}

.slider-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.slider-controls button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-primary);
    font-size: 1.5rem;
    transition: all var(--transition-speed) ease;
}

.slider-controls button:hover {
    background: var(--color-primary);
    color: #fff;
}

/* 9. Final CTA Section */
#final-cta {
    background-color: var(--color-background-alt);
}

#final-cta h2 {
    font-size: 2.8rem;
}

#final-cta p {
    max-width: 600px;
    margin: 1rem auto 2rem;
}

/* 10. Footer */
#main-footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 60px 0 0;
}

#main-footer .logo-text {
    color: #fff;
}

#main-footer .logo-svg path {
    stroke: #fff;
}

#main-footer .logo-svg circle {
    stroke: var(--color-secondary);
}

#main-footer p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

/* 11. Sub-Page Styles */
.page-header {
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 80px;
    background-color: var(--color-background-alt);
}

#contact-page .contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--color-headings);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}

.contact-info-wrapper h3 {
    margin-bottom: 2rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.legal-content {
    padding-top: 60px;
    padding-bottom: 100px;
}

.legal-content .container {
    max-width: 800px;
}

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
}

/* 12. Live Chat Widget */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#chat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
    cursor: pointer;
}

#chat-icon:hover {
    transform: scale(1.1);
}

#chat-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

#chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: all 0.4s ease;
}

#chat-box.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chat-header {
    background-color: var(--color-primary);
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 1rem;
    height: 180px;
}

.chat-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--color-border);
}

.chat-footer input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--color-text);
    outline: none;
    padding: 0.5rem 0;
}

/* 13. Animations & Keyframes */
.animate-on-load {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn-up 0.8s ease forwards;
}

.hero-content .animate-on-load:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-content .animate-on-load:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-content .animate-on-load:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-content .animate-on-load:nth-child(4) {
    animation-delay: 0.8s;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.services-grid .animate-on-scroll:nth-child(1) {
    transition-delay: 0.1s;
}

.services-grid .animate-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}

.services-grid .animate-on-scroll:nth-child(3) {
    transition-delay: 0.3s;
}

.services-grid .animate-on-scroll:nth-child(4) {
    transition-delay: 0.4s;
}

@keyframes fadeIn-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 14. Responsive Media Queries */
@media (max-width: 992px) {
    #main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        box-shadow: -10px 0 20px rgba(0, 0, 0, 0.1);
    }

    #main-nav.is-active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .header-cta {
        display: none;
    }

    #hamburger-btn {
        display: block;
    }

    .stats-grid,
    #contact-page .contact-grid {
        grid-template-columns: 1fr;
    }

    .stat-item:not(:last-child) {
        margin-bottom: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .trusted-by .logos {
        flex-wrap: wrap;
        justify-content: center;
    }
}