/* Variables */
:root {
  /* Colores genéricos */
  --white: #FFFFFF;
  --dark: #000000;
  --bg-main: #FFFEFB;
  --bg-full: #edede9;
  --bg-med: #F5F4EF;
  --typo: #2C3A3B;

  /* Marca */
  --brand-color: #10454F;

  /* Colores específicos del botón CTA principal */
  --btn-cta-bg: #10454F;
  --btn-cta-bg-hover: #006F62;
  --btn-cta-bg-focus: #005B54;
  --btn-cta-bg-active: #004940;
  --btn-cta-text: var(--white);
  --btn-cta-disabled-bg: #E0E3E1;
  --btn-cta-disabled-text: #B2B6B4;

  /* Colores específicos del botón CTA secundario */
  --btn-secondary-border: #636D68;
  --btn-secondary-border-hover: #636D68;
  --btn-secondary-bg-hover: #636D68;
  --btn-secondary-border-focus: #707477;
  --btn-secondary-bg-focus: #D0D2D5;
  --btn-secondary-border-active: #4E5753;
  --btn-secondary-bg-active: #4E5753;
  --btn-secondary-text: #2C3A3B;
  --btn-secondary-disabled-bg: #E0E3E1;
  --btn-secondary-disabled-text: #B2B6B4;
  --btn-secondary-disabled-border: #B2B6B4;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-Bold.otf') format('opentype');
  font-weight: 700; /* Bold */
  font-style: normal;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-BoldItalic.otf') format('opentype');
  font-weight: 700; /* Bold Italic */
  font-style: italic;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-Medium.otf') format('opentype');
  font-weight: 500; /* Medium */
  font-style: normal;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-MediumItalic.otf') format('opentype');
  font-weight: 500; /* Medium Italic */
  font-style: italic;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-Regular.otf') format('opentype');
  font-weight: 400; /* Regular */
  font-style: normal;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-RegularItalic.otf') format('opentype');
  font-weight: 400; /* Regular Italic */
  font-style: italic;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-SemiBold.otf') format('opentype');
  font-weight: 600; /* SemiBold */
  font-style: normal;
}

@font-face {
  font-family: 'Text';
  src: url('/fonts/Text-SemiBoldItalic.otf') format('opentype');
  font-weight: 600; /* SemiBold Italic */
  font-style: italic;
}

/* Fuente Anterior */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Black.woff2') format('woff2'),
       url('/fonts/Geist-Black.woff') format('woff');
  font-weight: 900; /* Black */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Bold.woff2') format('woff2'),
       url('/fonts/Geist-Bold.woff') format('woff');
  font-weight: 700; /* Bold */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Light.woff2') format('woff2'),
       url('/fonts/Geist-Light.woff') format('woff');
  font-weight: 300; /* Light */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Medium.woff2') format('woff2'),
       url('/fonts/Geist-Medium.woff') format('woff');
  font-weight: 500; /* Medium */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Regular.woff2') format('woff2'),
       url('/fonts/Geist-Regular.woff') format('woff');
  font-weight: 400; /* Normal */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-SemiBold.woff2') format('woff2'),
       url('/fonts/Geist-SemiBold.woff') format('woff');
  font-weight: 600; /* SemiBold */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Thin.woff2') format('woff2'),
       url('/fonts/Geist-Thin.woff') format('woff');
  font-weight: 100; /* Thin */
  font-style: normal;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-UltraLight.woff2') format('woff2'),
       url('/fonts/Geist-UltraLight.woff') format('woff');
  font-weight: 200; /* UltraLight */
  font-style: normal;
}

/* Eliminar subrayado de todos los enlaces */
a {
  text-decoration: none;
}

/* Typography */

h1 {
  font-family: 'Text', sans-serif;
  font-weight: 500; /* Medium */
  font-size: 2rem; /* 32px / 16px = 2rem */
}

h2 {
  font-family: 'Text', sans-serif;
  font-weight: 500; /* SemiBold */
  font-size: 1.5rem; /* 28px / 16px = 1.75rem */
  line-height: 1.4;
}

h3 {
  font-family: 'Text', sans-serif;
  font-weight: 500; /* SemiBold */
  font-size: 1.25rem; /* 20px / 16px = 1.25rem */
  margin-bottom: 1rem; /* 16px / 16px = 1rem */
}

h4 {
  font-family: 'Text', sans-serif;
  font-weight: 600; /* SemiBold */
  font-size: 1rem; /* 16px / 16px = 1rem */
}

