/* Base styles and variables */
:root {
  --primary-bg: #f2f5c8;
  --accent-orange: #ff6b35;
  --accent-indigo: #3f3d56;
  --text-color: #2e2e2e;
  --ui-white: #ffffff;
  --ui-light-gray: #d9d9d9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}

section[id] {
  scroll-margin-top: 40px;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-orange);
}

ul {
  list-style: none;
}

button,
.btn {
  cursor: pointer;
  border: none;
  background-color: var(--accent-orange);
  color: var(--ui-white);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: "Montserrat", sans-serif;
}

button:hover,
.btn:hover {
  background-color: var(--accent-indigo);
  transform: translateY(-2px);
}

h1,
h2,
h3,
h4 {
  margin-bottom: 15px;
  font-weight: 700;
}

p {
  margin-bottom: 15px;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent-orange);
}

section {
  padding: 80px 0;
  position: relative;
}

/* Header and Navigation */
header {
  background-color: var(--ui-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-indigo);
  margin: 0;
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  font-weight: 500;
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-orange);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  height: 20px;
  width: 26px;
  cursor: pointer;
}

.menu-icon span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .menu-icon {
    display: flex;
    z-index: 101;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--ui-white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 80px 30px;
    transition: right 0.3s ease;
    z-index: 100;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul li {
    margin: 10px 0;
    width: 100%;
  }

  nav ul li a {
    display: block;
    font-size: 1.2rem;
    padding: 10px 0;
  }

  .menu-toggle:checked ~ nav {
    right: 0;
  }

  .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Hero Section */
#hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("./img/JolPA.jpg") no-repeat center center/cover;
  color: var(--ui-white);
  padding: 0;
}

.hero-content {
  max-width: 800px;
  margin: 5rem auto;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.3s;
  animation-fill-mode: both;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  animation: fadeInUp 1s ease-out 0.6s;
  animation-fill-mode: both;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* About Section */
#sobre-nosotros {
  background-color: var(--ui-white);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column-reverse;
  }

  .about-text,
  .about-image {
    width: 100%;
  }
}

/* Ventajas Section */
#ventajas {
  background-color: var(--primary-bg);
}

.ventajas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.ventaja-item {
  background-color: var(--ui-white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.ventaja-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.ventaja-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background-color: var(--primary-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
  font-size: 1.8rem;
}

/* Servicios Section */
#servicios {
  background-color: var(--ui-white);
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.servicio-card {
  background-color: var(--primary-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.servicio-card:hover {
  transform: translateY(-10px);
}

.servicio-img {
  height: 200px;
  overflow: hidden;
}

.servicio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.servicio-card:hover .servicio-img img {
  transform: scale(1.1);
}

.servicio-content {
  padding: 20px;
}

.servicio-content h3 {
  color: var(--accent-indigo);
}

/* Tabla Section */
#tabla-ventajas {
  background-color: var(--primary-bg);
  position: relative;
  overflow: hidden;
}

.tabla-container {
  width: 100%;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--ui-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.comparison-table th,
.comparison-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--ui-light-gray);
}

.comparison-table thead th {
  background-color: var(--accent-indigo);
  color: var(--ui-white);
  font-weight: 600;
}

.comparison-table tbody tr:nth-child(even) {
  background-color: rgba(242, 245, 200, 0.3);
}

.comparison-table tbody tr:hover {
  background-color: rgba(255, 107, 53, 0.1);
}

.check-icon {
  color: green;
}

.cross-icon {
  color: red;
}

/* Casos Section */
#casos {
  background-color: var(--ui-white);
}

.testimonial-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;

  margin: 0 auto;
}

div {
  word-break: break-word;
  overflow-wrap: break-word;
}
.testimonial-item {
  background-color: var(--primary-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.client-info {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.client-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
}

.client-name {
  font-weight: 600;
}

.client-position {
  font-size: 0.9rem;
  color: var(--accent-indigo);
}

/* Contact Form Section */
#contacto {
  background-color: var(--primary-bg);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--ui-white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ui-light-gray);
  border-radius: 5px;
  font-family: "Montserrat", sans-serif;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233F3D56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.form-group select option {
  background-color: var(--ui-white);
  color: var(--text-color);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.checkbox-group input {
  width: auto;
  margin-right: 10px;
  margin-top: 5px;
}

.form-submit {
  width: 100%;
  background-color: var(--accent-orange);
  color: var(--ui-white);
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-submit:hover {
  background-color: var(--accent-indigo);
}

/* FAQ Section */
#faq {
  background-color: var(--ui-white);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border: 1px solid var(--ui-light-gray);
  border-radius: 5px;
  overflow: hidden;
}

.faq-question {
  position: relative;
  padding: 15px;
  cursor: pointer;
  background-color: var(--primary-bg);
  font-weight: 600;
}

.faq-item input[type="checkbox"] {
  display: none;
}

.faq-item label {
  display: block;
  cursor: pointer;
  position: relative;
  padding-right: 30px;
}

.faq-item label:after {
  content: "+";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.faq-item input[type="checkbox"]:checked ~ label:after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background-color: var(--ui-white);
  transition: max-height 0.3s ease;
}

.faq-content {
  padding: 0 15px 15px;
}

.faq-item input[type="checkbox"]:checked ~ .faq-answer {
  max-height: 500px;
}

/* Footer */
footer {
  background-color: var(--accent-indigo);
  color: var(--ui-white);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-info .logo {
  color: var(--ui-white);
}

.footer-info .company-description {
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 10px;
}

.footer-links h3,
.footer-policies h3 {
  color: var(--accent-orange);
  margin-bottom: 20px;
}

.footer-links ul li,
.footer-policies ul li {
  margin-bottom: 10px;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Policy Pages Styling */
.policy-container {
  max-width: 800px;
  margin: 40px auto;
  background-color: var(--ui-white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.policy-container h1 {
  color: var(--accent-indigo);
  margin-bottom: 30px;
  text-align: center;
}

.policy-container h2 {
  color: var(--accent-orange);
  margin: 30px 0 15px;
}

.policy-container p {
  margin-bottom: 15px;
}

.policy-container ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.policy-container ul li {
  margin-bottom: 10px;
}

/* Gracias Page Styling */
.gracias-container {
  max-width: 600px;
  margin: 80px auto;
  background-color: var(--ui-white);
  padding: 40px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gracias-container h1 {
  color: var(--accent-orange);
  margin-bottom: 20px;
}

.gracias-container p {
  margin-bottom: 30px;
}

.home-link {
  display: inline-block;
}

/* Cookie Popup */
.cookie-popup {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--accent-indigo);
  color: var(--ui-white);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
  transition: bottom 0.3s ease;
  z-index: 1000;
}

.cookie-popup.show {
  bottom: 0;
}

.cookie-popup p {
  margin: 0;
  flex: 1;
  padding-right: 20px;
}

.cookie-popup button {
  white-space: nowrap;
}

@media (max-width: 576px) {
  .cookie-popup {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-popup p {
    margin-bottom: 15px;
    padding-right: 0;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.scroll-animation {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animation.visible {
  opacity: 1;
  transform: translateY(0);
}
