/*
 *  Digital Marketing Agency Website - V2 Stylesheet
 *  Theme: Bright & Professional
 *
 *  TABLE OF CONTENTS
 *  -----------------
 *  1.  Root Variables & Global Styles
 *  2.  Utility Classes & Layout
 *  3.  Header & Navigation
 *  4.  Buttons & Forms
 *  5.  Hero Section & 3D Card
 *  6.  Services Section
 *  7.  Process Section (Timeline)
 *  8.  Strategy Builder Section
 *  9.  Results Section (Horizontal Scroll)
 *  10. Testimonials Section
 *  11. CTA Section
 *  12. Footer
 *  13. Live Chat Widget
 *  14. Animations & Keyframes
 *  15. Page-Specific Styles (Contact, Legal)
 *  16. Responsive Design
 */

/* 1. Root Variables & Global Styles */
:root {
    --color-bg: #F8F9FA;
    --color-bg-alt: #FFFFFF;
    --color-primary: #FF6B00; /* Vibrant Orange */
    --color-secondary: #1A2B48; /* Deep Blue */
    --color-text: #1A2B48;
    --color-text-muted: #5A6981;
    --color-border: #E1E5EB;
    --color-bg-accent: #EAF2FF; /* Light Blue BG */
    
    --font-family: 'Inter', sans-serif;
    --header-height: 80px;
    --border-radius: 8px;
    --shadow: 0 4px 20px rgba(26, 43, 72, 0.08);
    --transition-fast: 0.2s ease-in-out;
    --transition-med: 0.4s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }
p { color: var(--color-text-muted); }
a { text-decoration: none; color: inherit; }

/* 2. Utility Classes & Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.section-padding { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.tagline {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section-title { margin-bottom: 20px; }
.section-subtitle { max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

/* 3. Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    background-color: transparent;
    transition: all var(--transition-fast);
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    height: 70px;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-img { height: 50px; filter: brightness(0);}

.main-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
}

.main-nav a {
    font-weight: 500;
    color: var(--color-secondary);
    position: relative;
    padding-bottom: 5px;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.menu-toggle {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 24px;
    height: 18px;
    position: relative;
    z-index: 1001;
}
.menu-toggle span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--color-secondary);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
.menu-toggle span:nth-child(1) { top: 0px; }
.menu-toggle span:nth-child(2) { top: 8px; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg); top: 8px; }
.menu-toggle.active span:nth-child(2) { transform: rotate(-45deg); top: 8px; }

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-alt);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity var(--transition-med), visibility var(--transition-med), transform var(--transition-med);
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav-overlay nav ul {
    list-style: none;
    text-align: center;
}
.mobile-nav-overlay li { margin-bottom: 30px; }
.mobile-nav-overlay a { font-size: 1.5rem; font-weight: 600; color: var(--color-secondary); }

/* 4. Buttons & Forms */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover { background-color: #E66000; border-color: #E66000; transform: translateY(-2px); }
.btn-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border-color: var(--color-border);
}
.btn-secondary:hover { background-color: var(--color-bg-accent); border-color: var(--color-bg-accent); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* 5. Hero Section & 3D Card */
.hero-section {
    padding: calc(var(--header-height) + 80px) 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
}
.hero-container { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.hero-content .tagline { margin-bottom: 16px; }
.hero-title { margin-bottom: 24px; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 32px; max-width: 500px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-3d-card-wrapper {
    perspective: 1500px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-3d-card {
    width: 350px;
    height: 400px;
    background: var(--color-secondary);
    border-radius: 20px;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(26, 43, 72, 0.2);
}
.card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.3) 0%, rgba(255, 107, 0, 0) 70%);
    transition: transform 0.1s linear;
    pointer-events: none;
}
.card-content {
    color: #fff;
    text-align: center;
    padding: 40px;
    transform: translateZ(50px);
}
.card-icon { height: 60px; margin: 20px auto; filter: invert(80%) sepia(40%) saturate(5000%) hue-rotate(350deg); }
.card-content h4 { color: #fff; font-size: 1.5rem; margin-bottom: 10px; }
.card-content p { color: rgba(255, 255, 255, 0.7); }

.hero-bg-elements .bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}
.shape1 { width: 400px; height: 400px; top: -50px; left: -100px; background: rgba(255, 107, 0, 0.1); }
.shape2 { width: 300px; height: 300px; bottom: 0; right: 5%; background: rgba(74, 144, 226, 0.1); }

/* 6. Services Section */
.services-section { background-color: var(--color-bg-alt); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-item {
    background: var(--color-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
}
.service-item::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.1), transparent 40%);
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.service-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}
.service-item:hover::before { transform: scale(1); }
.service-icon-wrapper {
    width: 60px; height: 60px;
    background-color: var(--color-bg-accent);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 20px;
}
.service-icon-wrapper svg { width: 30px; height: 30px; fill: currentColor; }
.service-title { margin-bottom: 15px; }
.service-description { margin-bottom: 20px; }
.service-link { font-weight: 600; color: var(--color-primary); }

