/* --- TABLE OF CONTENTS ---
1.  Root Variables & Global Styles
2.  Preloader & Utility Classes
3.  Header & Navigation
4.  Hero Section
5.  Page Header (for subpages)
6.  Content & Section Styling
7.  About Section
8.  Stats Section
9.  Services Section (with 3D cards)
10. Process Section (Timeline)
11. Testimonials Section
12. CTA Section
13. Contact Page Section
14. Legal Pages Section
15. Footer
16. Interactive Elements (Buttons, Forms, Widgets)
17. Scroll-triggered Animations
18. Media Queries (Responsiveness)
--------------------------- */

/* 1. Root Variables & Global Styles */
:root {
    --primary-bg: #0a192f;
    --secondary-bg: #112240;
    --accent-color: #64ffda;
    --accent-hover: #52d3b8;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --text-headings: #e6f1ff;
    --border-color: #233554;
    --shadow-color: rgba(2, 12, 27, 0.7);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    --header-height: 80px;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-secondary);
    color: var(--text-headings);
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* 2. Preloader & Utility Classes */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.loader-logo {
    width: 100%;
    filter: brightness(0) invert(1);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.content-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    color: var(--accent-color);
    font-family: var(--font-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* 3. Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999;
    transition: top 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 10px 30px -10px var(--shadow-color);
}

.header.hidden {
    top: -100px;
}

.logo img {
    height: 80px;
    filter: brightness(0) invert(1);
    transition: transform var(--transition-speed) ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--accent-color);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-headings);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger animation for mobile */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 4. Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-3d-sphere {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* 5. Page Header (for subpages) */
.page-header {
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=2670&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 160px 0 80px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-primary);
    max-width: 600px;
    margin: 0 auto 20px;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs span {
    color: var(--text-primary);
}

/* 6. Content & Section Styling */
.content-section {
    padding: 100px 0;
}

/* 7. About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(100, 255, 218, 0.1);
    transition: background var(--transition-speed) ease;
}

.about-image:hover::after {
    background: transparent;
}

.about-image img {
    filter: grayscale(80%) contrast(1.1);
    transition: filter var(--transition-speed) ease;
}

.about-image:hover img {
    filter: none;
}

.about-content h3 {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.about-features {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    margin-bottom: 30px;
}

.about-features li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.about-features li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--accent-color);
}

/* 8. Stats Section */
.stats-section {
    background-color: var(--secondary-bg);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-headings);
}

.stat-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 9. Services Section (with 3D cards) */
.services-section {
    background: var(--primary-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: transparent;
    perspective: 1500px;
    height: 350px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    border-radius: var(--border-radius);
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -15px var(--shadow-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-card-front,
.service-card:hover .service-card-back {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px var(--shadow-color);
}

.service-card-front {
    color: var(--text-headings);
}

.service-card-back {
    transform: rotateY(180deg);
}

.service-card-front i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-card-front i {
    transform: scale(1.1);
}

.service-card-front h3 {
    font-size: 1.5rem;
}

.service-card-back h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.service-card-back p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.service-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}


/* 10. Process Section (Timeline) */
.process-section {
    background-color: var(--secondary-bg);
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.process-step {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.process-step:nth-child(odd) {
    left: 0;
}

.process-step:nth-child(even) {
    left: 50%;
}

.process-step::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-bg);
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.process-step:nth-child(even)::after {
    left: -10px;
}

.process-content {
    padding: 20px 30px;
    background-color: var(--primary-bg);
    position: relative;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.process-content h3 {
    color: var(--accent-color);
}

.process-icon {
    display: none;
    /* Icons handled differently in mobile */
}

/* 11. Testimonials Section */
.testimonials-section {
    background-color: var(--primary-bg);
}

.testimonial-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.testimonial-slider {
    display: flex;
    overflow: hidden;
}

.testimonial-slide {
    min-width: 100%;
    padding: 40px;
    text-align: center;
    transition: transform 0.5s ease-in-out;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.testimonial-author h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-headings);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
}

.slider-controls button {
    background: rgba(35, 53, 84, 0.5);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
}

/* 12. CTA Section */
.cta-section {
    background: linear-gradient(to right, var(--accent-color), #4dd7c1);
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    color: var(--primary-bg);
    font-size: 2.5rem;
}

.cta-content p {
    color: var(--secondary-bg);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.btn.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* 13. Contact Page Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background-color: var(--secondary-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.contact-info-item h4 {
    margin-bottom: 5px;
}

/* 14. Legal Pages Section */
.legal-content .container {
    max-width: 800px;
    background-color: var(--secondary-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.legal-content h2 {
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-content ul {
    list-style: none;
    padding-left: 0;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.legal-content li::before {
    content: '\2022';
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1.5rem;
    position: absolute;
    left: 0.5rem;
}

/* 15. Footer */
.footer {
    background-color: var(--secondary-bg);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-headings);
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-about .logo img {
    height: 80px;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    transform: translateY(-3px);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-contact i {
    color: var(--accent-color);
    margin-top: 4px;
}

.footer-contact a {
    color: var(--text-secondary);
}

.footer-contact a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-legal a {
    color: var(--text-secondary);
    margin: 0 10px;
}

.footer-legal a:hover {
    color: var(--accent-color);
}


/* 16. Interactive Elements (Buttons, Forms, Widgets) */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg);
}

/* Forms */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-control:focus+label,
.form-control:not(:placeholder-shown)+label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background-color: var(--secondary-bg);
    padding: 0 5px;
    color: var(--accent-color);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364ffda' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Back to Top & Chat Widgets */
.back-to-top,
.live-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible,
.live-chat-widget.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.live-chat-widget {
    bottom: 90px;
    background-color: var(--secondary-bg);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.live-chat-widget:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg);
}

/* 17. Scroll-triggered Animations */
.anim-fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.anim-pop-in {
    opacity: 0;
    transform: scale(0.9);
}

.anim-slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.anim-slide-in-right {
    opacity: 0;
    transform: translateX(50px);
}

/* 18. Media Queries (Responsiveness) */

/* Tablets and larger devices */
@media (max-width: 1024px) {
    .header {
        padding: 0 30px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 500px;
        margin: 0 auto 30px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .header {
        padding: 0 20px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(75vw, 400px);
        height: 100vh;
        background-color: var(--secondary-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -10px 0px 30px -15px var(--shadow-color);
        transition: right 0.4s ease-in-out;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 40px;
    }

    .nav-links li a {
        font-size: 1.2rem;
    }

    .hamburger {
        display: block;
    }

    .nav-cta {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Process Timeline for mobile */
    .process-timeline::after {
        left: 20px;
    }

    .process-step {
        width: 100%;
        padding-left: 50px;
        padding-right: 10px;
    }

    .process-step:nth-child(even) {
        left: 0%;
    }

    .process-step::after {
        left: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social,
    .footer-contact li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}