/*
================================================
TABLE OF CONTENTS
================================================
1.  GLOBAL STYLES & VARIABLES
    - CSS Custom Properties (Colors, Fonts)
    - Font Imports & Base Styles
    - Scrollbar Styling
    - Utility Classes (Container, Gradients)

2.  KEYFRAME ANIMATIONS
    - Fade/Slide Animations
    - Noise Overlay
    - 3D Crystal Rotation
    - Globe Spin
    - Pulse & Glow Effects
    - Loader Animation

3.  SITE-WIDE COMPONENTS
    - Loader Wrapper
    - Header (Sticky, Desktop Nav, Mobile Toggle)
    - Mobile Menu Overlay
    - Buttons (Primary, Secondary)
    - Footer
    - Live Chat Widget
    - Popup Modal

4.  PAGE-SPECIFIC SECTIONS (INDEX)
    - Hero Section (incl. 3D Crystal)
    - Services Section (incl. 3D Flip Cards)
    - Process Section (Timeline)
    - Why Choose Us Section (incl. Tech Globe)
    - ROI Calculator Section (Custom Sliders)
    - Industry Expertise Section
    - Testimonials Section (Slider)
    - CTA Section

5.  SUB-PAGE STYLES
    - Page Header (for Contact, Legal)
    - Contact Page Layout & Form
    - Legal Content Formatting

6.  RESPONSIVE DESIGN (MEDIA QUERIES)
    - Tablet (max-width: 992px)
    - Mobile (max-width: 768px)
    - Small Mobile (max-width: 480px)
================================================
*/


/* 1. GLOBAL STYLES & VARIABLES
/* ======================================= */

:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #10101e;
    --bg-tertiary: #1a1a2e;
    --accent-primary: #4a00e0;
    --accent-secondary: #8e2de2;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0c0;
    --border-color: rgba(142, 45, 226, 0.2);
    --glow-color: rgba(131, 58, 180, 0.3);

    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Rajdhani', sans-serif;

    --header-height: 80px;
    --transition-speed: 0.4s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-secondary);
    font-weight: 500;
    line-height: 1.7;
    overflow-x: hidden;
}

body.loaded .loader-wrapper {
    opacity: 0;
    visibility: hidden;
}

body.no-scroll {
    overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-secondary), var(--accent-primary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--accent-primary), var(--accent-secondary));
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-primary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header.text-center {
    text-align: center;
}

.section-subtitle {
    display: block;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--accent-secondary);
}

.section-description {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Noisy Shimmer Overlay */
.noise-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39tbW1paWhzc3N8fH1oKChxZmJjKysjKCoDAgECCwvcAAAApElEQVRIx+3VQU4DQRBE0UoCAaaA99/s38RcoSUB/F2pA1LQf9eHq2v7L59e5vS13f9NPE8zk3M/c93t1H4hIZAEwhIZAmAhkO0S3JAkA8wJECRg0S7E5I4Jg8cAw8B8hECQW5ICgGkgYFciCAbkAaJFAy8B8iA4EDdfwWcBAmLhTCABw/CgEAvkgoMMLsBGNw/g+As4fgG8A3kFf0wFMG3wH718xIAAAAASUVORK5CYII=);
    background-repeat: repeat;
    animation: noise 0.2s infinite;
    opacity: 0.05;
    z-index: 10000;
    pointer-events: none;
}


/* 2. KEYFRAME ANIMATIONS
/* ======================================= */

