/*
* Digital Marketing Agency - Redesign 2 Stylesheet
* Theme: "Cyber Growth"
*/

/* ---------------------------------- */
/* 1. Global Styles & Variables       */
/* ---------------------------------- */
:root {
    --bg-dark: #0a192f;
    /* Deep Navy - Almost black */
    --bg-medium: #112240;
    /* Lighter Navy for cards/sections */
    --bg-light: #233554;
    /* Highlight Navy for hovers */
    --primary-accent: #648dff;
    /* Bright, glowing Teal */
    --secondary-accent: #25f7f7;
    /* Vibrant Neon Pink for secondary actions */
    --text-light: #ccd6f6;
    /* Light, soft blue-white for headings */
    --text-dark: #8892b0;
    /* Muted slate for body text and subtitles */
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Inter', sans-serif;
    /* A clean, modern UI font */
    --header-height: 80px;
    --border-radius: 4px;
    /* Sharper edges for a tech feel */
    --transition: 0.3s ease-out;
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@700&family=Roboto:wght@400;500&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--primary-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style: none;
}

.highlight {
    color: var(--primary-accent);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border: 2px solid var(--primary-accent);
    border-radius: 50px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 245, 212, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

/* Animation on Scroll */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.fade-in-up {
    transform: translateY(50px);
}

.animate-on-scroll.slide-in-left {
    transform: translateX(-50px);
}

.animate-on-scroll.slide-in-right {
    transform: translateX(50px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ---------------------------------- */
/* 2. Header & Navigation             */
/* ---------------------------------- */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: transparent;
    transition: background-color var(--transition), height var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
    background-color: rgba(16, 0, 43, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    height: 70px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 65px;
    filter: brightness(0) invert(1);
}

.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-accent);
    transition: width var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    /* Logic in media query */
}

/* ---------------------------------- */
/* 3. Hero Section                    */
/* ---------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* 3D Sphere */
.hero-3d-visual {
    perspective: 1200px;
}

.scene {
    width: 400px;
    height: 400px;
    margin: auto;
}

.sphere {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotateSphere 30s linear infinite;
}

.sphere-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    background: rgba(0, 245, 212, 0.1);
    color: var(--primary-accent);
    border: 1px solid var(--primary-accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-family: var(--font-heading);
}

@keyframes rotateSphere {
    from {
        transform: rotateY(0) rotateX(0);
    }

    to {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

/* ---------------------------------- */
/* 4. Services Section                */
/* ---------------------------------- */
section {
    padding: 100px 0;
}

.services-section {
    background-color: var(--bg-medium);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    perspective: 1000px;
    background-color: transparent;
    height: 300px;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    padding: 30px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-front {
    background-color: var(--bg-light);
}

.card-back {
    background: linear-gradient(45deg, var(--secondary-accent), var(--bg-light));
    transform: rotateY(180deg);
}

.service-card:hover .card-front {
    transform: rotateY(-180deg);
}

.service-card:hover .card-back {
    transform: rotateY(0);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-back ul {
    margin-top: 1rem;
}

.card-back li {
    margin-bottom: 0.5rem;
}

/* ---------------------------------- */
/* 5. Process Section                 */
/* ---------------------------------- */
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
}

.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--bg-light);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-accent);
    border: 4px solid var(--bg-dark);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--bg-medium);
    border-radius: var(--border-radius);
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: right;
}

.timeline-step {
    position: absolute;
    top: -20px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.timeline-item:nth-child(odd) .timeline-step {
    left: 20px;
}

.timeline-item:nth-child(even) .timeline-step {
    right: 20px;
}

/* ---------------------------------- */
/* 6. Calculator Section              */
/* ---------------------------------- */
.calculator-section {
    background-color: var(--bg-medium);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--bg-dark);
    padding: 50px;
    border-radius: var(--border-radius);
    align-items: center;
}

.calculator-form .form-group {
    margin-bottom: 1.5rem;
}

.calculator-form label {
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
}

.calculator-form input[type="checkbox"] {
    display: none;
}

.calculator-form label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-accent);
    border-radius: 4px;
}

.calculator-form input[type="checkbox"]:checked+label::after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: -2px;
    font-size: 1.2rem;
    color: var(--primary-accent);
}

.calculator-result {
    text-align: center;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, var(--bg-light) 0%, var(--bg-dark) 70%);
    border: 4px solid var(--primary-accent);
    box-shadow: 0 0 30px var(--primary-accent);
}

#impact-score {
    font-size: 4rem;
    font-family: var(--font-heading);
    color: var(--text-light);
}

