/* Base Styles */
:root {
  --black: #000;
  --white: #fff;
  --dark-gray: #222;
  --gray: #888;
  --light-gray: #ddd;
  --font-primary: 'Montserrat', sans-serif;
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--white);
  color: var(--black);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Cursor Follower */
.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
}

.cursor-follower.hover {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.3);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  z-index: 100;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);  /* Solid white background, always visible
  /*transition: background-color var(--transition-fast), padding var(--transition-fast);*/
}

/*.header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 16px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(50px);
}*/

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.main-nav ul {
  display: flex;
}

.main-nav li {
  margin-left: 32px;
}

.main-nav a {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--black);
  transition: width var(--transition-fast);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--black);
  margin-bottom: 4px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* NEW */
/* Estilos para el Submenú */
.nav-menu .nav-item {
  position: relative; /* Establece el contexto para el posicionamiento absoluto del submenú */
}

.nav-menu .submenu {
  display: none; /* Oculta el submenú por defecto */
  position: absolute;
  top: 100%; /* Coloca el submenú debajo del elemento de menú principal */
  left: 0;
  background-color: #fff; /* Fondo blanco para el submenú */
  padding: 10px 20px;
  border: 1px solid #ddd; /* Borde opcional para el submenú */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Sombra opcional para el submenú */
  z-index: 10; /* Asegura que el submenú esté por encima de otros elementos */
  width: 250px; /* Define el ancho del submenú */
  border-radius: 4px;
}

.nav-menu .nav-item:hover .submenu {
  display: block; /* Muestra el submenú cuando se pasa el ratón por encima del elemento de menú principal */
}

.nav-menu .submenu li {
  margin-bottom: 8px; /* Espacio entre los elementos del submenú */
}

.nav-menu .submenu a {
  color: #333; /* Color del texto del submenú */
  font-size: 14px;
  display: block; /* Hace que el enlace ocupe todo el ancho del li */
  padding: 5px 0;
}

.nav-menu .submenu a:hover {
  color: #007bff; /* Cambia el color del texto al pasar el ratón */
}

/* NEW */

/* Hero Section */
.hero, .page-hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero {
  height: 50vh;
}

.hero::before, .page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 96px;
  font-weight: 700;
  letter-spacing: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
  line-height: 1;
}

.page-hero h1 {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.hero h2 {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.8;
}

/* Text Reveal Animation */
.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  animation: revealText 1s forwards;
}

@keyframes revealText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Architecture Section */
.architecture {
  padding: 100px 0;
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--black);
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-card {
  height: 300px;
  perspective: 1000px;
}

.card-inner {
  position: relative;
  text-align: center;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.section-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  border: 1px solid var(--black);
}

.card-front {
  background-color: var(--white);
  color: var(--black);
}

.card-back {
  background-color: var(--black);
  color: var(--white);
  transform: rotateY(180deg);
}

