/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    /* Colors */
    --primary-color: #4361ee;
    --secondary-color: #7209b7;
    --accent-color: #4cc9f0;
    --dark-bg: #0b0c15;
    --card-bg: #161823;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --success: #00ff88;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-glow: linear-gradient(90deg, #4361ee, #f72585);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 80px 0;
    --border-radius: 12px;

    /* Shadows */
    --shadow-glow: 0 0 20px rgba(67, 97, 238, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. UTILITY CLASSES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

.gradient-text {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.highlight {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    gap: 10px;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 5px 15px rgba(114, 9, 183, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(114, 9, 183, 0.6);
}

.btn-glow {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px var(--primary-color);
    font-size: 0.9rem;
}

.btn-glow:hover {
    background: var(--secondary-color);
    box-shadow: 0 0 25px var(--secondary-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-outline:hover {
    background: var(--primary-color);
}

.btn-white {
    background: white;
    color: var(--secondary-color);
}

.btn-white:hover {
    background: #f0f0f0;
}

/* =========================================
   3. HEADER & NAV
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 12, 21, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
    transition: padding 0.3s;
}

.main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    height: 50px;
    width: auto;
    filter: invert(1);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: white;
    letter-spacing: -0.5px;
}

.desktop-nav .nav-links {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: white;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-item:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--dark-bg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease-in-out;
}

.mobile-menu-overlay.active {
    right: 0;
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.mobile-links {
    text-align: center;
    margin-bottom: 40px;
}

.mobile-links li {
    margin: 20px 0;
}

.mobile-links a {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    padding-top: 150px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 20% 30%, rgba(67, 97, 238, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(114, 9, 183, 0.15) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}

.badge-pill {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.trust-indicators span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.logos-grid {
    display: flex;
    gap: 30px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
}

.hero-visual-col {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Floating Cards */
.floating-card {
    position: absolute;
    background: rgba(22, 24, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-card);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    right: 0;
    animation-delay: 2s;
}

.floating-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.card-info span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-info strong {
    font-size: 1.5rem;
    color: var(--success);
}

/* 3D Cube Animation - FIXED: Scoped with .cube-spinner to prevent conflicts */
.3d-element-wrapper {
    perspective: 1000px;
}

.cube-spinner {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: spinCube 15s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(67, 97, 238, 0.1);
    border: 2px solid var(--primary-color);
    line-height: 200px;
    text-align: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.5);
}

/* Added .cube-spinner before generic class names to avoid conflicts */
.cube-spinner .front {
    transform: translateZ(100px);
}

.cube-spinner .back {
    transform: rotateY(180deg) translateZ(100px);
}

.cube-spinner .right {
    transform: rotateY(90deg) translateZ(100px);
}

.cube-spinner .left {
    transform: rotateY(-90deg) translateZ(100px);
}

.cube-spinner .top {
    transform: rotateX(90deg) translateZ(100px);
}

.cube-spinner .bottom {
    transform: rotateX(-90deg) translateZ(100px);
}

@keyframes spinCube {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* =========================================
   5. STATS SECTION
   ========================================= */
.stats-section {
    background: var(--card-bg);
    padding: 50px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: white;
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   6. SERVICES GRID
   ========================================= */
.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: #13151f;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.feature-list li {
    margin-bottom: 10px;
    color: #e0e0e0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list i {
    color: var(--secondary-color);
}

/* =========================================
   7. CALCULATOR SECTION
   ========================================= */
.calc-wrapper {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-inputs {
    margin: 30px 0;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-family: var(--font-body);
}

.calc-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
}

.result-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(76, 201, 240, 0.3);
}

.result-circle .amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.result-breakdown p {
    margin: 5px 0;
    color: var(--text-muted);
}

.result-breakdown span {
    color: var(--success);
    font-weight: bold;
}

/* =========================================
   8. PROCESS TIMELINE
   ========================================= */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    /* Ensure opacity and visibility are set explicitly */
    opacity: 1;
    visibility: visible;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--dark-bg);
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

/* These specific classes for timeline positioning */
.timeline-item.left {
    left: 0;
    /* Reset any potential transform from global scope */
    transform: none;
}

.timeline-item.right {
    left: 50%;
    transform: none;
}

.timeline-item.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid rgba(255, 255, 255, 0.1);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.1);
}

.timeline-item.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid rgba(255, 255, 255, 0.1);
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(255, 255, 255, 0.1) transparent transparent;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-item .content {
    padding: 20px 30px;
    background-color: rgba(255, 255, 255, 0.05);
    position: relative;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.content h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   9. REVIEWS & CTA
   ========================================= */
.testimonial-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none;
}

.testimonial-card {
    min-width: 350px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stars {
    color: #ffd700;
    margin-bottom: 15px;
}

.author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cta-banner {
    padding: 100px 0;
    text-align: center;
}

.cta-box {
    background: var(--gradient-main);
    padding: 60px;
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(114, 9, 183, 0.3);
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* =========================================
   10. FOOTER
   ========================================= */
.main-footer {
    background: #05060a;
    padding-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
}

.brand-col p {
    color: var(--text-muted);
    margin: 20px 0;
    font-size: 0.9rem;
}

.footer-logo {
    height: 60px;
    filter: invert(1);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.social-icons a:hover {
    background: var(--primary-color);
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a,
.contact-list li {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.contact-list li {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-list i {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.legal-links a {
    color: var(--text-muted);
    margin-left: 20px;
    font-size: 0.85rem;
}

/* =========================================
   11. LEGAL & CONTACT PAGE STYLES
   ========================================= */
.page-header-mini {
    padding-top: 150px;
    padding-bottom: 60px;
    background: radial-gradient(circle at center, #161823 0%, #0b0c15 100%);
    text-align: center;
}

.legal-content-wrapper {
    background: var(--card-bg);
    padding: 60px;
    border-radius: 20px;
    margin-bottom: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-content-wrapper h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.legal-content-wrapper p,
.legal-content-wrapper ul {
    margin-bottom: 20px;
    color: #ccc;
}

.contact-form-section {
    padding: 80px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.form-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

/* =========================================
   12. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .logos-grid {
        justify-content: center;
    }

    .hero-visual-col {
        display: none;
    }

    /* Hide 3D on tablet/mobile for simplicity */
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
        right: auto;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 21px;
        right: auto;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0%;
    }

    .calc-wrapper {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .legal-links a {
        margin: 0 10px;
    }

    .legal-content-wrapper {
        padding: 20px;
    }
}