/* ==========================
   VARIABLES PERSONALIZADAS
   ========================== */
:root {
  --color-primary: #E3256B;
  --color-secondary: #e3256b;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #128C7E;
  --color-facebook: #1877F2;
  --color-facebook-hover: #0f64da;
  --color-email: #D44638;
  --color-email-hover: #B03629;
  --color-call: #34B7F1;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #F9F9F9;
  --color-white: #FFFFFF;
  --color-footer: #9F0056;
  --color-header: #fbdae6;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --font-main: 'Montserrat', system-ui, sans-serif;
}

/* ==========================
   RESET GENERAL
   ========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(14px, 2.5vw, 16px);
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--color-text);
  background-image: url("images/FONDO01.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================
   LAYOUT PRINCIPAL
   ========================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

main {
  flex: 1;
  padding: 2rem 0;
}

/* ==========================
   ENCABEZADO
   ========================== */
.site-header {
  background-color: var(--color-header);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0 0;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(0.5rem, 2vw, 1.5rem);
}

.logo-title-container {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.5rem);
  padding: 0.5rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  width: clamp(60px, 15vw, 80px);
  height: clamp(60px, 15vw, 80px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.brand-title {
  text-align: center;
}

.brand-title h1 {
  color: var(--color-primary);
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: 0;
  line-height: 1;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.brand-title .tagline {
  color: var(--color-text-light);
  margin: 0.3rem 0 0;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  font-weight: 500;
}

/* ==========================
   NAVEGACIÓN
   ========================== */
.main-nav {
  width: 100%;
  background-color: var(--color-primary);
  margin-top: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #cb3f9f;
  font-family: var(--font-main);
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.menu-toggle .menu-icon {
  margin-right: 0.5rem;
  font-size: clamp(1.5rem, 4vw, 1.75rem);
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.5rem);
  font-weight: 600;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: white;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 50%;
}

/* ==========================
   SECCIONES
   ========================== */
.seccion {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  margin: clamp(1rem, 3vw, 2rem) auto;
  box-shadow: var(--shadow-sm);
  max-width: 1200px;
}

.seccion-Bienvenida, .seccion-cuidado {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  margin: clamp(1rem, 3vw, 2rem) auto;
  box-shadow: var(--shadow-sm);
  max-width: 1200px;
}

.seccion:first-of-type {
  margin-top: 0;
}

.titulo-seccion {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  position: relative;
  padding-bottom: 1rem;
  color: var(--color-primary);
  font-size: clamp(1.8rem, 5vw, 2.25rem);
  font-weight: 700;
}

.titulo-seccion::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

/* ==========================
   TARJETAS DE PLISADOS
   ========================== */
.plisados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
  margin-top: 2rem;
}

.plisado-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.plisado-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.plisado-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

.plisado-content {
  padding: clamp(1rem, 3vw, 1.5rem);
  text-align: justify;
}

.plisado-content h3 {
  color: var(--color-secondary);
  margin-bottom: 1rem;
  font-size: clamp(1.3rem, 4vw, 1.5rem);
  text-align: justify;
}

.plisado-content p {
  margin-bottom: 1rem;
  text-align: justify;
  color: var(--color-text-light);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* ==========================
   GALERÍA
   ========================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1/1;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.hover-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(255, 66, 98, 1), rgba(255, 66, 98, 0.5), transparent);
  color: var(--color-white);
  padding: clamp(1rem, 3vw, 1.5rem) 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-weight: 600;
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.gallery-item:hover .hover-text {
  opacity: 1;
}

/* ==========================
   CONTACTO
   ========================== */
.contacto-section {
  text-align: center;
  background-color: rgba(249, 249, 249, 0.95);
}

.texto-contacto {
  max-width: 800px;
  margin: 0 auto clamp(1rem, 3vw, 1.5rem);
  color: var(--color-text-light);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
}

.contacto-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.5rem);
  margin-top: clamp(2rem, 5vw, 2.5rem);
}

.btn-whatsapp,
.btn-facebook,
.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1.5rem, 4vw, 2rem);
  font-family: var(--font-main);
  font-size: clamp(1rem, 3vw, 1.1rem);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  color: white;
  min-width: 200px;
  justify-content: center;
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
}

.btn-whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-facebook {
  background-color: var(--color-facebook);
}

