/* Table of Contents
--------------------
1.  Global Styles & Variables
2.  Utility Classes
3.  Header & Navigation
4.  Footer
5.  Buttons & Forms
6.  Hero Section
7.  Services Section (with 3D cards)
8.  About Section
9.  Industries Section
10. Testimonials Section
11. ROI Calculator Section
12. CTA Section
13. Live Chat Widget
14. Page-Specific Styles (Contact, Legal)
15. Animations & Keyframes
16. Media Queries (Responsiveness)
--------------------*/

/* 1. Global Styles & Variables
----------------------------------*/
:root {
    --bg-dark: #0a0f2e;
    --bg-light-dark: #12183d;
    --primary-color: #4A00E0;
    --secondary-color: #8E2DE2;
    --accent-color: #00F2FE;
    --text-light: #F0F0F0;
    --text-medium: #A0A0B0;
    --text-dark: #0a0f2e;
    --header-height: 80px;
    --border-radius: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--bg-dark);
    color: var(--text-medium);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-light);
}

ul {
    list-style: none;
}

section {
    padding: 100px 0;
}

/* 2. Utility Classes
----------------------------------*/
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.section-title {
    margin-bottom: 20px;
}

.section-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-medium);
}

/* 3. Header & Navigation
----------------------------------*/
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 15, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--header-height);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    height: 70px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo img {
    height: 70px;
    filter: brightness(0) invert(1);
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.logo a:hover img {
    transform: rotate(15deg);
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease;
}


/* 4. Footer
----------------------------------*/
.site-footer {
    background-color: #06091f;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-light);
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-about .logo {
    margin-bottom: 20px;
}
.footer-about .logo span {
    font-size: 1.8rem;
}

.footer-about p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-medium);
    border-radius: 50%;
    color: var(--text-medium);
    font-weight: bold;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul a {
    color: var(--text-medium);
}

.footer-links ul a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* 5. Buttons & Forms
----------------------------------*/
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    background-image: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--bg-dark);
}

.btn-cta {
    padding: 15px 40px;
    font-size: 1.1rem;
    background-color: var(--accent-color);
    color: var(--bg-dark);
    box-shadow: 0 5px 20px rgba(0, 242, 254, 0.3);
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.5);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}


/* 6. Hero Section
----------------------------------*/
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(80px);
}
.shape-1 {
    width: 400px; height: 400px;
    background-color: var(--primary-color);
    top: 10%; left: 10%;
    animation: move-shape 15s infinite alternate;
}
.shape-2 {
    width: 300px; height: 300px;
    background-color: var(--accent-color);
    bottom: 15%; right: 15%;
    animation: move-shape 20s infinite alternate-reverse;
}
.shape-3 {
    width: 250px; height: 250px;
    background-color: var(--secondary-color);
    top: 50%; right: 40%;
    animation: move-shape 18s infinite alternate;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    max-width: 55%;
}

.hero-content h1 {
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-3d-graphics {
    perspective: 1000px;
}

.cube {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 20s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent-color);
    backdrop-filter: blur(5px);
}

.front  { transform: rotateY(0deg)   translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg)  translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg)  translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }


/* 7. Services Section
----------------------------------*/
.services-section {
    background-color: var(--bg-light-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: transparent;
    perspective: 1000px;
    min-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;
    padding: 30px;
    text-align: center;
    border-radius: var(--border-radius);
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
}

.service-card-back {
    transform: rotateY(180deg);
    background-image: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.service-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--bg-dark);
}

.service-card-front h3 {
    margin-bottom: 10px;
}

.service-card-back h3 {
    margin-bottom: 15px;
}

.service-card-back p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.service-card-back .btn {
    background-color: var(--text-light);
    color: var(--primary-color);
    padding: 8px 20px;
}

/* 8. About Section
----------------------------------*/
.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0 30px;
}

.about-text ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
}

.about-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.about-image-container {
    flex: 1;
    position: relative;
    perspective: 1500px;
}

.image-stack {
    position: relative;
    width: 100%;
    height: 400px;
}

