/* ===============================
   ESTILOS GLOBALES
   =============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative; /* Necesario para el pseudo-elemento */
    background-color: #f5f5f5; /* Color de fondo de respaldo */
}

/* Pseudo-elemento para la imagen de fondo (solo ella recibe los efectos) */
body::before {
    content: "";
    position: fixed; /* Fijo para cubrir toda la vista */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/img/marcaDorada.png');
    background-repeat: no-repeat;
    background-size: 50% auto;           /* Tamaño reducido al 50% */
    background-position: center center;   /* Centrada perfectamente */
    filter: grayscale(100%);              /* Solo escala de grises */
    opacity: 0.15;                        /* Opacidad solo para la imagen */
    pointer-events: none;                  /* La imagen no interactúa con el mouse */
    z-index: -1;                           /* Detrás de todo el contenido */
}

/* ===============================
   HEADER (encabezado)
   =============================== */
.encabezado {
    background: #611232;
    width: 100%;
    flex-shrink: 0; /* Evita que se encoja */
}

.contenedor_encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 90px;
}

.logo {
    max-width: 120px;
    height: 99px;
    display: flex;
    align-items: center;
}

.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.titulo {
    flex-grow: 1;
    text-align: center;
}

.titulo h1 {
    color: white;
    font-size: 50px;
    line-height: 90px;
    margin: 0;
}

/* ===============================
   CONTENIDO CENTRAL (CORREGIDO)
   =============================== */
.contenedor_centro {
    flex: 1 0 auto; /* Esto es clave: crece y se encoge pero mantiene su tamaño base */
    width: 100%;
    padding: 30px 5%;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    min-height: 0; /* Importante para flexbox */
    position: relative; /* Asegura que esté sobre el fondo */
    z-index: 1;
}

.leyenda, .mascota {
    background-color: #DDC9A3;
    min-height: 400px;
    flex: 1 1 300px;
    border-radius: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
    color: #333;
    position: relative;
    overflow: hidden;
}

.leyenda {
    padding-bottom: 60px; /* espacio para la franja inferior */
}

.mascota {
    padding-right: 60px; /* espacio para la franja derecha */
}

.franja_leyenda {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10%;
    background: #611232;
}

.franja_mascota {
    position: absolute;
    top: 0;
    right: 0;
    width: 10%;
    height: 100%;
    background: #611232;
}

.leyenda h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #611232;
    font-weight: 700;
}

.leyenda p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.mascota i {
    font-size: 120px;
    color: #a57f2c;
    margin-bottom: 20px;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

.mascota p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #611232;
    background: rgba(255,255,255,0.6);
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #a57f2c;
}

/* ===============================
   PERSONALIZACIÓN DEL SCROLLBAR
   =============================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #611232;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: #7a1845;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #611232 #f1f1f1;
}

/* ===============================
   RESPONSIVIDAD SUPER COMPLETA
   =============================== */

/* Pantallas grandes (1200px+) */
@media (min-width: 1200px) {
    .contenedor_centro {
        padding: 40px 8%;
        gap: 40px;
    }
    
    .leyenda, .mascota {
        min-height: 450px;
    }
    
    .leyenda h2 {
        font-size: 2.2rem;
    }
    
    .leyenda p {
        font-size: 1.2rem;
    }
}

/* 1024px (tu punto crítico) */
@media (max-width: 1024px) {
    .contenedor_centro {
        padding: 30px 4%;
        gap: 25px;
    }
    
    .leyenda, .mascota {
        min-height: 380px;
    }
    
    .titulo h1 {
        font-size: 42px;
    }
}

/* 900px */
@media (max-width: 900px) {
    .contenedor_centro {
        padding: 25px 4%;
        gap: 22px;
    }

    .leyenda, .mascota {
        min-height: 320px;
        border-radius: 35px;
    }

    .franja_leyenda {
        height: 8%;
    }

    .franja_mascota {
        width: 8%;
    }
    
    .leyenda h2 {
        font-size: 1.8rem;
    }
    
    .leyenda p {
        font-size: 1rem;
    }
    
    .mascota i {
        font-size: 100px;
    }
    
    .mascota p {
        font-size: 1.3rem;
    }
}