/* ---------------------------------- */
/* 7. ROI Dashboard Section            */
/* ---------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background-color: var(--bg-medium);
    padding: 30px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-accent);
    transition: all var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.kpi-value {
    font-size: 3rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--primary-accent);
}

.sparkline {
    height: 60px;
    margin-bottom: 1rem;
    position: relative;
}

.sparkline svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkline polyline {
    fill: none;
    stroke: var(--secondary-accent);
    stroke-width: 3;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 2s ease-out forwards;
}

.is-visible .sparkline polyline {
    animation-play-state: running;
}

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

/* ---------------------------------- */
/* 8. Testimonials Section            */
/* ---------------------------------- */
.testimonials-section {
    background-color: var(--bg-medium);
}

.testimonial-carousel-wrapper {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
    perspective: 1500px;
    height: 300px;
}

.testimonial-carousel {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

.testimonial-slide {
    position: absolute;
    width: 80%;
    left: 10%;
    top: 10%;
    height: 80%;
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: var(--border-radius);
    opacity: 0.5;
    transition: transform 0.8s, opacity 0.8s;
    text-align: center;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-slide p {
    font-size: 1.1rem;
    font-style: italic;
}

.author {
    margin-top: 1.5rem;
}

.author strong {
    display: block;
    color: var(--text-light);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 110%;
    left: -5%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}

.carousel-nav button {
    background: var(--bg-light);
    border: none;
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--transition);
}

.carousel-nav button:hover {
    background-color: var(--primary-accent);
    color: var(--bg-dark);
}


/* ---------------------------------- */
/* 9. CTA Section                     */
/* ---------------------------------- */
.cta-section {
    background: linear-gradient(45deg, var(--secondary-accent), var(--bg-light));
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
}

.cta-section p {
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.cta-section .btn-primary {
    background-color: var(--text-light);
    border-color: var(--text-light);
}

/* ---------------------------------- */
/* 10. Footer                         */
/* ---------------------------------- */
.site-footer {
    padding: 60px 0 20px;
    background-color: #0c001f;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 70px;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-dark);
}

.footer-col a:hover {
    color: var(--primary-accent);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--bg-medium);
}

/* ---------------------------------- */
/* 11. Other Pages                    */
/* ---------------------------------- */
.page-header {
    padding: 140px 0 80px;
    text-align: center;
    background: var(--bg-medium);
}

.contact-section,
.legal-content-section {
    padding: 100px 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
    flex: 1;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-medium);
    border: 1px solid var(--bg-light);
    color: var(--text-light);
    border-radius: var(--border-radius);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.contact-info-list li {
    margin-bottom: 1rem;
    display: flex;
}

.contact-info-list strong {
    width: 80px;
    color: var(--text-light);
}

.legal-content {
    max-width: 800px;
    margin: auto;
}

.legal-content h2 {
    margin-top: 2rem;
}

.legal-content ul {
    padding-left: 20px;
    list-style: disc;
}

/* ---------------------------------- */
/* 12. Chat Widget (Re-styled)        */
/* ---------------------------------- */
.chat-widget {
    /* Existing JS will work with this */
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 5px 20px rgba(155, 93, 229, 0.4);
    cursor: pointer;
    transition: transform var(--transition);
}

.chat-button:hover {
    transform: scale(1.1) rotate(15deg);
}

.chat-button svg {
    width: 30px;
    height: 30px;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background-color: var(--bg-medium);
    border-radius: var(--border-radius);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all var(--transition);
}

.chat-widget.open .chat-window {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-header {
    background-color: var(--bg-light);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
    min-height: 150px;
}

.chat-footer input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--bg-light);
    padding: 10px;
    border-radius: 5px;
    color: var(--text-light);
}

/* ---------------------------------- */
/* 13. Responsive Design              */
/* ---------------------------------- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-3d-visual {
        display: none;
    }

    .process-timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .timeline-item::after {
        left: 21px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-medium);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        z-index: 1001;
    }

    .hamburger {
        display: block;
        width: 30px;
        height: 2px;
        background: var(--text-light);
        position: relative;
        transition: all 0.3s;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--text-light);
        left: 0;
        transition: all 0.3s;
    }

    .hamburger::before {
        top: -8px;
    }

    .hamburger::after {
        bottom: -8px;
    }

    .mobile-nav-toggle.active .hamburger {
        background: transparent;
    }

    .mobile-nav-toggle.active .hamburger::before {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-nav-toggle.active .hamburger::after {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .header-cta {
        display: none;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }
}