/* -------------------------------------------------------------------------- */
/*                                 1. VARIABLES                               */
/* -------------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --primary-color: #4361ee;
    --primary-dark: #3a0ca3;
    --primary-light: #4cc9f0;
    --accent-color: #f72585;
    --text-main: #2b2d42;
    --text-light: #8d99ae;
    --bg-body: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #111111;
    --bg-dark-overlay: rgba(17, 17, 17, 0.95);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #7209b7 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));

    /* Typography */
    --font-main: 'Poppins', sans-serif;
    --h1-size: 3.5rem;
    --h2-size: 2.5rem;
    --h3-size: 1.75rem;
    --p-size: 1.1rem;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 12px;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.25, 1, 0.5, 1);

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-neon: 0 0 20px rgba(67, 97, 238, 0.4);
}

/* Dark Mode Support (System Preference) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-main: #f8f9fa;
        --text-light: #a8a8a8;
        --bg-body: #0b0c10;
        --bg-white: #1f2833;
        --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}

/* -------------------------------------------------------------------------- */
/*                                 2. RESET & GLOBAL                          */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: var(--shadow-neon);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary-dark);
    transition: var(--transition-fast);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Background Blob Effects */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.1;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary-color);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-color);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    animation-delay: -10s;
}

/* -------------------------------------------------------------------------- */
/*                                 3. HEADER & NAV                            */
/* -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.scrolled {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
}

.logo {
    height: 60px;
    filter: invert(1);
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1002;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-slow);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* -------------------------------------------------------------------------- */
/*                                 4. HERO SECTION                            */
/* -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 100px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: var(--h1-size);
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Floating Elements */
.cube-wrapper {
    perspective: 1000px;
    position: relative;
    width: 300px;
    height: 300px;
}

.cube {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(67, 97, 238, 0.3);
    background: rgba(67, 97, 238, 0.05);
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.1);
}

.front {
    transform: rotateY(0deg) translateZ(150px);
}

.back {
    transform: rotateY(180deg) translateZ(150px);
}

.right {
    transform: rotateY(90deg) translateZ(150px);
}

.left {
    transform: rotateY(-90deg) translateZ(150px);
}

.top {
    transform: rotateX(90deg) translateZ(150px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(150px);
}

.floating-card {
    position: absolute;
    background: var(--bg-white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: float-card 6s ease-in-out infinite;
    z-index: 10;
    max-width: 250px;
}

.card-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    right: -5%;
    animation-delay: 2s;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* -------------------------------------------------------------------------- */
/*                                 5. SERVICES SECTION                        */
/* -------------------------------------------------------------------------- */
.services {
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.section-header h2 {
    font-size: var(--h2-size);
    margin-bottom: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-body);
    padding: 40px 30px;
    border-radius: 20px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--gradient-main);
    z-index: -1;
    transition: 0.5s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.service-card:hover h3,
.service-card:hover p,
.service-card:hover .service-icon {
    color: #fff;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition-fast);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: var(--transition-fast);
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

/* -------------------------------------------------------------------------- */
/*                            6. CALCULATOR & INTERACTIVE                     */
/* -------------------------------------------------------------------------- */
.roi-section {
    background: var(--bg-dark);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.roi-container {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: center;
}

.roi-text {
    flex: 1;
    min-width: 300px;
}

.roi-text h2 {
    font-size: var(--h2-size);
    margin-bottom: 20px;
}

.roi-calculator {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ddd;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: var(--font-main);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.calc-result {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.calc-result span {
    display: block;
    font-size: 0.9rem;
    color: #aaa;
}

.calc-result strong {
    font-size: 2.5rem;
    color: var(--primary-light);
    font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/*                               7. INDUSTRIES                                */
/* -------------------------------------------------------------------------- */
.industries-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.industry-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
}

.industry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.industry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    transition: var(--transition-fast);
}

.industry-item:hover img {
    transform: scale(1.1);
}

.industry-overlay h3 {
    color: #fff;
    font-size: 1.5rem;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.industry-overlay p {
    color: #ddd;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.industry-item:hover .industry-overlay h3 {
    transform: translateY(0);
}

.industry-item:hover .industry-overlay p {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------------------------- */
/*                               8. TESTIMONIALS                              */
/* -------------------------------------------------------------------------- */
.testimonials {
    background: var(--bg-white);
}

.testimonial-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding-bottom: 40px;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    min-width: 400px;
    scroll-snap-align: center;
    background: var(--bg-body);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quote-icon {
    font-size: 3rem;
    color: var(--primary-light);
    opacity: 0.3;
    margin-bottom: 20px;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ccc;
    /* Placeholder */
    object-fit: cover;
}

/* -------------------------------------------------------------------------- */
/*                                9. CONTACT                                  */
/* -------------------------------------------------------------------------- */
.cta-section {
    background: var(--gradient-main);
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Contact Page Specific */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-top: 40px;
}

.contact-info-panel {
    background: var(--primary-dark);
    color: white;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.contact-info-panel::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.contact-method {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-form-wrapper {
    padding: 60px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* -------------------------------------------------------------------------- */
/*                            10. LEGAL PAGES & CONTENT                       */
/* -------------------------------------------------------------------------- */
.page-header {
    background: var(--bg-dark);
    color: white;
    padding: 180px 0 80px;
    text-align: center;
}

.breadcrumbs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    margin-top: 20px;
    font-size: 0.9rem;
}

.content-wrapper {
    background: var(--bg-white);
    padding: 60px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.content-wrapper h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.content-wrapper p,
.content-wrapper li {
    margin-bottom: 15px;
    color: var(--text-main);
}

/* -------------------------------------------------------------------------- */
/*                                11. FOOTER                                  */
/* -------------------------------------------------------------------------- */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer-shapes .footer-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    bottom: 0;
    right: 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.footer-logo {
    height: 60px;
    filter: brightness(0) invert(1);
    margin-bottom: 25px;
}

.footer-about-text {
    color: var(--text-light);
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-col-title {
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-light);
}

.contact-info i {
    color: var(--primary-color);
    margin-top: 5px;
}

.footer-bottom {
    padding: 30px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* -------------------------------------------------------------------------- */
/*                                12. ANIMATIONS                              */
/* -------------------------------------------------------------------------- */
@keyframes rotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes float-card {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.popup:target {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 90%;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #333;
}

.popup i {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

/* -------------------------------------------------------------------------- */
/*                                13. RESPONSIVE                              */
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {

    .hero-grid,
    .contact-wrapper,
    .footer-top,
    .roi-container {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        text-align: center;
        gap: 60px;
    }

    .hero-btns {
        justify-content: center;
    }

    .industries-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --h1-size: 2.5rem;
        --h2-size: 2rem;
    }

    .nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .header-cta {
        display: none;
    }

    .content-wrapper {
        padding: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .industries-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about,
    .footer-links,
    .footer-contact {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
    }
}