/* 768px */
@media (max-width: 768px) {
    .contenedor_encabezado {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .logo {
        margin-bottom: 10px;
        max-width: 100px;
        height: auto;
    }

    .titulo h1 {
        font-size: 30px;
        line-height: 1.2;
    }

    .contenedor_centro {
        padding: 20px 4%;
        gap: 20px;
    }

    .leyenda, .mascota {
        min-height: 280px;
        padding: 25px;
    }
    
    .leyenda {
        padding-bottom: 40px;
    }
    
    .mascota {
        padding-right: 40px;
    }

    .leyenda h2 {
        font-size: 1.5rem;
    }
    
    .leyenda p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .mascota i {
        font-size: 80px;
    }
    
    .mascota p {
        font-size: 1.2rem;
        padding: 6px 16px;
    }
}

/* 600px */
@media (max-width: 600px) {
    .contenedor_centro {
        padding: 15px 3%;
        gap: 15px;
    }
    
    .leyenda, .mascota {
        min-height: 250px;
        border-radius: 25px;
        padding: 20px;
    }
    
    .leyenda {
        padding-bottom: 35px;
    }
    
    .mascota {
        padding-right: 35px;
    }
    
    .leyenda h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .mascota i {
        font-size: 60px;
        margin-bottom: 10px;
    }
    
    .mascota p {
        font-size: 1rem;
        padding: 5px 12px;
    }
    
    .franja_leyenda {
        height: 7%;
    }
    
    .franja_mascota {
        width: 7%;
    }
}

/* 480px (móviles pequeños) */
@media (max-width: 480px) {
    .contenedor_centro {
        padding: 12px 3%;
        gap: 12px;
    }
    
    .leyenda, .mascota {
        min-height: 200px;
        border-radius: 20px;
        padding: 15px;
    }
    
    .leyenda {
        padding-bottom: 28px;
    }
    
    .mascota {
        padding-right: 28px;
    }
    
    .leyenda h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .leyenda p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .mascota i {
        font-size: 45px;
        margin-bottom: 6px;
    }
    
    .mascota p {
        font-size: 0.85rem;
        padding: 4px 10px;
    }
}

/* 360px (móviles muy pequeños) */
@media (max-width: 360px) {
    .contenedor_centro {
        padding: 10px 3%;
    }
    
    .leyenda, .mascota {
        min-height: 180px;
    }
    
    .leyenda h2 {
        font-size: 1rem;
    }
    
    .leyenda p {
        font-size: 0.8rem;
    }
    
    .mascota p {
        font-size: 0.8rem;
    }
    
    .titulo h1 {
        font-size: 24px;
    }
}

/* Ajuste de alturas para pantallas muy altas */
@media (min-height: 1000px) {
    .contenedor_centro {
        padding: 60px 5%;
    }
    
    .leyenda, .mascota {
        min-height: 500px;
    }
}
/* ===============================
   CORRECCIÓN PARA EL DESBORDAMIENTO DEL MENÚ
   =============================== */

/* Ajuste crítico para pantallas entre 800px y 1200px */
@media (min-width: 769px) and (max-width: 1200px) {
    /* Contenedor principal para evitar desbordamiento */
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .contenedor_centro {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding-left: 4%;
        padding-right: 4%;
    }
    
    /* Ajustar las tarjetas para que no se desborden */
    .leyenda, .mascota {
        max-width: calc(50% - 15px);
        min-height: 350px;
    }
    
    .leyenda h2 {
        font-size: 1.6rem;
    }
    
    .leyenda p {
        font-size: 0.95rem;
    }
    
    .mascota i {
        font-size: 90px;
    }
    
    .mascota p {
        font-size: 1.2rem;
    }
}

/* Ajuste específico para 1024px */
@media (min-width: 1000px) and (max-width: 1100px) {
    .leyenda h2 {
        font-size: 1.4rem;
    }
    
    .leyenda p {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}