@keyframes noise {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -5%);
    }

    20% {
        transform: translate(-10%, 5%);
    }

    30% {
        transform: translate(5%, -10%);
    }

    40% {
        transform: translate(-5%, 15%);
    }

    50% {
        transform: translate(-10%, 5%);
    }

    60% {
        transform: translate(15%, 0);
    }

    70% {
        transform: translate(0, 10%);
    }

    80% {
        transform: translate(-15%, 0);
    }

    90% {
        transform: translate(10%, 5%);
    }

    100% {
        transform: translate(5%, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-right {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@keyframes fade-left {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-load,
.animate-on-scroll {
    opacity: 0;
}

.animate-on-load.visible,
.animate-on-scroll.visible {
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-on-load[data-animation="fade-up"].visible,
.animate-on-scroll[data-animation="fade-up"].visible {
    animation-name: fade-up;
}

.animate-on-load[data-animation="fade-right"].visible,
.animate-on-scroll[data-animation="fade-right"].visible {
    animation-name: fade-right;
}

.animate-on-load[data-animation="fade-left"].visible,
.animate-on-scroll[data-animation="fade-left"].visible {
    animation-name: fade-left;
}

.animate-on-load[data-animation="fade-in"].visible,
.animate-on-scroll[data-animation="fade-in"].visible {
    animation-name: fadeIn;
}


@keyframes rotateCrystal {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 20px 5px var(--glow-color), 0 0 40px 10px var(--glow-color) inset;
    }

    50% {
        box-shadow: 0 0 30px 10px var(--glow-color), 0 0 50px 15px var(--glow-color) inset;
    }

    100% {
        box-shadow: 0 0 20px 5px var(--glow-color), 0 0 40px 10px var(--glow-color) inset;
    }
}

@keyframes globeSpin {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -798px 0;
    }
}

@keyframes loaderGridAnim {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* 3. SITE-WIDE COMPONENTS
/* ======================================= */

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-text {
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    color: var(--accent-secondary);
}

.loader-grid {
    display: grid;
    grid-template-columns: repeat(3, 30px);
    grid-template-rows: repeat(3, 30px);
    gap: 5px;
}

.loader-grid div {
    width: 30px;
    height: 30px;
    background-color: var(--accent-primary);
    opacity: 0.5;
    animation: loaderGridAnim 1.5s infinite ease-in-out;
}

.loader-grid div:nth-child(1) {
    animation-delay: 0.1s;
}

.loader-grid div:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-grid div:nth-child(3) {
    animation-delay: 0.3s;
}

.loader-grid div:nth-child(4) {
    animation-delay: 0.2s;
}

.loader-grid div:nth-child(5) {
    animation-delay: 0.3s;
}

.loader-grid div:nth-child(6) {
    animation-delay: 0.4s;
}

.loader-grid div:nth-child(7) {
    animation-delay: 0.3s;
}

.loader-grid div:nth-child(8) {
    animation-delay: 0.4s;
}

.loader-grid div:nth-child(9) {
    animation-delay: 0.5s;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.header.scrolled {
    background-color: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 80px;
    transition: transform var(--transition-speed) ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: var(--text-primary);
    position: absolute;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
    border-radius: 3px;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    left: 0;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

.mobile-menu-toggle.active .hamburger-inner {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger-inner::before {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-inner::after {
    transform: translateY(-10px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
}

.mobile-nav-link {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    transition: color var(--transition-speed) ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border: 2px solid transparent;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 1;
}

.btn span {
    z-index: 2;
}

.btn i {
    z-index: 2;
    transition: transform var(--transition-speed) ease;
}

.btn:hover i {
    transform: translateX(5px);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    color: #fff;
    box-shadow: 0 5px 15px var(--glow-color);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    z-index: -1;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-secondary:hover {
    background-color: var(--accent-secondary);
    color: #fff;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: 5rem 0 2rem 0;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-family: var(--font-primary);
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
}

.footer-logo img {
    height: 80px;
    margin-bottom: 1rem;
}

.about-col p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.links-col ul li {
    margin-bottom: 0.8rem;
}

.links-col ul li a {
    color: var(--text-secondary);
    transition: color 0.3s, padding-left 0.3s;
}

.links-col ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-contact li i {
    color: var(--accent-secondary);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.footer-legal-links a {
    color: var(--text-secondary);
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.footer-legal-links a:hover {
    color: #fff;
}

/* Live Chat Widget */
.live-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-primary));
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 20px var(--glow-color);
    transition: transform 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-toggle-btn .fa-times {
    display: none;
}

.live-chat-widget.open .chat-toggle-btn .fa-times {
    display: block;
}

.live-chat-widget.open .chat-toggle-btn .fa-comment-dots {
    display: none;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.live-chat-widget.open .chat-window {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chat-header {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    padding: 1rem;
    color: #fff;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.chat-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
    color: #fff;
}

.chat-body {
    padding: 1rem;
    flex-grow: 1;
    height: 300px;
    overflow-y: auto;
}

.chat-message.received p {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 15px 15px 15px 0;
    max-width: 80%;
    margin-bottom: 0;
}

.chat-footer {
    display: flex;
    padding: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 0.8rem;
    color: var(--text-primary);
    outline: none;
}

.chat-footer button {
    background: transparent;
    border: none;
    color: var(--accent-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.8rem;
    transition: color 0.3s;
}

.chat-footer button:hover {
    color: var(--accent-primary);
}

/* Popup / Modal */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1050;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: popupFadeIn 0.4s ease forwards;
}

.popup-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close-btn:hover {
    color: #fff;
}

.popup-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1.5rem;
}

.popup h3 {
    margin-bottom: 1rem;
}


/* 4. PAGE-SPECIFIC SECTIONS (INDEX)
/* ======================================= */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 4rem) 0 4rem 0;
    overflow: hidden;
}

.hero-background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-glow-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--glow-color) 0%, rgba(10, 10, 20, 0) 70%);
    transform: translate(-50%, -50%);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(142, 45, 226, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(142, 45, 226, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}


.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.data-crystal {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCrystal 40s infinite linear;
}

.crystal-face {
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(74, 0, 224, 0.1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.face-1 {
    transform: rotateY(0deg) translateZ(125px);
}

.face-2 {
    transform: rotateY(90deg) translateZ(125px);
}

.face-3 {
    transform: rotateY(180deg) translateZ(125px);
}

.face-4 {
    transform: rotateY(-90deg) translateZ(125px);
}

.face-5 {
    transform: rotateX(90deg) translateZ(125px);
}

.face-6 {
    transform: rotateX(-90deg) translateZ(125px);
}

/* Services Section */
.services-section {
    padding: 6rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    min-height: 350px;
    perspective: 1000px;
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 2.5rem 2rem;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
}

.service-card-front {
    background-color: var(--bg-tertiary);
    transform: rotateY(0deg);
}

.service-card:hover .service-card-front {
    transform: rotateY(-180deg);
}

.service-card-back {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transform: rotateY(180deg);
}

.service-card:hover .service-card-back {
    transform: rotateY(0deg);
}


.service-icon {
    font-size: 3rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.service-card-front .service-icon {
    color: var(--accent-secondary);
}

.service-card-back .service-title {
    color: #fff;
    margin-bottom: 1rem;
}

.service-card-back p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.service-link {
    font-family: var(--font-primary);
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Process Section */
.process-section {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--glow-color);
}

.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 20px;
    background-color: var(--bg-tertiary);
    border: 3px solid var(--accent-secondary);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent-secondary);
    box-shadow: 0 0 20px var(--glow-color);
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -30px;
    transform: translateX(50%);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -30px;
    transform: translateX(-50%);
}

.timeline-content {
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

.timeline-step {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 1rem;
}

.timeline-item:nth-child(odd) .timeline-step {
    left: 1rem;
}

.timeline-item:nth-child(even) .timeline-step {
    right: 1rem;
}

.timeline-title {
    margin-bottom: 0.5rem;
}

/* Why Choose Us Section */
.why-choose-us-section {
    padding: 6rem 0;
}

.why-choose-us-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.features-list {
    margin: 2rem 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.features-list i {
    color: var(--accent-secondary);
    font-size: 1.2rem;
}

.why-choose-us-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-globe {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: relative;
    background-color: var(--bg-secondary);
    box-shadow: 0 0 50px -10px var(--glow-color) inset, 0 0 30px var(--glow-color);
    overflow: hidden;
}

.globe-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='798' height='399'%3E%3Cg fill='none' stroke='%234a00e0' stroke-width='1'%3E%3Cpath d='M399,0 C399,110.198 309.593,199.5 199.5,199.5 C89.407,199.5 0,110.198 0,0' transform='translate(0 199.5)'/%3E%3Cpath d='M399,0 C399,110.198 309.593,199.5 199.5,199.5 C89.407,199.5 0,110.198 0,0' transform='translate(399 199.5)'/%3E%3Cellipse cx='199.5' cy='199.5' rx='199.5' ry='199.5'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    opacity: 0.3;
    animation: globeSpin 20s linear infinite;
}

/* ROI Calculator Section */
.roi-calculator-section {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.calculator-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.calculator-inputs .form-group {
    margin-bottom: 2rem;
}

.calculator-inputs label {
    display: block;
    margin-bottom: 1rem;
    font-family: var(--font-primary);
    font-weight: 600;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 5px;
    outline: none;
    padding: 0;
    margin: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-secondary);
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid var(--bg-tertiary);
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-primary);
}

.calculator-inputs span {
    display: inline-block;
    margin-left: 1rem;
    font-family: var(--font-primary);
    color: var(--accent-secondary);
    font-weight: bold;
}

.calculator-results {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 1.5rem;
    border-left: 1px solid var(--border-color);
    padding-left: 3rem;
}

.result-box {
    text-align: center;
}

.result-box h4 {
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-box p {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.result-box.result-highlight p {
    font-size: 2.5rem;
    color: var(--accent-secondary);
}

/* Industry Expertise Section */
.industry-section {
    padding: 6rem 0;
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.industry-item {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.industry-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--glow-color);
}

.industry-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
}

.industry-item h3 {
    font-size: 1.1rem;
    font-family: var(--font-secondary);
    font-weight: 700;
}

/* Testimonials Section */
.testimonials-section {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.testimonial-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    padding: 3rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-text::before {
    content: '\f10d';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--accent-secondary);
    opacity: 0.5;
}

.author-name {
    margin-bottom: 0.2rem;
}

.author-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}

.slider-controls button {
    background-color: rgba(26, 26, 46, 0.8);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.slider-controls button:hover {
    background-color: var(--accent-secondary);
    transform: scale(1.1);
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(rgba(10, 10, 20, 0.9), rgba(10, 10, 20, 0.9)), url('https://i.imgur.com/gKqf1Am.jpg') center/cover no-repeat fixed;
    text-align: center;
}

.cta-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.cta-text {
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}


/* 5. SUB-PAGE STYLES
/* ======================================= */

/* Page Header */
.page-header-section {
    padding: calc(var(--header-height) + 5rem) 0 5rem 0;
    text-align: center;
    background: linear-gradient(rgba(10, 10, 20, 0.8), var(--bg-primary)), url('https://i.imgur.com/gKqf1Am.jpg') center/cover no-repeat;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 3.5rem;
}

.page-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Contact Page */
.contact-section-standalone {
    padding: 6rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.contact-info {
    padding: 4rem;
}

.contact-details {
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent-secondary);
}

.contact-text h3 {
    margin-bottom: 0.2rem;
    font-size: 1.2rem;
}

.contact-text p {
    margin-bottom: 0;
}

.contact-form-wrapper {
    background-color: var(--bg-tertiary);
    padding: 4rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 10px var(--glow-color);
}

.contact-form textarea {
    resize: vertical;
}

/* Legal Pages */
.legal-content {
    padding: 6rem 0;
}

.legal-content .container {
    max-width: 800px;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
}

.legal-section p,
.legal-section li {
    color: var(--text-secondary);
}

.legal-section strong {
    color: var(--text-primary);
    font-weight: 600;
}


/* 6. RESPONSIVE DESIGN
/* ======================================= */

/* Tablet */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .main-nav,
    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 2rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .data-crystal {
        width: 200px;
        height: 200px;
    }

    .crystal-face {
        width: 200px;
        height: 200px;
    }

    .face-1,
    .face-2,
    .face-3,
    .face-4 {
        transform: translateZ(100px);
    }

    .face-5,
    .face-6 {
        transform: translateZ(100px);
    }

    .why-choose-us-wrapper {
        grid-template-columns: 1fr;
    }

    .why-choose-us-content {
        text-align: center;
    }

    .features-list {
        text-align: left;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .tech-globe {
        width: 300px;
        height: 300px;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .calculator-results {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 2rem;
        flex-direction: row;
        text-align: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1,
    .page-title {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-section {
        min-height: auto;
    }

    .process-timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 5rem;
        padding-right: 1rem;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-icon {
        left: 30px !important;
        transform: translateX(-50%) !important;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }

    .testimonial-slide {
        padding: 2rem 1.5rem;
    }

    .slider-controls {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal-links a {
        margin: 0 0.5rem;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-cta-group {
        flex-direction: column;
    }

    .live-chat-widget {
        right: 1rem;
        bottom: 1rem;
    }

    .chat-window {
        width: calc(100vw - 2rem);
    }

    .popup-content {
        padding: 2rem 1.5rem;
    }
}