/* ===================================== */
/* PALETA PRINCIPAL Y VARIABLES        */
/* ===================================== */
:root {
  --amarillo: #ddbb27;
  --rosa: #e24eae;
  --verde: #868c49;
  --marron: #804002;
  --chocolate: #522f1f;
  --blanco: #ffffff;
  --negro: #000000;
  --gris-suave: #f5f5f5;
  --gris: #737373;
  --sombra: 0 4px 12px rgba(0, 0, 0, 0.1);
  --radius: 10px;

  /* Variables para tarjetas y botones */
  --border-radius-card: 1rem;
  --box-shadow-hover: rgba(0, 0, 0, 0.15);
  --color-text-dark: #333;
  --color-text-light: #ffffff;
  --color-primary: #814b16; /* Color para botones principales */
  --color-accent: #a65c1a; /* Color de acento para hover de botones */
  --button-gradient-start: #E34FAF;
  --button-gradient-end: #DEBC28;
  --footer-gradient-start: #814103;
  --footer-gradient-end: #533020;
}

/* ===================================== */
/* ESTILOS GLOBALES / RESET        */
/* ===================================== */
html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  overflow-x: hidden;
  font-family: 'Coiny', cursive;
  background-color: #C5A484;
  color: var(--chocolate);
  line-height: 1.6;
}

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

h2 {
  font-size: 3rem;
  font-family: 'Coiny', cursive;
  text-transform: uppercase;
  color: var(--chocolate);
  text-align: center;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  letter-spacing: 1.5px;
  position: relative;
}

/* Base styles for common text elements */
.section-image p,
.section-text ul li,
.section-tipos .card p,
#historia-resumen p,
.content-text p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ===================================== */
/* HEADER Y NAVEGACIÓN           */
/* ===================================== */
header {
  background: #272727;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

header h1 {
  font-family: 'Coiny', cursive;
  font-size: 3rem;
  color: var(--chocolate);
}

nav {
  font-family: 'Poppins', sans-serif;
  background-color: #e2dcda;
  color: rgb(0, 0, 0);
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #b85c38;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.nav-links a:hover {
  color: #b96d16;
}

.nav-links a.active {
  color: #b85c38;
  font-weight: bold;
}

/* Hamburguer button */
.hamburger {
  display: none;
  font-size: 2.5rem;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
  line-height: 1;
}

.hamburger:hover {
  color: #cecb14;
  transform: scale(1.1);
}

.hamburger.is-active {
  color: #d1d413;
  transform: rotate(90deg);
}

/* ===================================== */
/* SECCIONES - BASE              */
/* ===================================== */

/* Base styles for sections with background images/videos */
.section-base {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  min-height: 100vh; /* Ensure full viewport height as a base */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white; /* Default text color for sections with overlays */
  padding: 2rem; /* Add padding to prevent content from touching edges */
}

/* Overlay for sections with background images/videos */
.section-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
  z-index: 1;
}

/* Content text within sections */
.content-text {
  font-family: 'Poppins', sans-serif;
  padding: 2rem;
  border-radius: 10px;
  max-width: 700px;
  position: relative;
  z-index: 2; /* Ensures content is above the overlay */
}

/* Specific content text styles */
.section-video .content-text {
  max-width: 800px;
  background-color: rgba(250, 250, 250, 0.4);
  border-radius: 15px;
}

.section-text .content-text {
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--chocolate);
}

/* Common H2 styles for various sections */
.section-image h2,
.section-text h2,
.section-historia h2,
.section-tipos h2,
#historia-resumen h2 {
  font-family: 'Coiny', cursive;
  margin-bottom: 1rem;
  color: #fff; /* Default color for H2 in sections with overlay */
}

/* ===================================== */
/* SECCIONES ESPECÍFICAS         */
/* ===================================== */

/* Hero Section */
#hero {
  background-image: url('img/finca.webp');
  background-attachment: fixed;
  min-height: 100vh; /* Explicitly ensure full height */
  background-size: cover; /* Explicitly ensure cover */
  background-position: center; /* Explicitly ensure center */
}

#hero .content-text {
  max-width: 800px;
  text-align: center;
}

/* Combo Section */
#combo {
  background-image: url('img/3ddl.webp');
  background-attachment: fixed;
  min-height: 100vh; /* Explicitly ensure full height */
  background-size: cover; /* Explicitly ensure cover */
  background-position: center; /* Explicitly ensure center */
  align-items: flex-end; /* Align content to the right */
}