h5 {
  font-family: 'Text', sans-serif;
  font-weight: 600; /* SemiBold */
  font-size: 0.875rem; /* 14px / 16px = 0.875rem */
}

h6 {
  font-family: 'Text', sans-serif;
  font-weight: 500; /* Medium */
  font-size: 0.75rem; /* 12px / 16px = 0.75rem */
}

p {
  font-family: 'Text', sans-serif;
  font-weight: 400; /* Regular */
  font-size: 1rem;
  line-height: 1.5;
}

p:after {
  content: ""; /* Pseudo-elemento vacío */
  display: block;
  margin-bottom: -0.5em; /* Ajusta este valor para compensar el line-height extra al final */
}

/* Para los encabezados h1 a h6 */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  letter-spacing: 0.02rem;
}

/* Clases de utilidad para espaciados */

/* Margin Bottom */
.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-32 {
  margin-bottom: 32px;
}

.mb-64 {
  margin-bottom: 64px;
}

.mb-128 {
  margin-bottom: 128px;
}

/* Margin Top */
.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-32 {
  margin-top: 32px;
}

.mt-64 {
  margin-top: 64px;
}

.mt-128 {
  margin-top: 128px;
}

/* Estilos básicos */
html, body {
  font-family: 'Text', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
  background-color: var(--bg-main);
  letter-spacing: 0.02rem;
  color: var(--typo);
  scroll-behavior: smooth;
}

/* componente container */

/* Contenedor general */
.container {
  width: 100%;
  max-width: 768px;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  padding: 64px 0; /* Padding vertical estándar */
}

/* Clase opcional para el fondo */
.with-background {
  background-color: var(--bg-med); /* Ejemplo de color de fondo */
  border-radius: 16px;
  overflow: hidden;
}

/* Contenedor de fondo de ancho completo */
.full-width-container {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  padding: 64px 0; /* Padding vertical estándar */
  background-color: var(--bg-full); /* Ejemplo de color de fondo */
}

/* Contenido siempre limitado a 640px */
.content {
  max-width: 640px;
  width: 100%;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
  .container, .full-width-container {
    padding: 64px 16px; /* Aplica padding horizontal en pantallas pequeñas para ambos contenedores */
  }
  .with-background {
    border-radius: 0; /* Elimina el borde redondeado en pantallas pequeñas */
  }
}

/* componente icono en lista de características */

.icon-feature {
  margin-left: -2px;
}

.icon-feature path {
  fill: var(--brand-color);
}

.icon-hamburger path {
  fill: var(--brand-color);
}

/* componente de dos columnas */

.two-columns {
  display: flex;
  justify-content: space-between;
  column-gap: 32px;  /* Espacio entre las columnas */
}

.column {
  flex: 1;  /* Cada columna toma el mismo espacio disponible */
  /* No padding added here, manage in container as needed */
}

/* Regla de Media Query para pantallas de menos de 768px */
@media (max-width: 768px) {
  .two-columns {
    flex-direction: column;  /* Cambia la orientación a vertical */
    column-gap: 0;  /* Elimina el gap horizontal en modo columna */
  }

  .column {
    margin-bottom: 16px;  /* Espacio entre las columnas */
  }

  .column:last-child {
    margin-bottom: 0;  /* Elimina el margen inferior de la última columna */
  }
}


/* componente de tres columnas */

.three-columns {
  display: flex;
  justify-content: space-between;
  column-gap: 32px;  /* Espacio entre las columnas */
}

.column-three {
  flex: 1;  /* Cada columna toma el mismo espacio disponible */
  /* No padding added here, manage in container as needed */
}


/* Componente botón CTA principal */
.btn-cta {
  font-family: 'Geist', sans-serif;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1rem; /* Aproximadamente equivalente a 12px 16px */
  background-color: var(--btn-cta-bg);
  border: none;
  border-radius: 0.5rem; /* Aproximadamente equivalente a 8px */
  color: var(--btn-cta-text);
  font-weight: 400;
  font-size: 0.875rem; /* 14px como rem */
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  margin-right: 0.5rem; /* Aproximadamente equivalente a 8px */
  letter-spacing: 0.00125rem; /* Ajustado proporcionalmente desde 0.02rem */
}

.btn-cta:hover {
  background-color: var(--btn-cta-bg-hover);
}

.btn-cta:focus {
  background-color: var(--btn-cta-bg-focus);
  outline: none; /* Remove default outline and replace with a custom style if needed */
  box-shadow: 0 0 0 2px rgba(0, 111, 98, 0.5); /* Light glow effect for focus */
}

