/*
================================================
TABLE OF CONTENTS
================================================
1.  Root Variables & Global Styles
2.  Utility Classes
3.  Preloader
4.  Header & Navigation
5.  Hero Section
6.  Services Section
7.  About / Why Choose Us Section (Counters)
8.  Process Section
9.  Testimonials Section (Slider)
10. CTA Section
11. Footer
12. Back to Top Button
13. Contact Page & Form
14. Legal Pages (Disclaimer, Privacy, Terms)
15. Animation Keyframes & Scroll Animations
16. Media Queries (Responsiveness)
    - 1200px (Large Desktops)
    - 992px (Tablets)
    - 768px (Small Tablets / Large Mobiles)
    - 576px (Mobiles)
================================================
*/

/* 1. Root Variables & Global Styles
------------------------------------------------ */
:root {
    --primary-color: #0062FF;
    /* A vibrant blue */
    --primary-color-hover: #0053D9;
    --secondary-color: #F4F7FC;
    /* A very light grey for section backgrounds */
    --dark-color: #1A202C;
    /* For headings */
    --text-color: #4A5568;
    /* For body text */
    --light-gray-color: #E2E8F0;
    --white-color: #FFFFFF;
    --font-primary: 'Inter', sans-serif;
    --header-height: 80px;
    --border-radius: 8px;
    --transition-speed: 0.3s ease;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    background-color: var(--white-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: clamp(36px, 5vw, 56px);
}

h2 {
    font-size: clamp(32px, 4vw, 42px);
}

h3 {
    font-size: 22px;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 2. Utility Classes
------------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.subtitle {
    display: block;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-header {
    margin-bottom: 60px;
}

.section-header p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
}

.btn-secondary {
    background-color: var(--white-color);
    color: var(--primary-color);
    border-color: var(--light-gray-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

/* 3. Preloader
------------------------------------------------ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease 0.3s, visibility 0.5s ease 0.3s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo img {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.preloader-bar {
    width: 200px;
    height: 4px;
    background-color: var(--light-gray-color);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-progress {
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    animation: preload-progress 1.2s ease-in-out forwards;
}

.preloader p {
    font-size: 14px;
    margin-top: 15px;
    color: var(--text-color);
}

/* 4. Header & Navigation
------------------------------------------------ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: top 0.3s ease-in-out, box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--box-shadow);
}

.header.hidden {
    top: -100px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--dark-color);
    font-size: 24px;
    font-weight: 700;
}

.nav-logo img {
    width: 40px;
    height: auto;
    margin-right: 12px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-item {
    margin: 0 18px;
}

.nav-link {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
    cursor: pointer;
    margin-left: 20px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* 5. Hero Section
------------------------------------------------ */
.hero-section {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-content h1 {
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    max-width: 550px;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.highlight {
    color: var(--primary-color);
}

#typing-effect {
    position: relative;
}

#typing-effect::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink-caret 0.75s step-end infinite;
}

.hero-image img {
    animation: float-up-down 4s infinite ease-in-out;
}

.animate-on-load {
    opacity: 0;
    transform: translateY(20px);
}

.animate-on-load.loaded {
    animation: fadeInUp 0.6s ease-out forwards;
}

.hero-content .subtitle {
    animation-delay: 0.1s;
}

.hero-content h1 {
    animation-delay: 0.2s;
}

.hero-content p {
    animation-delay: 0.3s;
}

.hero-buttons {
    animation-delay: 0.4s;
}

.hero-image {
    animation-delay: 0.5s;
}

/* 6. Services Section
------------------------------------------------ */
.services-section {
    background-color: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white-color);
    padding: 35px;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray-color);
    text-align: center;
    transition: all var(--transition-speed);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    background-color: #e6f0ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: var(--primary-color);
    transition: all var(--transition-speed);
}

.service-card:hover .service-icon {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: rotate(360deg);
}

.service-card h3 {
    margin-bottom: 15px;
}

.learn-more {
    font-weight: 600;
    margin-top: 20px;
    display: inline-block;
}

.learn-more i {
    margin-left: 5px;
    transition: transform var(--transition-speed);
}

.learn-more:hover i {
    transform: translateX(5px);
}

/* 7. About / Why Choose Us Section (Counters)
------------------------------------------------ */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
}

.stats-counter {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    text-align: center;
}

.stat-item h3 {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-color);
    display: inline-block;
}