#combo h2,
#combo p {
  color: #FFF;
}

#combo .content-text {
  color: #fff;
  text-align: right; /* Align text inside to the right */
}

/* Unico Section */
#unico {
  background-image: url('img/cuchara.jpg');
  background-attachment: fixed;
  min-height: 100vh; /* Explicitly ensure full height */
  background-size: cover; /* Explicitly ensure cover */
  background-position: center; /* Explicitly ensure center */
}

#unico h2,
#unico p {
  color: var(--chocolate);
}

/* Historia Rústica y Libre Section */
.section-historia {
  background-image: url('./img/finca.webp');
  background-attachment: fixed;
  padding: 100px 30px;
  font-family: 'Coiny', cursive;
  color: #4a2c18; /* Specific text color for this section */
  line-height: 1.8;
  letter-spacing: 0.3px;
  z-index: 0;
  overflow: hidden;
}

.section-historia .content-text {
  max-width: 900px;
  margin: 0 auto;
}

.section-historia h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  color: #ffffff; /* Specific H2 color for this section */
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-historia h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  text-align: center;
  color: #C5A484;
  margin-bottom: 40px;
  font-style: italic;
}

.section-historia p {
  font-size: 1.3rem;
  margin-bottom: 28px;
  text-align: justify;
  color: #ffffff;
  background: transparent;
}

.nuestra-historia {
  color: #fff;
}

/* Section Text (amarillo background) */
.section-text {
  background-color: var(--amarillo);
  color: var(--chocolate);
  padding: 5rem 2rem;
  display: flex;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.1);
}

.section-text ul {
  list-style-type: none;
  padding: 0;
  margin-top: 1rem;
}

.section-text ul li {
  margin-bottom: 0.8rem;
  text-align: left;
}

/* Video Section */
.section-video {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;
}

.section-video .historia-contenido {
  padding: 2rem 1rem;
  text-align: center;
}

/* Historia Resumen */
#historia-resumen {
  background: none; /* Background handled by .section-video */
  background-size: cover;
  background-position: center;
  padding: 8rem 2rem 6rem;
  text-align: center;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.historia-contenido {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
}

/* ===================================== */
/* BOTONES                     */
/* ===================================== */
.button,
.boton-historia,
.boton-volver {
  background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
  color: var(--color-text-light);
  border: none;
  padding: 0.85rem 2.2rem;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 15px rgba(227, 79, 175, 0.5);
  transition: all 0.3s ease;
  display: inline-block;
  user-select: none;
}

.button:hover,
.boton-historia:hover,
.boton-volver:hover {
  background: linear-gradient(135deg, var(--button-gradient-end), var(--button-gradient-start));
  box-shadow: 0 10px 25px rgba(222, 188, 40, 0.7);
  transform: translateY(-3px) scale(1.05);
}

.boton-productos {
  background: var(--chocolate);
  color: var(--color-text-light);
  border: none;
  padding: 0.85rem 2.2rem;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.boton-productos:hover {
  background: #633621;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.5); /* Lighter shadow on hover for contrast */
  transform: translateY(-3px) scale(1.05);
}

.section-image#hero .boton-historia {
  margin-top: 2rem;
}

.historia-contenido .boton-historia {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  margin: 0 auto;
}

.boton-vermas {
  background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
  color: var(--color-text-light);
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.boton-vermas:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Reusable primary button for cards */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ===================================== */
/* FOOTER                        */
/* ===================================== */
footer {
  background: linear-gradient(135deg, var(--footer-gradient-start), var(--footer-gradient-end));
  color: #fdf6ef;
  font-family: 'Poppins', sans-serif;
  padding: 3rem 1.5rem 1rem;
  box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.3);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand h2 {
  font-family: 'Coiny', cursive;
  color: var(--button-gradient-end); /* Using a variable for consistency */
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-style: italic;
  font-size: 0.95rem;
  color: #fdf6efcc;
}

.footer-contact h3,
.footer-social h3 {
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--button-gradient-end);
  display: inline-block;
  padding-bottom: 0.5rem;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 8px;
  color: var(--amarillo);
}

