/* Basic Reset and Variables (Keep existing) */
:root {
  --dark-blue-bg: #0a0f2b;
  --light-text: #e0e0e0;
  --grey-text: #a0a0a0;
  --primary-blue: #007bff;
  --primary-purple: #8a2be2;
  --primary-green: #3ddc84;
  --card-bg: #1a1f3c;
  --border-color: rgba(255, 255, 255, 0.1);
  --whatsapp-green: #25d366; /* New */
  --whatsapp-bg: #ece5dd; /* New */
  --whatsapp-bubble-sent: #dcf8c6; /* New */
  --whatsapp-bubble-received: #ffffff; /* New */
  --whatsapp-font-color: #000000;
}

/* (Keep existing global styles like *, body, .container) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(
      at 50% 0%,
      rgba(20, 30, 70, 0.8) 0%,
      var(--dark-blue-bg) 60%
    ),
    linear-gradient(to bottom, var(--dark-blue-bg) 0%, #05081a 100%);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.navbar {
  background: rgba(10, 15, 43, 0.7); /* Slightly transparent */
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(5px); /* Frosted glass effect */
  border-bottom: 1px solid var(--border-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* Navbar (Keep existing, adjusted nav links for new content) */
.navbar .nav-links a {
  color: var(--grey-text);
  text-decoration: none;
  margin-left: 30px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
  color: var(--light-text);
}

/* Hero Section (Adjust buttons) */
.hero-section {
  text-align: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section h1 {
  font-size: 60px;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
  position: relative;
  display: inline-block;
}

/* Hero H1 underline (Keep existing) */
.hero-section h1:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  width: 60%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    #ff00ff,
    #00ffff,
    transparent
  );
  border-radius: 2px;
}

