/*
  Digital Marketing Agency CSS - Light Theme
  Version: 2.0
*/

/* ---------------------------------- */
/*          1. Base & Setup           */
/* ---------------------------------- */

/* --- CSS Variables (Theme) --- */
:root {
  --color-primary: #0057ff; /* Professional Blue */
  --color-secondary: #00c49a; /* Vibrant Green */
  --color-background-light: #f8f9fa;
  --color-background-white: #ffffff;
  --color-text-dark: #212529;
  --color-text-light: #6c757d;
  --color-border: #dee2e6;
  --color-success: #198754;
  --color-error: #dc3545;

  --font-primary: 'Inter', sans-serif;
  --font-secondary: 'Roboto', sans-serif;

  --header-height: 80px;
  --border-radius: 6px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --box-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition-speed: 0.3s;
}

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500&display=swap');

/* --- Reset & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-background-white);
  color: var(--color-text-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-dark);
  font-weight: 600;
  line-height: 1.3;
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}
a:hover {
  color: var(--color-secondary);
}

ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Utility Classes --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-padding {
  padding: 100px 0;
}
.bg-light {
  background-color: var(--color-background-light);
}
.text-center {
  text-align: center;
}

.section-title {
  margin-bottom: 60px;
  max-width: 700px;
}
.section-title.text-center {
  margin-left: auto;
  margin-right: auto;
}

.section-title .subtitle {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-title h2 {
  margin-bottom: 15px;
}

/* ---------------------------------- */
/*         2. Header & Nav            */
/* ---------------------------------- */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--color-primary);
  transition: all var(--transition-speed) ease;
}
#main-header.scrolled {
  height: 70px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--color-background-white);
  font-weight: 700;
  font-size: 1.5rem;
}
.logo img {
  height: 50px;
  filter: brightness(0) invert(1);
  margin-right: 12px;
}

#main-nav ul {
  display: flex;
  gap: 35px;
}
#main-nav a {
  color: var(--color-background-white);
  font-weight: 500;
  position: relative;
  padding: 8px 0;
  opacity: 0.8;
  transition: opacity var(--transition-speed) ease;
}
#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width var(--transition-speed) ease;
}
#main-nav a:hover, #main-nav a.active {
  opacity: 1;
}
#main-nav a:hover::after, #main-nav a.active::after {
  width: 100%;
}

.cta-button {
  display: inline-block;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  transition: all var(--transition-speed) ease-in-out;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.cta-button.primary {
  background-color: var(--color-primary);
  color: var(--color-background-white);
}
.cta-button.primary:hover {
  background-color: #0045c4;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 87, 255, 0.3);
}
.cta-button.secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.cta-button.secondary:hover {
  background-color: var(--color-background-light);
  border-color: var(--color-primary);
}
.cta-button.header-cta {
  background-color: var(--color-secondary);
  color: var(--color-text-dark);
  padding: 10px 24px;
}
.cta-button.header-cta:hover {
  background-color: #00a680;
  transform: scale(1.05);
}
.cta-button.large {
  padding: 16px 40px;
  font-size: 1.1rem;
}

/* --- Mobile Menu Toggle --- */
#menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  width: 30px;
  height: 22px;
  position: relative;
}
#menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-background-white);
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition: all var(--transition-speed) ease;
}
#menu-toggle span:nth-child(1) { top: 0; }
#menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
#menu-toggle span:nth-child(3) { bottom: 0; }

body.nav-open #menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
}
body.nav-open #menu-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open #menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
  top: 50%;
}

/* ---------------------------------- */
/*         3. Hero Section            */
/* ---------------------------------- */
#hero {
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 80px;
  overflow: hidden;
}
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content h1 {
  margin-bottom: 1.5rem;
}
.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 550px;
}
.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.hero-image {
  position: relative;
}
.hero-image img {
  animation: float-animation 6s ease-in-out infinite;
}

@keyframes float-animation {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}

/* ---------------------------------- */
/*        4. Services Section         */
/* ---------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.service-card {
  background-color: var(--color-background-white);
  padding: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  text-align: center;
  transition: all var(--transition-speed) ease;
  position: relative;
  border-bottom: 3px solid transparent;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-hover);
  border-color: transparent;
  border-bottom-color: var(--color-secondary);
}
.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 25px;
  background-color: #e6f0ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}
.service-card h3 {
  margin-bottom: 15px;
}

/* ---------------------------------- */
/*        5. Why Us Section           */
/* ---------------------------------- */
.why-us-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.why-us-content .section-title {
  margin-bottom: 30px;
}
.why-us-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.feature-item {
  background: var(--color-background-white);
  padding: 25px;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}
.feature-item h4 {
  margin-bottom: 10px;
  color: var(--color-primary);
}

/* ---------------------------------- */
/*     6. Stats Counter Section       */
/* ---------------------------------- */
#stats {
  background: var(--color-primary);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-item h3 {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-background-white);
  margin-bottom: 5px;
}
.stat-item h3::after {
  content: '%';
}
.stat-item:nth-child(2) h3::after,
.stat-item:nth-child(4) h3::after {
  content: '+';
}
.stat-item:nth-child(1) h3::after { content: '%'; }
.stat-item:nth-child(3) h3::after { content: 'x'; }


.stat-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
}

