/* ===================================================================
   Digital Marketing Agency - Modern Gradient Theme
   Table of Contents:
   1.  Variables & Global Styles
   2.  Typography
   3.  Layout & Grid
   4.  Buttons & Forms
   5.  Header & Navigation
   6.  Footer
   7.  Hero Section
   8.  Services Section
   9.  Industry Tabs Section
   10. Reports Section (KPIs)
   11. Testimonials Section
   12. Interactive Estimator
   13. Live Chat Widget
   14. Contact Page Styles
   15. Legal Page Styles
   16. Responsive Media Queries
   =================================================================== */

/* ===================================================================
   1. Variables & Global Styles
   =================================================================== */
:root {
  --color-bg: #0F052B;
  /* Deep purple background */
  --color-surface: #1B1046;
  /* Lighter purple for cards/surfaces */
  --color-surface-transparent: rgba(27, 16, 70, 0.5);
  /* For glass effect */
  --color-primary-gradient: linear-gradient(90deg, #8E2DE2 0%, #4A00E0 100%);
  /* Main gradient */
  --color-accent-gradient: linear-gradient(90deg, #00F2FE 0%, #4FACF7 100%);
  /* Accent gradient */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #C0B7E8;
  --color-border: #3A2D78;
  --font-primary: 'Helvetica Neue', Arial, sans-serif;
  --container-width: 1200px;
  --section-padding: 6rem;
  --card-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  font-family: var(--font-primary);
  color: var(--color-text-secondary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
   2. Typography
   =================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1.5em;
  max-width: 70ch;
}

a {
  color: var(--color-text-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  padding-left: 20px;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.125rem;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================================================
   3. Layout & Grid
   =================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding) 0;
}

/* ===================================================================
   4. Buttons & Forms
   =================================================================== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-weight: 700;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary-gradient);
  color: var(--color-text-primary);
}

.btn-primary:hover {
  text-decoration: none;
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

.btn-secondary:hover {
  background-color: var(--color-text-primary);
  color: var(--color-bg);
  text-decoration: none;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  border-radius: 8px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #8E2DE2;
}

textarea {
  resize: vertical;
}

/* ===================================================================
   5. Header & Navigation
   =================================================================== */
.site-header {
  background-color: rgba(15, 5, 43, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  max-height: 40px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-menu a {
  font-weight: 600;
}

.header-cta {
  display: block;
  margin-left: 2.5rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px 0;
  background-color: var(--color-text-primary);
}

/* ===================================================================
   6. Footer
   =================================================================== */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  max-width: 120px;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--color-text-secondary);
  max-width: 25ch;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  color: transparent;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.75rem;
}

.footer-column a:hover {
  color: white;
  text-decoration: none;
}

.footer-column address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-column address span {
  display: block;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
}

/* ===================================================================
   7. Hero Section
   =================================================================== */
.hero-section {
  position: relative;
  padding: 16rem 0;
  text-align: center;
  overflow: hidden;
}

.hero-gradient-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 800px;
  min-height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(74, 0, 224, 0.3) 0%, rgba(15, 5, 43, 0) 60%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
}

/* ===================================================================
   8. Services Section
   =================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.service-card {
  background-color: var(--color-surface-transparent);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 2rem;
  border-radius: var(--card-radius);
  text-align: center;
}

.card-icon {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--color-accent-gradient);
  color: var(--color-bg);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ===================================================================
   9. Industry Tabs Section
   =================================================================== */
.industry-section {
  background-color: var(--color-surface);
}

.industry-tabs-container {
  max-width: 900px;
  margin: 0 auto;
}

.industry-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.tab-link {
  padding: 1rem 2rem;
  border: none;
  background: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}

.tab-link.active {
  color: var(--color-text-primary);
  border-image: var(--color-primary-gradient) 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  text-align: center;
  padding: 1rem;
}

/* ===================================================================
   10. Reports Section (KPIs)
   =================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.kpi-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2rem;
  border-radius: var(--card-radius);
}

.kpi-label {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.kpi-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

.kpi-change {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
}

.kpi-change.positive {
  color: #2ECA7F;
}

.kpi-change.negative {
  color: #E94560;
}

/* ===================================================================
   11. Testimonials Section
   =================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.testimonial-card {
  background-color: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--card-radius);
  border-left: 5px solid;
  border-image: var(--color-primary-gradient) 1;
}

.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.author-name {
  display: block;
  color: white;
  font-weight: 700;
}

.author-title {
  display: block;
  font-size: 0.9rem;
}

/* ===================================================================
   12. Interactive Estimator
   =================================================================== */
.interactive-section {
  background-color: var(--color-surface);
}

.estimator-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background-color: var(--color-bg);
  padding: 3rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border);
}

.estimator-results {
  padding: 2rem;
  background-color: var(--color-surface);
  border-radius: var(--card-radius);
}

.estimator-results h4 {
  margin-bottom: 1.5rem;
}

.estimator-results p {
  font-size: 1.1rem;
}

/* ===================================================================
   13. Live Chat Widget
   =================================================================== */
.live-chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1001;
}

.chat-toggle-button {
  padding: 0.8rem 1.5rem;
  background: var(--color-accent-gradient);
  color: var(--color-bg);
  border: none;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.chat-window {
  display: none;
  width: 350px;
  height: 500px;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chat-window.open {
  display: flex;
}

.chat-header {
  background: var(--color-surface);
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header p {
  margin: 0;
  font-weight: bold;
  color: white;
}

.chat-close-button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.chat-body {
  flex-grow: 1;
  padding: 1rem;
}

.chat-message.agent {
  background: var(--color-surface);
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 12px 0;
  max-width: 80%;
}

.chat-input-area {
  display: flex;
  padding: 1rem;
  border-top: 1px solid var(--color-border);
}

.chat-input-area input {
  flex-grow: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  border-radius: 6px;
  color: white;
  margin-right: 0.5rem;
}

.chat-input-area button {
  padding: 0 1rem;
  background: var(--color-accent-gradient);
  border: none;
  border-radius: 6px;
  color: var(--color-bg);
  cursor: pointer;
  font-weight: bold;
}

/* ===================================================================
   14. Contact Page Styles
   =================================================================== */
.contact-page-section {
  padding-top: var(--section-padding);
}

.contact-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--color-surface);
  padding: 3rem;
  border-radius: var(--card-radius);
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ===================================================================
   15. Legal Page Styles
   =================================================================== */
.legal-page-section .container {
  max-width: 800px;
}

.legal-page-section h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.legal-page-section h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-page-section ul {
  list-style: disc;
}

/* ===================================================================
   16. Responsive Media Queries
   =================================================================== */
@media (max-width: 1024px) {
  .header-cta {
    display: none;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .estimator-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    font-size: 1.5rem;
  }

  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .services-grid,
  .kpi-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .footer-column {
    text-align: center;
  }

  .footer-column address,
  .footer-column .footer-logo {
    margin: 0 auto;
  }
}