.footer-contact a {
  color: inherit;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  font-size: 1.6rem;
  color: #f0e6d2;
  transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
  color: var(--button-gradient-start);
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.footer-bottom .created-by {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.footer-bottom .created-by a {
  color: var(--button-gradient-end);
  text-decoration: none;
  margin: 0 0.2rem;
}

.footer-bottom .created-by a:hover {
  text-decoration: underline;
}

/* ===================================== */
/* SECCIÓN TIPOS DE DULCE        */
/* ===================================== */
.section-tipos {
  padding: 6rem 2rem;
  text-align: center;
}

.titulo-tipos {
  font-family: 'Poppins', cursive;
  font-size: 3.5rem;
  color: var(--chocolate);
  margin-bottom: 0.5rem;
}

.subtitulo-tipos {
  font-family: 'Poppins';
  font-size: 1.3rem;
  color: #fff;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.tipos-gigantes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4rem 5rem;
  padding: 2rem 1rem 5rem;
}

.ddl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.ddl-item img {
  width: 280px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1));
}

.ddl-item:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.18));
}

.ddl-item span {
  margin-top: 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--chocolate);
  letter-spacing: 0.4px;
  transition: color 0.3s ease;
}

.ddl-item:hover span {
  color: var(--amarillo);
}

/* ===================================== */
/* SECCIÓN MAPA                  */
/* ===================================== */
#mapa-section {
  padding: 40px 20px;
  background-color: #f8f8f8;
  text-align: center;
}

#mapa-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px;
}

#mapa-buttons button {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#mapa-buttons button:hover {
  background-color: var(--color-accent);
}

#mapa {
  height: 500px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

/* ===================================== */
/* DULCE LAYOUT (PRODUCTOS)      */
/* ===================================== */
.contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
  font-family: 'Poppins', sans-serif;
}

#titulo-tipo {
  font-family: 'Coiny', cursive;
  font-size: 3.5rem;
  text-align: center;
  color: var(--chocolate);
  margin-bottom: 1rem;
}

#intro-tipo {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 3.5rem;
  color: #555;
}

.dulce-layout {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.dulce-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.dulce-menu button {
  background-color: #f3e5ab;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  color: #5e412f;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.dulce-menu button i {
  font-size: 1.2rem;
}

.dulce-menu button:hover,
.dulce-menu button.activo {
  background-color: #ddb892;
  color: white;
  transform: translateX(4px);
  box-shadow: 2px 6px 12px rgba(0, 0, 0, 0.1);
}

.dulce-card {
  flex: 3;
  background-color: #fffdf6;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: all 0.4s ease;
  opacity: 1;
}

.dulce-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.dulce-card.fade-in {
  animation: fadeIn 0.5s ease;
}

.dulce-card img {
  width: 220px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dulce-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-family: 'Coiny', cursive;
  color: #5e412f;
  transition: color 0.3s ease;
}

.dulce-info p {
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
  color: #444;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.extra-info {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #7a5b3e;
  font-style: italic;
}

/* ===================================== */
/* GRID DE PRODUCTOS             */
/* ===================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem 1.5rem;
  justify-items: center;
  align-items: start;
  padding: 2rem 1rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  padding: 1rem;
  border-radius: var(--border-radius-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fade-up 0.6s ease-out forwards;
  opacity: 0;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--box-shadow-hover);
}

.card img {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: cover;
  border-radius: 1rem;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.card:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.25));
}

.card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  color: var(--color-text-dark);
  font-weight: 600;
}

.card p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Animation delays for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* ===================================== */
/* SECCIÓN CONTACTO              */
/* ===================================== */
.section-contacto {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 2rem;
  background-image: url('img/finca.webp');
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
}

.formulario-contacto {
  font-family: 'Poppins', sans-serif;
  max-width: 600px;
  margin: 3rem auto;
  background: white;
  padding: 3rem 3.5rem;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.formulario-contacto:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.formulario-contacto h2 {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-align: center;
  font-size: 2.8rem;
}

.formulario-contacto h2::after {
  content: " ✉️";
  display: inline-block;
  margin-left: 8px;
}

.formulario-contacto > p {
  color: var(--chocolate);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  text-align: center;
  letter-spacing: 0.5px;
}

.alert {
  background-color: #e4f7e6;
  color: #2f6627;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: fadeIn 0.5s ease forwards;
}

.campo {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.6rem;
  position: relative;
}

.campo label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #5a3a0e;
  font-size: 1.1rem;
  user-select: none;
}

.campo label[for="nombre"]::before { content: "👤 "; }
.campo label[for="email"]::before { content: "📧 "; }
.campo label[for="mensaje"]::before { content: "💬 "; }

.campo input,
.campo textarea {
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  border: 2px solid #d6b75a;
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  resize: vertical;
  font-family: inherit;
}

.campo input:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--button-gradient-start);
  box-shadow: 0 0 8px rgba(227, 79, 175, 0.7);
}