.image-stack__item {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.5s ease-out;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

.image-stack__item--top {
    top: 0;
    left: 0;
    z-index: 2;
    transform: rotateY(-15deg) rotateX(10deg);
}

.image-stack__item--bottom {
    bottom: 0;
    right: 0;
    z-index: 1;
    transform: rotateY(15deg) rotateX(-10deg);
}

.about-image-container:hover .image-stack__item--top {
    transform: rotateY(-5deg) rotateX(5deg) translate(-20px, -20px);
}

.about-image-container:hover .image-stack__item--bottom {
    transform: rotateY(5deg) rotateX(-5deg) translate(20px, 20px);
}

/* 9. Industries Section
----------------------------------*/
.industries-section {
    background-color: var(--bg-light-dark);
}

.industries-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.industry-item {
    padding: 15px 30px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: default;
    transition: all 0.3s ease;
}

.industry-item:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

/* 10. Testimonials Section
-----------------------------------*/
.testimonial-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 50px;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.testimonial-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: center;
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-slide.exit {
    transform: translateX(-100%);
}

.testimonial-text {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
}

.testimonial-text::before, .testimonial-text::after {
    content: '"';
    color: var(--accent-color);
    font-size: 2rem;
    font-weight: bold;
}

.testimonial-author {
    font-size: 1rem;
    color: var(--text-medium);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid var(--text-medium);
    color: var(--text-medium);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    border-color: var(--accent-color);
}

.slider-btn.prev {
    left: 0;
}

.slider-btn.next {
    right: 0;
}

/* 11. ROI Calculator Section
-----------------------------------*/
.roi-calculator-section {
    background-color: var(--bg-light-dark);
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: var(--bg-dark);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.calculator-results h3 {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.result-item strong {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.result-item.total strong {
    color: #4CAF50;
    font-size: 2rem;
}

.calculator-results .disclaimer {
    font-size: 0.8rem;
    margin-top: 20px;
    font-style: italic;
}

#calculate-roi-btn {
    width: 100%;
    margin-top: 10px;
}


/* 12. CTA Section
-----------------------------------*/
.cta-section {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.cta-content p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 13. Live Chat Widget
-----------------------------------*/
.live-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.chat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.chat-icon:hover {
    transform: scale(1.1);
}

.chat-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--text-light);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background-color: var(--bg-light-dark);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background-color: var(--primary-color);
    padding: 15px;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header #close-chat {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
    height: 200px;
}

.chat-footer {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    background: none;
    padding: 15px;
    color: var(--text-light);
}
.chat-footer input:focus {
    outline: none;
}

.chat-footer button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.5rem;
    padding: 0 15px;
    cursor: pointer;
}


/* 14. Page-Specific Styles
-----------------------------------*/
/* Header for inner pages */
.page-header {
    padding: 160px 0 80px;
    background: linear-gradient(rgba(10, 15, 46, 0.8), rgba(10, 15, 46, 0.8)), url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
}

/* Contact Page */
.contact-section {
    padding: 100px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    background-color: var(--bg-light-dark);
    padding: 50px;
    border-radius: var(--border-radius);
}

.contact-info-item {
    margin-bottom: 25px;
}
.contact-info-item h3 {
    color: var(--accent-color);
    margin-bottom: 5px;
}

/* Legal Pages */
.legal-content {
    padding: 80px 0;
}
.legal-content .container {
    max-width: 800px;
}
.legal-content h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}
.legal-content li {
    margin-bottom: 10px;
}


/* 15. Animations & Keyframes
-----------------------------------*/
@keyframes move-shape {
    from { transform: translate(0, 0) rotate(0deg); }
    to   { transform: translate(50px, -50px) rotate(90deg); }
}

@keyframes rotate-cube {
    from { transform: rotateX(0) rotateY(0); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Scroll Animations */
[data-animation] {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animation="fade-up"] { transform: translateY(50px); }
[data-animation="fade-right"] { transform: translateX(-50px); }
[data-animation="fade-left"] { transform: translateX(50px); }
[data-animation="zoom-in"] { transform: scale(0.8); }

.visible[data-animation] {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* 16. Media Queries
-----------------------------------*/
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    section { padding: 80px 0; }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        max-width: 100%;
        margin-bottom: 60px;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }
    .about-text {
        text-align: center;
    }
    .about-text ul {
        text-align: left;
        display: inline-block;
    }
    .about-image-container {
        margin-top: 40px;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    /* Mobile Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-light-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }
    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .main-nav ul a {
        font-size: 1.5rem;
    }
    
    .header-actions {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }

    /* Active mobile nav toggle styling */
    .mobile-nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-links {
        justify-content: center;
    }

    .chat-window {
        width: calc(100vw - 40px);
    }
}