.card-front h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.icon {
  font-size: 24px;
  margin-top: 16px;
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.section-card:hover .icon {
  transform: rotate(90deg);
}

/* Team Section */
.team {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.team-member {
  text-align: center;
}

.member-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background-color: #ccc;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}


.team-member:hover .member-photo {
  transform: scale(1.05);
}

.team-member h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.team-member p {
  font-size: 14px;
  color: var(--gray);
}

/* Content Section Styles */
.content-section {
  padding: 80px 0;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.section-intro {
  margin-bottom: 60px;
  text-align: center;
}

.section-intro h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.content-block {
  margin-bottom: 60px;
}

.content-block h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.content-block h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--black);
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 24px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

.data-table th {
  background-color: var(--black);
  color: var(--white);
  font-weight: 600;
}

.data-table tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Charts */
.chart-container {
  margin: 32px 0;
}

.chart {
  width: 100%;
  display: flex;
  height: 40px;
  overflow: hidden;
  border-radius: 4px;
}

.chart-segment {
  position: relative;
  height: 100%;
  background-color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-segment:nth-child(2) {
  background-color: var(--dark-gray);
}

.chart-segment:nth-child(3) {
  background-color: var(--gray);
}

.chart-segment:nth-child(4) {
  background-color: var(--light-gray);
  color: var(--black);
}

.segment-label {
  font-size: 12px;
  color: var(--white);
  white-space: nowrap;
}

/* Value Proposition */
.value-proposition {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.value-card {
  padding: 24px;
  border: 1px solid var(--light-gray);
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.value-icon {
  font-size: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.value-card h4 {
  font-size: 18px;
  margin-bottom: 12px;
}

/* Brand Elements */
.brand-elements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.brand-element {
  padding: 20px;
  border: 1px solid var(--light-gray);
}

.brand-element h4 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* Social Platforms */
.social-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.social-platform {
  padding: 24px;
  border: 1px solid var(--light-gray);
  text-align: center;
  transition: transform var(--transition-fast);
}

.social-platform:hover {
  transform: translateY(-5px);
}

.platform-icon {
  font-size: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

/* Mockups */
.website-mockup, .email-mockup {
  margin: 32px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mockup-screen {
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
}

.mockup-header {
  height: 40px;
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
}

.mockup-content {
  height: 300px;
  background-color: var(--white);
}

.email-header {
  height: 60px;
  background-color: var(--black);
}

.email-content {
  height: 200px;
  background-color: var(--white);
}

.email-footer {
  height: 40px;
  background-color: var(--light-gray);
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.metric-card {
  padding: 24px;
  border: 1px solid var(--light-gray);
  text-align: center;
  transition: transform var(--transition-fast);
}

.metric-card:hover {
  transform: scale(1.03);
}

.metric-card h4 {
  font-size: 16px;
  margin-bottom: 12px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
}

/* Financial Charts */
.financial-chart {
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  margin: 32px 0;
}

.chart-bar {
  width: 60px;
  background-color: var(--black);
  position: relative;
  transition: height var(--transition-slow);
}

.bar-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  white-space: nowrap;
}

.line-chart {
  height: 300px;
  position: relative;
  margin: 40px 0;
  border-bottom: 2px solid var(--black);
  border-left: 2px solid var(--black);
}

.chart-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.chart-point {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--black);
  position: absolute;
  transform: translate(-50%, 50%);
}

.chart-point::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background-color: var(--black);
  transform-origin: left;
  transform: translateY(-50%);
}

.chart-x-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.chart-x-axis span {
  font-size: 14px;
}

/* Metrics Table */
.metrics-table {
  margin: 32px 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--light-gray);
}

.metric-name {
  font-weight: 600;
}

/* Scenarios */
.scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.scenario {
  padding: 24px;
  border: 1px solid var(--light-gray);
}

.scenario h4 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* Footer */
footer {
  background-color: var(--black);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Animation for scroll reveal */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* New styles for Market Study page */
.pestel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.pestel-card {
  padding: 24px;
  border: 1px solid var(--light-gray);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pestel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.pestel-card h4 {
  font-size: 20px;
  margin-bottom: 16px;
  font-weight: 600;
}

.pestel-card ul {
  list-style: none;
  padding: 0;
}

.pestel-card li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.porter-analysis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.porter-card {
  padding: 24px;
  border: 1px solid var(--light-gray);
  transition: transform var(--transition-fast);
}

.porter-card:hover {
  transform: translateY(-5px);
}

.porter-card h4 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

.sector-trends {
  margin: 48px 0;
  text-align: center;
}

.growth-chart {
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 48px;
  margin: 32px 0;
}

.value-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.chain-element {
  padding: 24px;
  border: 1px solid var(--light-gray);
  transition: transform var(--transition-fast);
}

.chain-element:hover {
  transform: translateY(-5px);
}

.chain-element h4 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

.chain-element ul {
  list-style: none;
  padding: 0;
}

.chain-element li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.dofa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.dofa-card {
  padding: 24px;
  border: 1px solid var(--light-gray);
  transition: transform var(--transition-fast);
}

.dofa-card:hover {
  transform: scale(1.03);
}

.dofa-card h4 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

.dofa-card ul {
  list-style: none;
  padding: 0;
}

.dofa-card li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform var(--transition-medium);
    z-index: 99;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .main-nav li {
    margin: 16px 0;
  }

  .main-nav a {
    font-size: 18px;
  }

  .menu-toggle {
    display: flex;
    z-index: 100;
  }

  .hero h1 {
    font-size: 48px;
  }

  .page-hero h1 {
    font-size: 36px;
  }

  .hero h2 {
    font-size: 18px;
  }

  .section-title {
    font-size: 28px;
  }

  .content-block h3 {
    font-size: 20px;
  }

  .team-grid, .sections-grid {
    gap: 24px;
  }

  .member-photo {
    width: 150px;
    height: 150px;
  }
}

.social-icons {
  text-align: center;
  margin-top: 20px;
}

.social-icons a {
  margin: 0 10px;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #868686; /* or your brand color */
}



@media only screen and (max-width: 600px) {
  .modal-content {
    max-width: 95%;
  }

  .close {
    font-size: 28px;
    right: 20px;
  }
}


@media (max-width: 480px) {
  .hero h1 {
    font-size: 36px;
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .hero h2 {
    font-size: 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}


/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px;
  position: relative;
  border-radius: 5px;
}

/* The Close Button */
.close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}


/* Budget */
.budget-phase {
  margin-bottom: 20px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
}

.phase-header {
  padding: 15px;
  background-color: #f9f9f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phase-header h4 {
  margin: 0;
  font-size: 18px;
}

.phase-total {
  margin: 0;
  font-size: 16px;
  color: var(--gray);
}

.phase-details {
  padding: 15px;
  background-color: var(--white);
}

.budget-total {
  margin-top: 30px;
  padding: 20px;
  border: 2px solid var(--black);
  border-radius: 8px;
  text-align: center;
}

.budget-total h4 {
  margin: 0;
  font-size: 20px;
  margin-bottom: 10px;
}

.budget-total p {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}


/* Funnel stuff */

.funnel-display-container {
  display: flex; /* Use flexbox for side-by-side layout */
  justify-content: space-between; /* Space them out evenly */
  width: 100%; /* Take up the full width */
}

.funnel-container {
  width: 48%; /* Adjust as needed, less than 50% to allow for spacing */
  max-width: none; /* Override any previous max-width */
  display: grid;
  grid-template-columns: 1fr; /* Single column for funnel and hover boxes */
  grid-template-rows: repeat(auto-fit, minmax(auto, auto)); /* Auto rows */
  gap: 5px;
  position: relative;
  margin-bottom: 20px; /* Add some spacing below each funnel */
}

.funnel-title {
  /* Otros estilos */
  font-size: 20px/* algún valor */;
  min-height: 3em; /* Ajusta este valor según la altura que necesites */
  display: flex; /* Para centrar verticalmente el texto dentro */
  align-items: center; /* Centra verticalmente */
  justify-content: center; /* Centra horizontalmente si es necesario */
}

.funnel-section {
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlideUp 0.5s forwards;
  transition: transform 0.2s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  position: relative; /* To position hover-box relative to it */
  z-index: 1; /* Ensure funnel is above hover box */
}

.funnel-section-1 {
  background-color: #ADD8E6;
  padding: 15px;
  width: 100%;
  grid-column: 1;
}

.funnel-section-2 {
  background-color: #ffffb7;
  padding: 12px;
  width: 80%;
  grid-column: 1;
}

.funnel-section-3 {
  background-color: #FFE5B4;
  padding: 10px;
  width: 60%;
  grid-column: 1;
}

.funnel-section-4 {
  background-color: #ffbaba;
  padding: 8px;
  width: 40%;
  grid-column: 1;
}

.funnel-section-5 {
  background-color: #b3ffb3;
  padding: 10px;
  width: 20%;
  grid-column: 1;
}

.funnel-section:hover {
  transform: scale(1.02);
  cursor: pointer; /* Indicate interactivity */
}

.funnel-text {
  font-size: 14px;
}

.hover-box {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  position: absolute;
  left: 110%; /* Position to the right initially */
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 2; /* Ensure it's above the funnel */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, left 0.3s ease-in-out;
  font-size: 12px;
  color: #333;
}

.hover-box.show {
  opacity: 1;
  visibility: visible;
  left: 120%; /* Move slightly further out when shown */
}

.centered-funnel {
  text-align: center;
}

@keyframes fadeInSlideUp {
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* ---  RESPONSIVE FUNNEL STYLES  ---  */

/* ---  RESPONSIVE FUNNEL STYLES (REVISED)  ---  */

@media (max-width: 768px) {
  .funnel-display-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .funnel-container {
    width: 100%;
    margin-bottom: 30px;
  }

  .funnel-title {
    font-size: 18px;
    min-height: auto;
    text-align: center;
    padding: 10px;
  }

  /* Crucially, remove the !important from here. We'll handle width differently */
  .funnel-section {
    padding: 10px;
    font-size: 14px;
    margin-left: auto;   /* Keep auto margins for centering */
    margin-right: auto;
  }

  /* Define widths as percentages of the funnel container */
  .funnel-section-1 { width: 100%; }
  .funnel-section-2 { width: 80%; }
  .funnel-section-3 { width: 60%; }
  .funnel-section-4 { width: 40%; }
  .funnel-section-5 { width: 20%; }

  .funnel-text {
    font-size: 12px;
  }

  .hover-box {
    display: none;
  }
}

@media (max-width: 480px) {
  .funnel-title {
    font-size: 16px;
  }

  .funnel-text {
    font-size: 11px;
  }
}

/* --- TABLE STYLES (UPDATED FOR RESPONSIVENESS) --- */

.table-container {
  overflow-x: auto; /* Enable horizontal scrolling */
  margin: 24px 0;
  width: 100%; /* Ensure container takes full width */
}

.data-table {
  width: 100%; /* Table takes full width of container */
  border-collapse: collapse;
  border: 1px solid var(--light-gray); /* Add a border to the table */
}

.data-table th,
.data-table td {
  padding: 8px 12px; /* Reduced padding for smaller screens */
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
  border-right: 1px solid var(--light-gray); /* Add right borders */
  white-space: nowrap; /* Prevent text wrapping */
  font-size: 12px; /* Slightly smaller font */
}

.data-table th {
  background-color: var(--black);
  color: var(--white);
  font-weight: 600;
}

.data-table tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ---  RESPONSIVE TABLE STYLES  ---  */

@media (max-width: 768px) {
  .data-table th,
  .data-table td {
    padding: 6px 8px; /* Further reduce padding on smaller screens */
    font-size: 10px; /* Even smaller font */
  }

  /* Optional:  If you want to try stacking table rows (less ideal for this data) */
  /*
  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--gray);
  }

  .data-table td {
    display: block;
    text-align: right;
    border-bottom: none;
    position: relative;
    padding-left: 50%;
  }

  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    text-align: left;
    font-weight: bold;
  }

  .data-table th,
  .data-table td {
    box-sizing: border-box;
  }
  */
}

@media (max-width: 480px) {
  .data-table th,
  .data-table td {
    font-size: 9px; /* Smallest font size */
  }
}