.btn-facebook:hover {
  background-color: var(--color-facebook-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-email {
  background-color: var(--color-email);
}

.btn-email:hover {
  background-color: var(--color-email-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.whatsapp-icon,
.facebook-icon,
.email-icon {
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
}

/* ==========================
   FOOTER
   ========================== */
.site-footer {
  background-color: var(--color-footer);
  color: var(--color-white);
  padding: clamp(2rem, 5vw, 3rem) 0;
  text-align: center;
  margin-top: auto;
}

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

.site-footer p {
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.site-footer address {
  font-style: normal;
  line-height: 1.6;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  margin: 1rem 0;
}

.footer-contact {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-link {
  color: var(--color-white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  padding: 0.3rem 0;
}

.footer-link:hover {
  color: var(--color-header);
  text-decoration: underline;
}

.footer-contact-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0;
}

.footer-hours {
  margin-top: 1rem;
  line-height: 1.6;
}

.location-icon,
.phone-icon,
.whatsapp-icon,
.email-icon {
  font-size: 1.2rem;
}

.map-responsive {
  position: relative;
  overflow: hidden;
  padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
  height: 0;
  margin: 20px 0;
}

.map-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lista-cuidados {
  list-style: disc;
  padding-left: 20px;
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
}

/* ==========================
   RESPONSIVE DESIGN
   ========================== */

/* Estilos base para evitar scroll cuando el menú está abierto */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Media query principal para pantallas menores a 992px */
@media (max-width: 992px) {
  body {
    background-attachment: scroll; /* Fondo desplazable en móviles */
  }

  .site-header {
    padding: 0.5rem 0; /* Padding compacto */
  }

  .header-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.5rem clamp(0.5rem, 2vw, 1rem); /* Padding responsivo */
  }

  .logo-title-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .brand-title {
    text-align: left;
  }

  .brand-title h1 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }

  .brand-title .tagline {
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  }

  /* Botón hamburguesa */
  .menu-toggle {
    display: block;
    margin-left: auto;
    padding: 0.5rem;
    font-size: 1.8rem;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .menu-toggle:hover,
  .menu-toggle:focus {
    color: var(--color-secondary); /* Color de hover para accesibilidad */
    outline: 2px solid var(--color-primary); /* Mejora accesibilidad */
  }

  /* Menú móvil */
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease, visibility 0.4s ease;
    z-index: 998;
  }

  .main-nav.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    max-width: 280px; /* Ancho más compacto */
    text-align: center;
  }

  .nav-item {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .nav-link {
    display: block;
    color: var(--color-primary);
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 1.1rem; /* Texto ligeramente más grande para mejor legibilidad */
    transition: background-color 0.3s ease;
  }

  .nav-link:hover,
  .nav-link:focus {
    background-color: rgba(227, 37, 107, 0.05); /* Efecto hover más sutil */
    outline: none; /* Evita outline predeterminado */
  }

  .nav-link::after {
    content: none; /* Sin línea animada en móvil */
  }
}

/* Pantallas menores a 768px */
@media (max-width: 768px) {
  .plisados-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Tamaño mínimo ajustado */
    gap: 0.5rem; /* Espacio más compacto */
  }

  .contacto-buttons {
    flex-direction: column;
    gap: 0.75rem; /* Espacio más ajustado */
  }

  .btn-whatsapp,
  .btn-facebook,
  .btn-email {
    width: 100%;
    font-size: clamp(0.9rem, 3vw, 1rem); /* Texto responsivo */
  }
}

/* Pantallas menores a 480px */
@media (max-width: 480px) {
  .logo {
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
  }

  .brand-title h1 {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
  }

  .brand-title .tagline {
    font-size: clamp(0.65rem, 2.5vw, 0.75rem);
  }

  .seccion {
    padding: clamp(1rem, 4vw, 1.5rem) 0;
    margin: clamp(0.5rem, 2vw, 0.75rem) auto;
  }

  .titulo-seccion {
    font-size: clamp(1.3rem, 4.5vw, 1.6rem);
  }
}

/* Pantallas menores a 360px */
@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }

  .titulo-seccion {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
  }

  .nav-link {
    padding: 0.8rem; /* Padding más compacto */
    font-size: 1rem; /* Tamaño de fuente ajustado */
  }
}

/* ==========================
   ANIMACIONES
   ========================== */
#bienvenida { animation-delay: 0.1s; }
#tipos-plisados { animation-delay: 0.2s; }
#galeria-recto { animation-delay: 0.3s; }
#galeria-circular { animation-delay: 0.4s; }
#galeria-smock { animation-delay: 0.5s; }
#contacto { animation-delay: 0.6s; }

/* ==========================
   ESTILOS PARA SECCIÓN CUIDADO
   ========================== */
.cuidado-content {
  max-width: 800px;
  margin: 0 auto;
}

.cuidado-intro {
  margin-bottom: 2rem;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  text-align: center;
  line-height: 1.7;
}

.cuidado-list-container {
  margin: 2rem 0;
}

.lista-cuidados {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cuidado-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.cuidado-item:hover {
  background-color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.cuidado-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  color: var(--color-primary);
}

.cuidado-text {
  flex: 1;
  color: var(--color-text);
  line-height: 1.7;
}

.cuidado-text strong {
  color: var(--color-secondary);
}

.cuidado-conclusion {
  margin-top: 2rem;
  text-align: center;
}

.conclusion-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  font-style: italic;
}

@media (max-width: 768px) {
  .cuidado-item {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .cuidado-icon {
    align-self: center;
  }
}



/* ==========================
   ESTILOS BIENVENIDA
   ========================== */
.welcome-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.welcome-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.welcome-cta {
  font-size: 1.2rem;
  margin-top: 2rem;
  color: var(--color-text);
  font-weight: 500;
}

.welcome-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.welcome-link:hover {
  color: var(--color-secondary);
  border-bottom-color: var(--color-primary);
}

@media (max-width: 768px) {
  .welcome-text {
    font-size: 1rem;
    text-align: left;
  }
}

/* ==========================
   ESTILOS PARA SECCIÓN NOSOTROS
   ========================== */
.seccion-nosotros {
  background-color: #ffffff;
  padding: 60px 20px;
}

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

.nosotros-intro {
  margin-bottom: 2rem;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  text-align: center;
  line-height: 1.7;
}

.lista-nosotros {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nosotros-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nosotros-item:hover {
  background-color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.nosotros-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  color: var(--color-primary);
}

.nosotros-text {
  flex: 1;
  color: var(--color-text);
  line-height: 1.7;
}

.nosotros-text strong {
  color: var(--color-secondary);
}

.nosotros-galeria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.nosotros-galeria img {
  width: 100%;
  max-width: 240px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.nosotros-galeria img:hover {
  transform: scale(1.05);
}

.nosotros-conclusion {
  margin-top: 2rem;
  text-align: center;
}

.conclusion-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  font-style: italic;
}

@media (max-width: 768px) {
  .nosotros-item {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .nosotros-icon {
    align-self: center;
  }

  .nosotros-galeria {
    flex-direction: column;
    align-items: center;
  }
}


/* ==========================
   ESTILOS PARA SECCIÓN INSTRUCCION
   ========================== */
/* Instrucciones Section */
.instrucciones {
  padding: 60px 0;
  background-color: #ffffff; /* Light background for contrast */
  text-align: center;
}

/* Container for consistent layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  /* Fallback for IE9 and below */
  width: 100%;
  box-sizing: border-box;
}

/* Section Title */
.titulo-seccion {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 30px;
  line-height: 1.2;
  /* Fallback for IE8 */
  font-family: Arial, sans-serif;
}

/* Instruction Text */
.texto-instrucciones {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  /* Fallback for IE8 */
  font-family: Arial, sans-serif;
}

/* Instruction List */
.lista-instrucciones {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Fallback for IE9 and below */
  display: block;
}

.lista-instrucciones li {
  display: flex;
  align-items: flex-start;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: #444;
  line-height: 1.5;
  padding-left: 40px;
  position: relative;
  /* Fallback for IE9 */
  float: none;
  width: 100%;
}

/* Icon for each list item using Font Awesome */
.lista-instrucciones li::before {
  content: '\f0da'; /* Font Awesome right arrow icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #6b4e31; /* Elegant brown */
  font-size: 1.2rem;
  position: absolute;
  left: 0;
  top: 2px;
  /* Fallback for IE8 */
  content: '';
  background: url('images/arrow-fallback.png') no-repeat center;
  width erected: 20px;
  height: 20px;
}

/* Ensure strong text stands out */
.texto-instrucciones strong {
  font-weight: 600;
  color: #333;
}

/* Instructions Gallery */
.instrucciones-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px auto;
  max-width: 1000px;
  /* Fallback for IE9 and below */
  display: block;
}

.instrucciones-item {
  margin: 0;
  /* Fallback for IE9 */
  float: left;
  width: 33.33%;
  box-sizing: border-box;
  padding: 10px;
}

.instrucciones-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Fallback for IE8 */
  border: 1px solid #ddd;
}

.instrucciones-item figcaption {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: #555;
  margin-top: 10px;
  text-align: center;
  /* Fallback for IE8 */
  font-family: Arial, sans-serif;
}

/* Clearfix for float fallback in older browsers */
.instrucciones-gallery::after {
  content: '';
  display: table;
  clear: both;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .titulo-seccion {
    font-size: 2rem;
  }

  .texto-instrucciones {
    font-size: 1rem;
  }

  .lista-instrucciones li {
    font-size: 0.95rem;
    padding-left: 35px;
  }

  .instrucciones-item {
    width: 50%; /* Two columns on medium screens */
  }
}

@media screen and (max-width: 480px) {
  .titulo-seccion {
    font-size: 1.8rem;
  }

  .texto-instrucciones {
    font-size: 0.9rem;
  }

  .lista-instrucciones li {
    font-size: 0.9rem;
    padding-left: 30px;
  }

  .instrucciones-item {
    width: 100%; /* One column on small screens */
  }
}

/* IE8 Fallback for Font Awesome and Grid */
@media screen and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .lista-instrucciones li::before {
    background: url('images/arrow-fallback.png') no-repeat center;
    content: '';
    width: 20px;
    height: 20px;
  }

  .instrucciones-item {
    width: 100%; /* Stack images in IE8 */
  }
}