.btn-cta:active {
  background-color: var(--btn-cta-bg-active);
}

.btn-cta:disabled {
  background-color: var(--btn-cta-disabled-bg);
  color: var(--btn-cta-disabled-text);
  cursor: not-allowed;
}

.btn-cta .btn-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px; /* Espacio entre el ícono y el texto */
  fill: var(--btn-cta-text); /* Especifica el color del ícono */
}

/* Secondary Button Styles */
.btn-secondary {
  font-family: 'Geist', sans-serif;
  display: inline-flex;
  align-items: center;
  padding: 12px 16px; /* Ajusta según sea necesario */
  background-color: transparent;
  border: 1px solid var(--btn-secondary-border);
  border-radius: 8px;
  color: var(--btn-secondary-text);
  font-weight: 400;
  font-size: 0.875rem; /* Esto equivale a 14px */
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  letter-spacing: 0.02rem;
}

.btn-secondary:hover {
  background-color: var(--btn-secondary-bg-hover);
  border-color: var(--btn-secondary-border-hover);
  color: var(--white);
}

.btn-secondary:focus {
  background-color: var(--btn-secondary-bg-focus);
  border-color: var(--btn-secondary-border-focus);
  outline: none; /* Remove default outline and replace with a custom style if needed */
  box-shadow: 0 0 0 2px rgba(112, 71, 119, 0.5); /* Optional: Adjust color and opacity for focus glow */
}

.btn-secondary:active {
  background-color: var(--btn-secondary-bg-active);
  border-color: var(--btn-secondary-border-active);
}

.btn-secondary:disabled {
  background-color: var(--btn-secondary-disabled-bg);
  border-color: var(--btn-secondary-disabled-border);
  color: var(--btn-secondary-disabled-text);
  cursor: not-allowed;
}

.btn-secondary .btn-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px; /* Espacio entre el ícono y el texto */
  fill: var(--btn-secondary-text); /* Especifica el color del ícono */
}

.btn-secondary:hover .btn-icon {
  fill: var(--white); /* Cambia el color del ícono al blanco en hover */
}

.btn-secondary:disabled .btn-icon {
  fill: var(--btn-secondary-disabled-text); /* Cambia el color del ícono en estado deshabilitado */
}

/* componente avatar */

.avatar img {
  width: 80px;         /* Ancho del avatar */
  height: 80px;        /* Altura del avatar */
  border-radius: 16px; /* Borde redondeado */
  object-fit: cover;   /* Asegura que la imagen cubra completamente el espacio sin deformarse */
}

.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

#navbar {
  width: calc(100% - 32px); /* Ajuste para considerar el padding lateral */
  max-width: 640px;
  background: rgba(245, 244, 239, 0.6);
  position: fixed;
  top: 0;
  left: 50%; /* Centrado */
  transform: translateX(-50%); /* Ajuste fino para centrar */
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 8px 16px; /* Padding vertical y lateral de 16px */
  transition: transform 0.3s, top 0.3s, background 0.3s; /* Transición suave para la traslación, margen superior y fondo */
  border-radius: 12px;
}

#navbar.hidden {
  transform: translateX(-50%) translateY(-100%); /* Desplaza hacia arriba fuera de la pantalla */
}

@media (min-width: 601px) {
  #navbar.scrolled-up {
    top: 16px; /* Añade margen superior de 16px solo en escritorio */
  }

  #navbar.at-top {
    background: transparent; /* Fondo transparente cuando está pegado al techo */
  }
}

.menu-items {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: flex-end; /* Alineación a la derecha */
  flex-grow: 1;
  gap: 16px; /* Espacio de 16px entre los ítems del menú */
}

.menu-items li a {
  display: block;
  padding: 10px 0; /* Padding vertical para mejorar clickeabilidad */
  text-decoration: none;
  color: var(--typo);
  font-size: 14px; /* Tamaño de letra de 14px */
}

#mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(12, 78, 62, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1001; /* Mayor z-index para estar siempre encima del navbar */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#mobile-menu-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: white;
  fill: var(--white);
}

#mobile-menu-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: center;
}

#mobile-menu-overlay li a {
  color: white;
  padding: 15px;
  display: block;
}

.hamburger {
  display: none; /* Oculto en desktop */
  padding: 0; /* No necesita padding adicional */
}