.hero-section p {
  font-size: 18px;
  color: var(--grey-text);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.email-signup {
  /* Renamed from previous email-signup to be more generic for CTA buttons */
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.cta-button {
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-decoration: none; /* In case you use 'a' tag for buttons */
  display: inline-block; /* Ensure padding works correctly */
}

.cta-button.primary-cta {
  background: linear-gradient(90deg, #8a2be2, #ff00ff); /* Purple to magenta */
  color: white;
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.cta-button.primary-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(138, 43, 226, 0.6);
}

.cta-button.secondary-cta {
  background: transparent;
  color: var(--light-text);
  border: 1px solid var(--border-color);
}

.cta-button.secondary-cta:hover {
  background-color: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Problem Section */
.problem-section {
  text-align: center;
  padding: 60px 0;
  background-color: var(--dark-blue-bg); /* Ensure consistent background */
}

.problem-section h2 {
  font-size: 38px;
  font-weight: 700;
  color: white;
  margin-bottom: 15px;
}

.problem-section p {
  font-size: 18px;
  color: var(--grey-text);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* WhatsApp Magic Section */
.whatsapp-magic-section {
  padding: 80px 0;
  text-align: center;
}

.whatsapp-magic-section h2 {
  font-size: 38px;
  font-weight: 700;
  color: white;
  margin-bottom: 50px;
}

.whatsapp-mockup {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.phone-frame {
  width: 380px; /* Standard phone width */
  height: 700px; /* Standard phone height */
  background: #000;
  border-radius: 40px;
  padding: 15px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 8px #333; /* Outer shadow and bezel */
  position: relative;
}

.phone-screen {
  background: var(--whatsapp-bg);
  width: 100%;
  height: 100%;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chat-header {
  background-color: var(--whatsapp-green);
  color: white;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  z-index: 1;
}

.chat-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #eee;
}

.chat-header .agent-name {
  flex-grow: 1;
}

.chat-messages {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: url("https://user-images.githubusercontent.com/15075759/28719142-86dc0f70-74b1-11e7-92a2-674dc2079234.png"); /* WhatsApp background pattern */
  background-size: 15%;
  background-repeat: repeat;
  background-color: var(--whatsapp-bg);
  color: var(--whatsapp-font-color);
}

.message-bubble {
  padding: 10px 12px;
  border-radius: 8px;
  max-width: 80%;
  font-size: 15px;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.message-bubble.sent {
  background-color: var(--whatsapp-bubble-sent);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.message-bubble.received {
  background-color: var(--whatsapp-bubble-received);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-input {
  background-color: #f0f0f0;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ccc;
  z-index: 1;
}

.chat-input input {
  flex-grow: 1;
  padding: 8px 15px;
  border-radius: 20px;
  border: none;
  background-color: white;
  font-size: 15px;
  outline: none;
}

.chat-input i {
  color: var(--grey-text);
  font-size: 20px;
  cursor: pointer;
}

/* Features Section (Adjust to match new structure) */
.features-section {
  padding: 80px 0;
}

.features-section h2 {
  text-align: center;
  font-size: 38px;
  font-weight: 700;
  color: white;
  margin-bottom: 50px;
}

.feature-cards-grid {
  /* New class for the grid wrapper */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  text-align: left;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.feature-card .icon {
  width: 50px; /* Slightly larger icons */
  height: 50px;
  border-radius: 10px; /* Slightly more rounded */
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px; /* Icon size */
  color: white;
}

.feature-card .icon.blue-bg {
  background: linear-gradient(45deg, #007bff, #00c6ff);
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.feature-card .icon.purple-bg {
  background: linear-gradient(45deg, #8a2be2, #c77dff);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
}

.feature-card .icon.green-bg {
  background: linear-gradient(45deg, #3ddc84, #86e3c0);
  box-shadow: 0 0 15px rgba(61, 220, 132, 0.5);
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 15px;
  color: var(--grey-text);
}

/* Key Functions Section */
.key-functions-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--dark-blue-bg); /* Match problem section bg */
}

.key-functions-section h2 {
  font-size: 38px;
  font-weight: 700;
  color: white;
  margin-bottom: 50px;
}

.functions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}

.function-list h3 {
  font-size: 28px;
  font-weight: 600;
  color: white;
  margin-bottom: 25px;
  text-align: center;
}

.function-list ul {
  list-style: none;
  padding: 0;
}

.function-list li {
  display: flex;
  align-items: flex-start; /* Align checkmark to top of text */
  margin-bottom: 15px;
  font-size: 17px;
  color: var(--grey-text);
}

.function-list li i {
  color: var(--whatsapp-green); /* Use a distinct color for checkmarks */
  margin-right: 15px;
  font-size: 20px;
  position: relative;
  top: 2px; /* Slight adjustment for alignment */
}

/* Final CTA Section (Reusing existing cta-section styles) */
.cta-section.final-cta {
  padding: 100px 0;
}

.cta-section.final-cta h2 {
  font-size: 44px; /* Slightly larger */
  margin-bottom: 20px;
}

.cta-section.final-cta p {
  font-size: 20px; /* Slightly larger */
  margin-bottom: 40px;
  max-width: 920px;
}
.cta-section.final-cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Footer (Keep existing) */
.footer {
  background-color: #05081a;
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer .logo {
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.footer .logo svg {
  fill: white;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--grey-text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--light-text);
}

.footer-links span {
  color: var(--grey-text);
  font-size: 14px;
}
.language-toggle {
  margin-left: 30px;
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-weight: 500;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

.language-toggle:hover {
  background-color: var(--card-bg); /* Use the card background on hover */
  border-color: var(--light-text); /* Make the border brighter on hover */
  color: var(--light-text);
}

.nav-links a.active-link {
  color: white; /* Color del texto activo */
  border-bottom: 2px solid var(--primary-blue); /* Subrayado azul por defecto */
  padding-bottom: 4px; /* Un poco de espacio para que el subrayado respire */
  border-bottom-color: var(--page-primary-color);
  color: var(--page-primary-color);
}

.logo-image-container {
  width: 180px;
  height: 54px;
  background-image: url("assets/opsen-logo-vectors-white.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 15px;
  }
  .navbar .nav-links a {
    margin: 0;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nav-links a {
    margin: 0;
    font-size: 14px;
  }
  .hero-section h1,
  .problem-section h2,
  .whatsapp-magic-section h2,
  .features-section h2,
  .key-functions-section h2,
  .cta-section.final-cta h2 {
    font-size: 40px;
  }
  .hero-section p,
  .problem-section p,
  .cta-section.final-cta p {
    font-size: 16px;
  }
  .email-signup {
    flex-direction: column;
    align-items: center;
  }
  .cta-button {
    width: 100%;
    max-width: 300px;
  }
  .feature-cards-grid {
    grid-template-columns: 1fr;
  }
  .functions-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .function-list h3 {
    text-align: left;
  }
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
  .phone-frame {
    width: 320px;
    height: 600px;
  }
  .chat-header,
  .chat-input {
    padding: 8px 10px;
    font-size: 16px;
  }
  .chat-header .avatar {
    width: 35px;
    height: 35px;
  }
  .message-bubble {
    font-size: 14px;
  }
  .logo-image-container {
    width: 150px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .hero-section h1,
  .problem-section h2,
  .whatsapp-magic-section h2,
  .features-section h2,
  .key-functions-section h2,
  .cta-section.final-cta h2 {
    font-size: 32px;
  }
  .hero-section h1:after {
    width: 80%;
  }
  .phone-frame {
    width: 100%;
    height: 550px;
    max-width: 300px; /* Constrain width on very small screens */
  }
}
