/* =========================================== */
/* ESTILOS GENERALES Y PARA MÓVIL (Mobile First) */
/* =========================================== */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f7f7f7;
}

/* ... (otros estilos como header, botones, etc. que ya estaban bien) ... */

/* --- ESTILOS PARA EL FOOTER (Mobile First) --- */

.condiciones{
  padding:15px; margin-top: 50px;
}
.condiciones h2{
  text-align: center;
}
.site-footer {
    background-color: #222222;
    color: #f1f1f1;
    padding: 50px 0 20px;
    font-family: Arial, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap; /* Permite que las columnas se apilen */
    justify-content: space-between;
}

.footer-column {
    width: 100%; /* En móvil, cada columna ocupa el 100% del ancho */
    margin-bottom: 30px; /* Espacio para separar las columnas cuando se apilan */
    text-align: center; /* Centrado para la vista móvil */
}

/* ... (el resto de los estilos del footer que no cambian) ... */
.footer-title { font-size: 1.2em; color: #ffffff; margin-bottom: 20px; font-weight: bold; text-transform: uppercase; }
.footer-logo img { max-width: 150px; height: auto;border-radius: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #f1f1f1; text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: #8a1538; text-decoration: underline; }
.social-links a { display: inline-block; color: #ffffff; background-color: #333333; width: 44px; height: 44px; line-height: 44px; text-align: center; margin: 0 5px; border-radius: 50%; font-size: 1.2em; transition: background-color 0.3s ease; }
.social-links a:hover { background-color: #8a1538; color: #ffffff; transform: scale(1.10); }
.footer-copyright { text-align: center; padding-top: 20px; margin-top: 30px; border-top: 1px solid #444444; color: #999999; font-size: 0.9em; }

/* --- Cards grid (Mobile First) --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  margin:10px;
}

.card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease-in-out;
}
.btn-votar{ background: #8a1538;border: 0;border-radius: 8px; color: #fff; padding: 10px 30px;}
.btn-votar:hover{  transform: scale(1.10);}

.card:hover{transform: scale(1.03);}

.card img {
  width: 100%; /* CORRECTO: Siempre se ajustará al contenedor */
  height: 300px;
  object-fit: contain;
  padding-top: 10px;
  
}

/* ... (resto de estilos de la card que ya estaban bien) ... */
.card h3 { margin: 10px 0 0; }
.card p { color: #555; margin: 10px 0 10px; }
.card a { display: inline-block; margin: 10px 0 20px; padding: 10px 20px; background: #8a1538; color: #fff; text-decoration: none; border-radius: 8px; transition: background 0.3s; }
.card a:hover { background: #a61f4d; transform: scale(1.10);}
#card-img{  background: #fff;padding:5px; border-radius: 15px;}

.detalle {
  padding: 40px 20px;
  background: #fff;
  margin: 40px auto;
  max-width: 600px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.portada { width: 100%; min-height: 300px; overflow: hidden; background: #f7f7f7; color: #8a1538; /*padding-bottom: 20px;margin:10px; */ }
.portada h1,.portada h2 { text-align: center; color: #8a1538; font-family: Verdana, Geneva, Tahoma, sans-serif; margin-top: 10px; background-color: #f7f7f7; }
.imagen-portada { width: 100%; height: auto; min-height: 60%; object-fit: cover; }


/* ===== MENÚ PRINCIPAL (Mobile First) ===== */
.main-nav { background: #8a1538; color: #fff; position: fixed; top: 0; width: 100%; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: auto; padding: 10px 20px; }
.nav-links { list-style: none; display: none; /* Oculto en móvil por defecto */ flex-direction: column; background: #8a1538; position: absolute; top: 40px; /* Ajusta según el alto de tu nav */ right: 0; width: 200px; padding: 20px; border-radius: 0 0 8px 8px; /*margin-bottom: 20px;*/}
.nav-links.active { display: flex;/*margin:20px; */} /* Se muestra con JS */
.nav-links li { display: inline; margin: 10px;}
.nav-links a { color: #fff; text-decoration: none; font-weight: bold; padding: 15px 15px 20px 20px ; border-radius: 5px; transition: background 0.3s;margin:10px;}
.nav-links a:hover { background: #a61f4d; }
.nav-toggle { display: block; /* Visible en móvil por defecto */ font-size: 1.8rem; background: none; border: none; color: #fff; cursor: pointer; }

/* Estilos para el spinner */
.spinner {
  border: 8px solid #f3f3f3; /* Color de fondo */
  border-top: 8px solid #3498db; /* Color del spinner */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  display: none; /* Oculto por defecto */
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#myButton {display: none; /* Oculto por defecto */
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
}
/* Estilos para el fondo del alert */
.alert {
  display: none; /* Oculto por defecto */
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f8d7da; /* Color de fondo */
  color: #721c24; /* Color del texto */
  border: 1px solid #f5c6cb; /* Borde */
  border-radius: 5px;
  padding: 20px;
  z-index: 1001; /* Asegura que esté por encima de otros elementos */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilo para el botón de cerrar */
.close-btn {
  background-color: #721c24;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
  margin-top: 10px;
}
/* =========================================== */
/* ESTILOS PARA TABLET Y ESCRITORIO */
/* =========================================== */
@media (min-width: 768px) {
    .condiciones{
      padding:25px;margin-top: 50px;
    }
    .condiciones h2{
      text-align: center;
    }
    /* --- AJUSTES DEL FOOTER PARA ESCRITORIO --- */
    .footer-column {
        width: 30%; /* En escritorio, las 3 columnas se distribuyen */
        margin-bottom: 0; /* Sin margen inferior porque están en línea */
        text-align: center; /* Alineado a la izquierda */
    }

    /* --- AJUSTES DEL MENÚ PARA ESCRITORIO --- */
    .nav-links {
        display: flex; /* Muestra los enlaces */
        position: static; /* Vuelve a su posición normal */
        flex-direction: row; /* Enlaces en fila */
        width: auto; /* Ancho automático */
        background: none; /* Sin fondo */
        padding: 0;
        gap: 20px;
        margin:5px;
        
    }

    .nav-toggle {
        display: none; /* Oculta el botón hamburguesa */
    }
    
    /* --- AJUSTES DEL SLIDER --- */
    .slider {
        height: 600px;
    }
    .grid{ margin-top:10px;}
    #card-img{ background: #fff; border-radius: 8px; padding:5px;}
}