/* ---------------------------------- */
/*    7. Industry Expertise Section   */
/* ---------------------------------- */
.expertise-tabs {
  max-width: 900px;
  margin: 0 auto;
}
.tab-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  background: var(--color-background-white);
  border-radius: 50px;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tab-button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  transition: all var(--transition-speed);
}
.tab-button.active {
  background-color: var(--color-primary);
  color: var(--color-background-white);
  box-shadow: 0 4px 10px rgba(0, 87, 255, 0.2);
}
.tab-content {
  display: none;
  background-color: var(--color-background-white);
  padding: 40px;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  animation: fadeIn 0.5s ease-in-out;
}
.tab-content.active {
  display: block;
}
.tab-content h3 {
  color: var(--color-primary);
  margin-bottom: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------- */
/*     8. ROI Calculator Section      */
/* ---------------------------------- */
.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background-color: var(--color-background-light);
  padding: 50px;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}
#roi-form .form-group {
  margin-bottom: 25px;
}
#roi-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text-dark);
}
#roi-form input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-primary);
}
#roi-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.1);
}
.results-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.result-box {
  background-color: var(--color-background-white);
  padding: 25px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 1px solid var(--color-border);
}
.result-box h4 {
  color: var(--color-text-light);
  font-weight: 500;
  margin-bottom: 10px;
}
.result-box p {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
}
.result-box.highlighted {
  border-color: var(--color-secondary);
  box-shadow: 0 4px 15px rgba(0, 196, 154, 0.1);
}
.result-box.highlighted p {
  color: var(--color-secondary);
}
.result-box small {
  font-size: 0.9rem;
}

/* ---------------------------------- */
/*         9. CTA Section             */
/* ---------------------------------- */
.cta-container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.cta-container h2 {
  margin-bottom: 20px;
}
.cta-container p {
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* ---------------------------------- */
/*        10. Footer Section          */
/* ---------------------------------- */
#main-footer {
  background-color: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 60px;
}
.footer-column .logo {
  margin-bottom: 20px;
}
.footer-column h4 {
  color: var(--color-background-white);
  margin-bottom: 20px;
  font-size: 1.1rem;
}
.footer-column ul li {
  margin-bottom: 12px;
}
.footer-column ul a, .footer-column address a {
  color: rgba(255, 255, 255, 0.7);
}
.footer-column ul a:hover, .footer-column address a:hover {
  color: var(--color-background-white);
  padding-left: 5px;
}
.footer-column address p {
  margin-bottom: 10px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.legal-links a {
  color: rgba(255, 255, 255, 0.7);
  margin-left: 25px;
}
.legal-links a:hover {
  color: var(--color-background-white);
}

/* ---------------------------------- */
/*        11. Other Pages             */
/* ---------------------------------- */
/* --- Contact Page --- */
#contact-page {
  padding-top: calc(var(--header-height) + 100px);
}
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-top: 60px;
}
.contact-form-container {
  background-color: var(--color-background-light);
  padding: 40px;
  border-radius: var(--border-radius);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
#contact-form .form-group {
  margin-bottom: 20px;
}
#contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-text-dark);
}
#contact-form input,
#contact-form select,
#contact-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-primary);
}
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

#form-status {
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  display: none;
}
#form-status.success {
  background-color: #e8f5e9;
  color: var(--color-success);
  display: block;
}
#form-status.error {
  background-color: #fce4e4;
  color: var(--color-error);
  display: block;
}

.contact-info-container h3 {
  margin-bottom: 15px;
}
.contact-info-container p {
  margin-bottom: 30px;
}
.info-item {
  margin-bottom: 20px;
}
.info-item strong {
  display: block;
  color: var(--color-text-dark);
  margin-bottom: 5px;
}

/* --- Legal Pages --- */
.legal-page {
  padding-top: calc(var(--header-height) + 100px);
}
.legal-container {
  max-width: 800px;
}
.legal-container h1 {
  margin-bottom: 1rem;
}
.legal-container .intro {
  font-size: 1.15rem;
  color: var(--color-text-dark);
  margin-bottom: 2rem;
}
.legal-container h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

/* ---------------------------------- */
/*       12. Scroll Animations        */
/* ---------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in { transform: translateY(10px); }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }
.fade-in-up { transform: translateY(30px); }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }
.fade-in-left { transform: translateX(-30px); }
.fade-in-left.is-visible { opacity: 1; transform: translateX(0); }
.fade-in-right { transform: translateX(30px); }
.fade-in-right.is-visible { opacity: 1; transform: translateX(0); }

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ---------------------------------- */
/*       13. Responsiveness           */
/* ---------------------------------- */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-content p { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-image { display: none; } /* Hide complex graphic on smaller screens */

  .why-us-container { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .calculator-container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-column.about { grid-column: 1 / -1; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .section-padding { padding: 80px 0; }
  
  /* --- Mobile Navigation --- */
  #main-nav {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right var(--transition-speed) ease;
    display: flex;
    padding-bottom: var(--header-height);
  }
  body.nav-open #main-nav {
    right: 0;
  }
  #main-nav ul {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
  #main-nav a {
    font-size: 1.5rem;
    opacity: 1;
  }
  .header-cta { display: none; }
  #menu-toggle { display: block; }
  
  .services-grid { grid-template-columns: 1fr; }
  .why-us-grid { grid-template-columns: 1fr; }
  .tab-buttons { flex-direction: column; border-radius: var(--border-radius); }
  .tab-button { border-radius: var(--border-radius); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { flex-direction: column; }
  .legal-links { margin-top: 15px; }
  .legal-links a { margin: 0 10px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item:not(:last-child) { margin-bottom: 20px; }
  .calculator-container, .contact-form-container { padding: 30px; }
  .tab-content { padding: 30px; }
}