.campo input::placeholder,
.campo textarea::placeholder {
  color: #b8a96a;
  font-style: italic;
}

.campo input:invalid:not(:focus),
.campo textarea:invalid:not(:focus) {
  border-color: #de3232;
  animation: shake 0.3s ease;
}

button[type="submit"] {
  background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
  color: var(--color-text-light);
  border: none;
  font-weight: 700;
  padding: 1rem 3rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 35px rgba(227, 79, 175, 0.5);
  transition: all 0.3s ease;
  display: block;
  margin: 2.5rem auto 0;
  max-width: 320px;
  font-size: 1.25rem;
  position: relative;
  overflow: hidden;
  user-select: none;
}

button[type="submit"]::after {
  content: "🚀";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, var(--button-gradient-end), var(--button-gradient-start));
  box-shadow: 0 14px 45px rgba(222, 188, 40, 0.7);
  transform: translateY(-3px) scale(1.05);
}

button[type="submit"]:hover::after {
  transform: translateY(-50%) translateX(6px);
}

#alert-flash {
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 1;
  transform: translateY(0);
}

#alert-flash.hide {
  opacity: 0;
  transform: translateY(-20px);
}

/* ===================================== */
/* NOVEDADES                     */
/* ===================================== */

#novedades {
  padding: 4rem 1rem;
  background-image: url('img/finca.webp');
  background-size: cover;
  background-color: rgba(0, 0, 0, 0.5);
  background-position: center;
  position: relative;
}

.titulo-novedades {
  text-align: center;
  font-size: 3.6rem;
  color: var(--color-text-light);
  font-family: 'Poppins', sans-serif;
  margin-bottom: 3rem;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.novedades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}

.card-novedad {
  background-color: var(--blanco);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-novedad:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-novedad img {
  width: 100%;
  height: auto;
  max-height: 370px;
  background-color: #fafafa;
  display: block;
  margin: 0 auto;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  object-fit: cover; /* Ensure images cover the area */
}

.contenido-novedad {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.contenido-novedad p,
.contenido-novedad h3 {
  margin-bottom: 12px;
}

.btn-novedad {
  margin-top: auto;
  align-self: flex-start;
  background-color: #8d4925;
  color: var(--color-text-light);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-novedad:hover {
  background-color: #6f381c;
}

.contenido-novedad .fecha {
  font-size: 0.9rem;
  color: var(--gris);
}

.contenido-novedad p {
  font-size: 1rem;
  color: #444;
  line-height: 1.5;
}

/* ===================================== */
/* NOVEDADES HOME (SWIPER)       */
/* ===================================== */

#novedades-home {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fffaf3;
  overflow: hidden;
  margin: 0;
  padding: 0;
  padding-bottom: 6rem; /* space for button */
}

.novspan {
  color: var(--color-text-light); /* Adjusted for consistency */
}

/* Ocultamos el mobile por defecto, y mostramos desktop */
.titulo-mobile {
  display: none;
}

.titulo-desktop {
  display: block;
  z-index: 10;
  position: absolute;
  top: 2rem;
  width: 100%;
  text-align: center;
  font-size: 3rem;
  color: var(--color-text-light);
  font-family: 'Poppins', sans-serif;
}
@media (max-width: 768px) {
  .titulo-mobile {
    display: block;
    text-align: center;
    font-size: 2rem;
    margin: 2rem 1rem 1rem;
    color: var(--chocolate);
    position: static;
  }

  .titulo-desktop {
    display: none;
  }
}


#novedades-home .swiper {
  flex: 1;
  width: 100%;
  height: 100vh;
}

#novedades-home .swiper-slide {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  text-align: center;
}

#novedades-home .swiper-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.4);
  transition: opacity 0.6s ease;
}

#novedades-home .swiper-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

#novedades-home .swiper-slide h3,
#novedades-home .swiper-slide p {
  z-index: 2;
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0 auto;
}

#novedades-home .swiper-slide h3 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
}

#novedades-home .swiper-slide p {
  font-size: 1.3rem;
  line-height: 1.5;
  font-family: 'Poppins', sans-serif;
}