@media (max-width: 600px) {
  .menu-items {
    display: none; /* Se ocultan para mostrar el menú hamburguesa */
  }
  .hamburger {
    display: flex; /* Visible solo en móviles */
    align-items: center; /* Centrado verticalmente */
    justify-content: center; /* Centrado horizontalmente */
  }
  #mobile-menu-overlay ul {
    padding: 0; /* Asegura que no hay padding extra en el overlay */
    margin: 0; /* Elimina el margen por defecto de la lista */
    width: 100%; /* Asegura que la lista use todo el ancho disponible */
    text-align: center; /* Asegura que los textos estén centrados */
  }
  #mobile-menu-overlay li a {
    padding: 15px; /* Aumenta el padding para mejor clickeabilidad en móviles */
  }

  /* Ajustar la disposición de la barra de navegación */
  #navbar {
    justify-content: space-between;
  }
}

/* Estilos para los iconos sociales */
.social-icon-group {
  display: flex;
  gap: 4px; /* Espacio de 4px entre los íconos */
  align-items: center; /* Alineación vertical */
}

.social-icon-link {
  text-decoration: none;
}

.social-icon-svg {
  width: 24px;
  height: 24px;
  fill: var(--btn-secondary-border);
  transition: fill 0.3s ease;
}

.social-icon-link:hover .social-icon-svg {
  fill: var(--brand-color); /* Color de relleno al pasar el ratón por encima */
}

/* Componente Forms*/

.container-reduced {
  max-width: 500px; /* Ancho ideal para el formulario */
}


.form-contact {
  border-radius: 8px;
}

.form-contact .input-group {
  margin-bottom: 20px;
}

.form-contact .input-group label {
  display: block;
  margin-bottom: 8px;
}

.form-contact .input-group input, .form-contact .input-group textarea {
  width: 100%;
  font-size: 16px;
  padding: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: 'Text', sans-serif;
}

.form-contact .btn-submit {
  background-color: var(--brand-color);
  color: #fff;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  margin-top: 20px;
  width: 100%;
}

.form-contact .btn-submit:hover {
  background-color: #555;
}

/* Responsive */
@media (max-width: 640px) {
  .form-contact .input-group input, .form-contact .input-group textarea {
      width: 100%;
  }

  .form-contact .btn-submit {
      width: 100%;
  }
}

/* Estilos para el contenido del footer */

.footer-content {
  font-size: 14px;  /* Tamaño de letra de 14px */
}

.footer-content ul {
  list-style: none;  /* Elimina los puntos de la lista */
  padding: 0;  /* Elimina el padding predeterminado */
  margin: 0;  /* Elimina el margen predeterminado */
}

.footer-content li {
  margin-bottom: 16px;  /* Espacio entre los elementos de la lista */
}

.footer-content li:last-child {
  margin-bottom: 0;  /* Elimina el margen inferior del último elemento */
}

.footer-content a {
  text-decoration: none;  /* Elimina el subrayado del enlace */
  color: inherit;  /* Mantiene el color del enlace igual al texto circundante */
}


/* Componente Forms*/

.container-reduced {
    max-width: 500px;
    margin: 32px auto 0;
}

.form-contact {
    border-radius: 8px;
}

.form-contact .input-group {
    margin-bottom: 20px;
}

.form-contact .input-group label {
    display: block;
    margin-bottom: 8px;
}

.form-contact .input-group input, .form-contact .input-group textarea {
    width: 100%;
    font-size: 16px;
    padding: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Text', sans-serif;
}

.form-contact .btn-submit {
    background-color: var(--brand-color);
    color: #fff;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    margin-top: 20px;
    width: 100%;
    -webkit-appearance: none; /* Remove default styling on iOS */
    appearance: none; /* Remove default styling on modern browsers */
}

.form-contact .btn-submit:hover {
    background-color: var(--btn-cta-bg-hover);
}

/* Alertas personalizadas para emailjs */

.custom-alert {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    margin-left: auto;
    margin-right: auto;
    background-color: #008065;
    color: #FFF4C3;
    border: 2px solid #00543D;
    padding: 12px 16px; /* Aumenta el padding para mayor legibilidad */
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 500px;
    display: none;
    box-sizing: border-box; /* Asegura que el padding y el borde se incluyan en el tamaño total */
}

.custom-alert.error {
    background-color: #DA1A3D;
    border-color: #4C0519;
    color: #4C0519;
}

/* Responsive */
@media (max-width: 640px) {
    .form-contact .input-group input, .form-contact .input-group textarea {
        width: 100%;
    }

    .form-contact .btn-submit {
        width: 100%;
    }
}