/* 7. Process Section (Timeline) */
.process-section { background-color: var(--color-bg); }
.process-timeline-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}
.timeline-line {
    position: absolute;
    left: 40px;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-border);
}
.timeline-line::after { /* The drawing part */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0; /* Animated by JS */
    background-color: var(--color-primary);
}
.timeline-step {
    position: relative;
    padding-left: 100px;
    margin-bottom: 60px;
}
.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 80px;
    height: 80px;
    background-color: var(--color-bg-alt);
    border: 4px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    transition: all var(--transition-med);
}
.timeline-step.is-visible .step-number {
    border-color: var(--color-primary);
    transform: scale(1.1);
}
.step-content h3 { margin-bottom: 10px; }

/* 8. Strategy Builder Section */
.strategy-builder-section { background-color: var(--color-bg-accent); }
.strategy-builder-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}
.strategy-builder {
    background: var(--color-bg-alt);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    min-height: 350px;
    position: relative;
    overflow: hidden;
}
.sb-step {
    position: absolute;
    top: 40px; left: 40px; right: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: all var(--transition-med);
}
.sb-step.active { opacity: 1; visibility: visible; transform: translateX(0); }
.sb-step h4 { margin-bottom: 24px; }
.sb-options { display: flex; flex-direction: column; gap: 15px; }
.sb-option {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    background-color: var(--color-bg);
    transition: all var(--transition-fast);
}
.sb-option:hover { border-color: var(--color-primary); background-color: #fff; }
#recommendation-text { margin-bottom: 20px; font-size: 1.1rem; }
.recommended-services { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.service-tag { background-color: var(--color-bg-accent); padding: 5px 12px; border-radius: 20px; font-weight: 500; }
.sb-buttons { display: flex; gap: 15px; align-items: center; margin-top: 20px; }
#sb-back-btn { background: none; border: none; cursor: pointer; color: var(--color-text-muted); font-weight: 500; }
#sb-back-btn:hover { color: var(--color-primary); }

/* 9. Results Section (Horizontal Scroll) */
.results-section { padding: 100px 0; overflow: hidden; }
.results-scroller-wrapper { height: 400px; } /* Must have a fixed height for pinning */
.results-scroller {
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 20px;
}
.result-card {
    width: 380px;
    height: 360px;
    border-radius: var(--border-radius);
    background-color: var(--color-secondary);
    color: #fff;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.result-card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    opacity: 0.1;
    transition: opacity var(--transition-med);
}
/* Dummy backgrounds */
.result-card:nth-child(1) .result-card-bg { background-image: url('https://via.placeholder.com/400x400/FF6B00/FFFFFF?text=Result+1'); }
.result-card:nth-child(2) .result-card-bg { background-image: url('https://via.placeholder.com/400x400/1A2B48/FFFFFF?text=Result+2'); }
.result-card:nth-child(3) .result-card-bg { background-image: url('https://via.placeholder.com/400x400/FF6B00/FFFFFF?text=Result+3'); }
.result-card:nth-child(4) .result-card-bg { background-image: url('https://via.placeholder.com/400x400/1A2B48/FFFFFF?text=Result+4'); }
.result-card:nth-child(5) .result-card-bg { background-image: url('https://via.placeholder.com/400x400/FF6B00/FFFFFF?text=Result+5'); }

.result-card:hover .result-card-bg { opacity: 0.2; }
.result-card-content { position: relative; }
.result-client { display: block; margin-bottom: 10px; font-weight: 500; color: var(--color-primary); }
.result-metric { font-size: 3.5rem; color: #fff; margin-bottom: 5px; }
.result-description { color: rgba(255, 255, 255, 0.8); font-size: 1.1rem; }

/* 10. Testimonials Section */
.testimonials-section { background-color: var(--color-bg-alt); }
.testimonial-slider-container { position: relative; max-width: 800px; margin: 0 auto; }
.testimonial-slider { display: flex; overflow: hidden; }
.testimonial-slide {
    flex: 0 0 100%;
    padding: 40px;
    text-align: center;
    transition: transform var(--transition-med);
}
.testimonial-slide blockquote {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 24px;
}
.testimonial-slide cite {
    font-style: normal;
    font-weight: 600;
    color: var(--color-primary);
}
.testimonial-controls { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }
.arrow-btn {
    background-color: var(--color-bg-accent);
    border: 1px solid var(--color-border);
    width: 50px; height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.arrow-btn:hover { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* 11. CTA Section */
.cta-section { padding: 80px 0; background-color: var(--color-secondary); }
.cta-container { text-align: center; }
.cta-content { max-width: 700px; margin: 0 auto; }
.cta-title { color: #fff; margin-bottom: 20px; }
.cta-subtitle { color: rgba(255, 255, 255, 0.8); margin-bottom: 30px; }

/* 12. Footer */
.site-footer {
    background-color: var(--color-bg-alt);
    padding-top: 80px;
    border-top: 1px solid var(--color-border);
}
.footer-main { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; margin-bottom: 40px; }
.footer-brand .footer-logo { height: 60px; filter: brightness(0); margin-bottom: 20px; }
.footer-brand p { font-size: 0.9rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--color-text-muted); }
.footer-col a:hover { color: var(--color-primary); }
.footer-contact-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}
.footer-contact-bar a:hover { color: var(--color-primary); }
.footer-bottom { text-align: center; padding: 20px 0; font-size: 0.9rem; }

/* 13. Live Chat Widget */
.live-chat-widget { position: fixed; bottom: 20px; right: 20px; z-index: 998; }
.chat-bubble {
    width: 60px; height: 60px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow);
    transition: transform var(--transition-fast);
}
.chat-bubble:hover { transform: scale(1.1); }
.chat-bubble svg { width: 30px; height: 30px; fill: currentColor; }
.chat-window {
    position: absolute; bottom: 80px; right: 0;
    width: 350px;
    background: var(--color-bg-alt);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(10px) scale(0.95);
    opacity: 0; visibility: hidden;
    transition: all var(--transition-med);
    transform-origin: bottom right;
}
.live-chat-widget.open .chat-window { transform: translateY(0) scale(1); opacity: 1; visibility: visible; }
.chat-header { background: var(--color-secondary); color: #fff; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.close-chat { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.chat-body { padding: 20px; font-size: 0.9rem; }
.chat-footer { display: flex; padding: 10px; border-top: 1px solid var(--color-border); }
.chat-footer input { flex-grow: 1; border: none; background: transparent; padding: 8px; }
.chat-footer input:focus { outline: none; }
.chat-footer button {
    background: var(--color-primary); color: #fff;
    border: none; padding: 8px 15px;
    border-radius: var(--border-radius); cursor: pointer;
}

/* 14. Animations & Keyframes */
.animate-on-load {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}
.hero-content .animate-on-load:nth-child(1) { animation-delay: 0.2s; }
.hero-content .animate-on-load:nth-child(2) { animation-delay: 0.4s; }
.hero-content .animate-on-load:nth-child(3) { animation-delay: 0.6s; }
.hero-content .animate-on-load:nth-child(4) { animation-delay: 0.8s; }

.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.fade-in-left { transform: translateX(-50px); }
.animate-on-scroll.fade-in-right { transform: translateX(50px); }
.animate-on-scroll.is-visible { opacity: 1; transform: translate(0, 0); }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* 15. Page-Specific Styles */
.contact-page-section, .legal-page-main {
    padding: calc(var(--header-height) + 80px) 0 80px;
}
/* Styles for Contact and Legal pages would go here, inheriting the new theme */
.legal-page-main .container { background: #fff; padding: 50px; border-radius: 12px; max-width: 900px; box-shadow: var(--shadow); }
.legal-page-main h1 { color: var(--color-primary); }

/* 16. Responsive Design */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-content { order: 2; }
    .hero-3d-card-wrapper { order: 1; margin-bottom: 40px; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .strategy-builder-wrapper { grid-template-columns: 1fr; }
    .strategy-intro { text-align: center; }
    .footer-main { grid-template-columns: 1fr; }
    .footer-brand { text-align: center; }
    .footer-brand .footer-logo { margin: 0 auto 20px; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .header-actions .btn { display: none; }
    .menu-toggle { display: block; }
    body.nav-open { overflow: hidden; }

    .services-grid { grid-template-columns: 1fr; }
    .process-timeline-wrapper { padding: 0 20px; }
    .timeline-line { left: 20px; }
    .timeline-step { padding-left: 60px; }
    .step-number { width: 40px; height: 40px; left: 0; font-size: 1rem; border-width: 2px; }
    .results-section { display: none; } /* Horizontal scroll is not ideal on mobile; hide or replace with vertical stack */
    .footer-links { grid-template-columns: 1fr 1fr; }
    .footer-contact-bar { flex-direction: column; align-items: center; text-align: center; }
}