.boton-vermas-container {
  position: absolute;
  bottom: 1.5rem;
  width: 100%;
  text-align: center;
  z-index: 5;
}

/* ===================================== */
/* ANIMACIONES                   */
/* ===================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

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

@keyframes glow {
  from {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.3);
  }
  to {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.4);
  }
}

/* Welcome Text Animations */
.bienvenidos {
  font-size: 4rem;
  font-weight: bold;
  color: var(--color-text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin: 0;
  line-height: 1.2;
  font-family: 'Arial', sans-serif;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1.5s ease-out 0.5s forwards;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.bienvenidos:hover {
  transform: translateY(-15px) rotateX(10deg) rotateY(-5deg) scale(1.05);
  text-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.8),
    0 15px 25px rgba(0, 0, 0, 0.4),
    0 25px 40px rgba(0, 0, 0, 0.2);
}

.segunda-linea {
  display: block;
  color: #d4af37;
  margin-top: 0.2em;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  animation: fadeInUpScale 1.8s ease-out 1.2s forwards, glow 3s ease-in-out 2.5s infinite alternate;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* white-space: nowrap; REMOVED TO ALLOW TEXT WRAPPING */
  width: 100%;
}

.bienvenidos:hover .segunda-linea {
  transform: translateY(-8px) rotateX(-5deg) scale(1.08);
  text-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(212, 175, 55, 0.8),
    0 0 35px rgba(212, 175, 55, 0.6),
    0 12px 30px rgba(212, 175, 55, 0.3);
  color: #f4d03f;
}

/* ===================================== */
/* MEDIA QUERIES (RESPONSIVE)    */
/* ===================================== */

/* --- Tablet and larger mobile devices (<= 768px) --- */
@media (max-width: 768px) {
  /* General */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }

  .section-text,
  .section-tipos,
  .section-contacto,
  .section-image,
  .section-historia,
  #novedades {
    padding: 2.5rem 1rem !important;
  }

  /* Header & Navigation */
  nav .nav-container {
    justify-content: flex-start;
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    align-items: center;
  }

  .hamburger {
    display: block;
    position: static;
    transform: none;
    margin-right: 1rem;
    margin-left: 0;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    background-color: var(--blanco);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(-20px);
    border-radius: 0 0 8px 8px;
  }

  .nav-links.active {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gris-suave);
    color: var(--color-text-dark);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .nav-links a:hover {
    background-color: #f8f9fa;
    color: var(--amarillo); /* Adjusted for consistency */
  }

  /* Sections */
  .section-image#hero,
  .section-image#combo,
  .section-image#unico,
  .section-historia,
  #novedades {
    background-attachment: scroll !important; /* Important for mobile performance */
  }

  .section-image#hero,
  .section-image#combo,
  .section-image#unico {
    background-repeat: no-repeat;
    background-position: center;
    min-height: 80vh; /* Allow slightly less than 100vh on mobile if content is short, or keep 100vh if preferred */
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .section-image#hero .content-text,
  .section-image#combo .content-text,
  .section-image#unico .content-text {
    margin: 0 auto !important;
    text-align: center !important;
  }

  .section-video {
    min-height: 60vh;
    padding: 2rem 1rem;
    flex-direction: column;
  }

  .background-video {
    height: auto;
    width: 100%;
  }

  .historia-contenido,
  .section-image .content-text {
    padding: 1rem;
    font-size: 1rem;
  }

  .section-image h2,
  .section-video h2 {
    font-size: 2rem;
  }

  .section-historia {
    padding: 3rem 1rem;
  }

  .section-historia .content-text {
    padding: 1rem;
  }

  .section-historia h2 {
    font-size: 2rem;
  }

  .section-historia h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .section-historia p {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Welcome text specific adjustments for responsive */
  .bienvenidos {
    font-size: 2.5rem; /* Reduced font size for tablet */
  }

  .segunda-linea {
    font-size: 1.8rem; /* Reduced font size for tablet */
  }

  /* Novedades Page */
  .titulo-novedades {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    text-align: center;
  }

  .novedades-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .card-novedad {
    padding: 1rem;
  }

  .card-novedad img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    margin-bottom: 1rem;
  }

  .contenido-novedad {
    padding: 1rem 0;
  }

  .contenido-novedad h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }

  .contenido-novedad p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .btn-novedad {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    display: inline-block;
    margin-top: 1rem;
  }

  /* Novedades Home Swiper */
  #novedades-home {
    height: auto;
  }

  #novedades-home .swiper,
  #novedades-home .swiper-slide {
    height: auto;
    padding: 2rem 1rem;
  }

  #novedades-home .swiper-slide h3 {
    font-size: 1.7rem;
  }

  #novedades-home .swiper-slide p {
    font-size: 1rem;
  }

  #novedades-home .novspan {
    color: var(--chocolate); /* Changed to darker color for readability on lighter background */
  }

  /* Mapa Section */
  #mapa-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0.5rem 0;
    justify-content: flex-start;
  }

  #mapa-buttons button {
    flex: 0 0 auto;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    white-space: nowrap;
  }

  #mapa {
    height: 300px;
    margin-top: 1rem;
  }

  /* Dulce Layout */
  .dulce-layout {
    flex-direction: column;
  }

  .dulce-card {
    flex-direction: column;
    text-align: center;
  }

  .dulce-card img {
    width: 100%;
    max-width: 300px;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-brand h2 {
    font-size: 1.6rem;
  }

  .social-icons {
    justify-content: flex-start;
  }

  /* Contact Form */
  .formulario-contacto {
    max-width: 100%;
    padding: 2rem 1.5rem;
    margin: 2rem auto;
  }

  .formulario-contacto h2 {
    font-size: 2rem;
  }

  .formulario-contacto > p {
    font-size: 1rem;
  }

  .campo label {
    font-size: 1rem;
  }

  .campo input,
  .campo textarea {
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }

  button[type="submit"] {
    font-size: 1rem;
    padding: 0.8rem 2rem;
    width: 100%;
    max-width: 320px;
    margin: 2rem auto 0;
  }
}

