/* =====================================
   ESTILOS GENERALES - PASTEL ROMÁNTICO
====================================== */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #fff5ec, #ffe8d3);
    color: #5e554c;
    overflow-x: hidden;
}

/* ===============================
   TÍTULO PRINCIPAL
=============================== */
.titulo {
    text-align: center;
    padding: 20px 10px;
    position: relative;
}

.titulo h1 {
    font-size: 30px;
    margin: 0;
    color: #d87a38;
    text-shadow: 2px 3px 8px rgba(216,122,56,0.3);
}

.titulo h3 {
    margin-top: 4px;
    font-size: 15px;
    color: #8a6d52;
    font-style: italic;
}

/* ===============================
   FOTO ALEATORIA GRANDE + TEXTO
=============================== */
.fotosAleatorias {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.fotosAleatorias div {
    width: 100%;
    max-width: 380px;
    position: relative;
}

.fotosAleatorias img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 2px dotted #ffdcb1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 0 6px rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
    display: block;
}

.fotosAleatorias p {
    position: absolute;        
    top: 45%;                  
    left: 50%;                 
    transform: translate(-50%, -50%);
    color: white;        
    width: 300px;     
    font-size: 20px;           
    font-weight: bold;         
    text-align: center;
    padding: 6px 10px;         
    border-radius: 10px;       
    background: rgba(0,0,0,0.3);  
    backdrop-filter: blur(4px);    
    -webkit-text-stroke: 0.2px black;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
}

/* ===============================
   NOTIFICACIÓN DE CARTAS
=============================== */
#notificacionCartas {
    position: fixed;
    right: 14px;
    bottom: 14px;
    background: #ffb07c;
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

#notificacionCartas a {
    text-decoration: none;
}

/* ===============================
   CONTENEDORES DE EVENTOS Y CUENTAS
=============================== */
/* POST-IT para Próximo Evento */
#proximoEvento {
    background: #fff59d; /* color amarillo Post-it */
    border-radius: 10px;
    border: 2px solid #ffd700;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.2);
    margin: 12px auto;
    padding: 16px 14px 14px 14px;
    width: 92%;
    max-width: 360px;
    position: relative;
    font-weight: bold;
    color: #5e554c;
    text-align: center;
}

/* Chincheta encima */
#proximoEvento::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 48px;
    background: url('../../archivos/chincheta.png') no-repeat center center;
    background-size: contain;
    z-index: 10; /* <--- esto hace que quede encima de todo */
}

#h4PE {
    font-weight: bold;
    font-family: 'Permanent Marker', 'Comic Sans MS', cursive; /* estilo rotulador */
    font-size: 20px; /* ajusta al tamaño que quieras */
    color: #2206c2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* ligera sombra para efecto rotulador */
}

/* Overlay decorativo opcional (como sombra difusa del Post-it) */
#proximoEvento::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    right: 0; bottom: 0;
    border-radius: 10px;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.08);
    pointer-events: none;
}

/* Contenedores normales */
.contadores {
    background: linear-gradient(145deg, #fff2e3, #ffe0c5);
    border-radius: 14px;
    border: 2px solid #ffd4b1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    margin: 12px auto;
    padding: 14px;
    width: 92%;
    max-width: 360px;
    position: relative;
}

.contadores::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px;
    right: -4px; bottom: -4px;
    border: 2px dashed rgba(216, 122, 56, 0.3);
    border-radius: 16px;
    pointer-events: none;
}

/* ===============================
   TITULOS DE CONTADORES
=============================== */
.contadores h3 {
    text-align: center;
    font-size: 17px;
    color: #bf6a2f;
    margin-bottom: 6px;
}

.contadores h5 {
    text-align: center;
    font-size: 13px;
    color: #8a6d52;
}

/* ===============================
   FORMULARIOS
=============================== */
.contadores form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contadores input, .contadores button {
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 14px;
    border: 2px solid #ffd8b8;
}

.contadores button {
    background: linear-gradient(120deg, #ffa86b, #ff923f);
    color: white;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contadores button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ===============================
   CONTADOR INDIVIDUAL
=============================== */
.contador {
    background: #fff7f0;
    border: 2px solid #ffdfc3;
    border-radius: 14px;
    padding: 10px;
    margin: 8px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: relative;
}

.contador h4 {
    margin: 0 0 5px;
    font-size: 15px;
    color: #cc7533;
    position: relative;
}

.contador h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 30px; height: 2px;
    background: #ffa86b;
    border-radius: 2px;
}

.contador p {
    font-size: 13px;
    line-height: 1.4;
    margin: 4px 0 0;
}

/* BOTONES BORRAR / EDITAR */
.contador button {
    padding: 3px 6px;
    font-size: 11px;
    border-radius: 8px;
    margin-top: 4px;
    margin-right: 4px;
    border: none;
}

.contador button[name="borrarCuentaAtras"] {
    background: #ff6b6b;
    color: white;
}

.contador button[name="borrarCuentaAtras"]:hover {
    background: #e45252;
}

.contador button[name="editarCuentaAtras"] {
    background: #ffa86b;
    color: white;
}

.contador button[name="editarCuentaAtras"]:hover {
    background: #ff923f;
}

/* ===============================
   POP-UPS
=============================== */
#popUp, #popUpEditar {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #fff2e3, #ffe5cc);
    padding: 16px;
    border-radius: 16px;
    border: 2px solid #ffd8b8;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 1000;
}

/* ===============================
   RESPONSIVE IPHONE 14
=============================== */
@media (max-width: 430px) {
    .titulo h1 { font-size: 24px; }
    .titulo h3 { font-size: 14px; }

    /* Imagen adaptada al móvil */
    .fotosAleatorias div {
        max-width: 320px;
    }

    #proximoEvento, .contadores { width: 95%; padding: 12px; }
    .contadores h3 { font-size: 15px; }
    .contadores h5 { font-size: 12px; }
    .contador h4 { font-size: 13px; }
    .contador p { font-size: 12px; }
    .contador button { font-size: 10px; padding: 2px 5px; }
    #popUp, #popUpEditar { width: 90%; padding: 14px; }
}

/* EVITAR QUE EL CONTENIDO BLOQUEE EL NAVBAR */
.titulo,
.fotosAleatorias,
#proximoEvento,
.contadores,
.contador,
#notificacionCartas {
    position: relative;
    z-index: 1 !important;
}