.stat-item span {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-item p {
    margin: 0;
    font-weight: 500;
}

/* 8. Process Section
------------------------------------------------ */
.process-section {
    background-color: var(--secondary-color);
}

.process-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

.process-wrapper::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 12.5%;
    width: 75%;
    height: 2px;
    background-image: linear-gradient(to right, var(--light-gray-color) 50%, transparent 50%);
    background-size: 16px 2px;
    background-repeat: repeat-x;
    z-index: 0;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.process-icon-wrapper {
    position: relative;
}

.process-icon {
    width: 80px;
    height: 80px;
    background-color: var(--white-color);
    border: 2px solid var(--light-gray-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: var(--primary-color);
    transition: all var(--transition-speed);
}

.step-number {
    position: absolute;
    top: -10px;
    right: 0px;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
}

.process-step:hover .process-icon {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

/* 9. Testimonials Section (Slider)
------------------------------------------------ */
.testimonial-slider-wrapper {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    padding: 0 15px;
}

.testimonial-card {
    background-color: var(--secondary-color);
    padding: 50px;
    border-radius: var(--border-radius);
    position: relative;
    text-align: center;
}

.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 40px;
    color: var(--primary-color);
    opacity: 0.1;
    position: absolute;
    top: 25px;
    left: 30px;
}

.testimonial-card p {
    font-size: 20px;
    font-style: italic;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.author-info h4 {
    font-size: 18px;
    margin-bottom: 0;
}

.author-info span {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0;
    left: 0;
}

.slider-controls button {
    background-color: var(--white-color);
    border: 1px solid var(--light-gray-color);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

.slider-controls button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.slider-controls .prev-btn {
    transform: translateX(-50%);
}

.slider-controls .next-btn {
    transform: translateX(50%);
}


/* 10. CTA Section
------------------------------------------------ */
.cta-section {
    padding: 80px 0;
    background-color: var(--dark-color);
}

.cta-section h2,
.cta-section p {
    color: var(--white-color);
}

.cta-section p {
    max-width: 600px;
    margin: 15px auto 30px;
    opacity: 0.8;
}

/* 11. Footer
------------------------------------------------ */
.footer {
    background-color: var(--secondary-color);
    padding: 80px 0 30px;
    font-size: 15px;
    border-top: 1px solid var(--light-gray-color);
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.footer-logo img {
    width: 45px;
    margin-right: 12px;
}

.footer-about p {
    margin-bottom: 25px;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--light-gray-color);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--text-color);
    background: var(--white-color);
    transition: all var(--transition-speed);
}

.footer-social a:hover {
    color: var(--white-color);
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h3 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--dark-color);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-color);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.footer-contact li i {
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 4px;
    width: 20px;
    text-align: center;
}

.footer-contact a {
    color: var(--text-color);
}

.footer-bottom {
    border-top: 1px solid var(--light-gray-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-legal a {
    color: var(--text-color);
    margin-left: 20px;
}

/* 12. Back to Top Button
------------------------------------------------ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-speed);
    box-shadow: var(--box-shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-5px);
}

/* 13. Contact Page & Form
------------------------------------------------ */
.page-header {
    padding: 140px 0 80px;
    background-color: var(--secondary-color);
    text-align: center;
}

.page-header h1 {
    font-size: 48px;
}

.contact-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

.contact-info-block,
.contact-form-block {
    background: var(--white-color);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray-color);
}

.contact-info-block h3,
.contact-form-block h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.info-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
    width: 30px;
    text-align: center;
}

.info-text h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
    font-size: 18px;
}

.info-text p,
.info-text a {
    color: var(--text-color);
    margin: 0;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--secondary-color);
    border: 1px solid var(--light-gray-color);
    border-radius: var(--border-radius);
    color: var(--dark-color);
    font-family: var(--font-primary);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.2);
}

textarea {
    resize: vertical;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--white-color);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 450px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup.show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

.popup-icon {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.popup-content h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.popup-content p {
    color: var(--text-color);
    margin-bottom: 30px;
}

/* 14. Legal Pages
------------------------------------------------ */
.legal-content .content-wrapper {
    background-color: var(--white-color);
    padding: 50px;
    border: 1px solid var(--light-gray-color);
    border-radius: var(--border-radius);
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--dark-color);
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 28px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.legal-content p,
.legal-content li {
    color: var(--text-color);
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}

.legal-content strong {
    color: var(--dark-color);
}

/* 15. Animation Keyframes & Scroll Animations
------------------------------------------------ */
@keyframes preload-progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        color: transparent
    }

    50% {
        color: var(--primary-color);
    }
}

@keyframes float-up-down {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.animate-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.animate-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

/* 16. Media Queries
------------------------------------------------ */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--white-color);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 20px 0;
    }

    .nav-link {
        font-size: 18px;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto 40px;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
        margin-bottom: 40px;
    }

    .stats-counter {
        justify-content: center;
    }

    .process-wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .process-wrapper::before {
        display: none;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: 1 / -1;
    }

    .contact-page-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .section-padding {
        padding: 80px 0;
    }

    .slider-controls {
        position: static;
        transform: none;
        margin-top: 30px;
        justify-content: center;
        gap: 20px;
    }

    .testimonial-card p {
        font-size: 18px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .footer-legal {
        text-align: center;
    }

    .footer-legal a {
        margin: 0 10px;
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .process-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about,
    .footer-links,
    .footer-contact {
        margin-bottom: 20px;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .legal-content .content-wrapper {
        padding: 30px;
    }
}