/* --- Small mobile devices (<= 480px) --- */
@media (max-width: 480px) {
  /* General */
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  /* Buttons */
  .button,
  .boton-historia,
  .boton-volver,
  .boton-productos {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }

  /* Welcome text specific adjustments for small mobile */
  .bienvenidos {
    font-size: 1.8rem; /* Further reduced font size for small mobile */
  }

  .segunda-linea {
    font-size: 1.2rem; /* Further reduced font size for small mobile */
  }

  /* Novedades Page */
  .titulo-novedades {
    font-size: 1.7rem;
  }

  .contenido-novedad h3 {
    font-size: 1.2rem;
  }

  .contenido-novedad p {
    font-size: 0.95rem;
  }

  .btn-novedad {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }

  /* Novedades Home Swiper */
  #novedades-home .swiper-slide h3 {
    font-size: 1.3rem;
  }

  #novedades-home .swiper-slide p {
    font-size: 0.95rem;
  }

  .boton-vermas {
    font-size: 0.95rem;
    padding: 0.7rem 1.6rem;
  }

  .boton-vermas-container {
    bottom: 1rem;
  }

  /* Sections */
  .section-video .historia-contenido h2 {
    font-size: 1.7rem;
  }

  .section-video .historia-contenido p {
    font-size: 0.95rem;
  }

  .section-image h2 {
    font-size: 1.5rem;
  }

  .section-image p {
    font-size: 0.95rem;
  }

  .section-historia {
    padding: 2rem 1rem;
  }

  .section-historia h2 {
    font-size: 1.7rem;
  }

  .section-historia h3 {
    font-size: 1.1rem;
  }

  .section-historia p {
    font-size: 0.95rem;
  }

  .tipos-gigantes {
    gap: 1.5rem;
  }

  .ddl-item img {
    width: 140px;
  }

  .ddl-item span {
    font-size: 1rem;
  }

  /* Map Section */
  #mapa-buttons button {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }

  /* Product Grid */
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem 0;
    padding: 1rem 0.5rem 2rem;
  }

  .card {
    border-radius: 1rem;
    width: 95%;
    margin: 0 auto;
  }

  .card img {
    max-width: 280px;
  }

  /* Contact Form */
  .formulario-contacto h2 {
    font-size: 1.7rem;
  }

  .formulario-contacto > p {
    font-size: 0.95rem;
  }

  button[type="submit"] {
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
  }

  .campo input,
  .campo textarea {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
  }
}

/* ===================================== */
/* LOGO                         */
/* ===================================== */
.logo {
  width: 150px;
  max-width: max-content;
  max-height: max-content;
  transition: all 0.4s ease;
  display: block;
  margin: 0 auto;
}

