/* ===== FUENTES ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ===== VARIABLES ===== */
:root {
    --color-primary: #c41e3a;
    --color-primary-dark: #8b0000;
    --color-gold: #d4af37;
    --color-gold-light: #f4e4bc;
    --color-cream: #fdf8f0;
    --color-warm-white: #fffef9;
    --color-text: #2d2d2d;
    --color-text-light: #5a5a5a;
    --color-green: #1d4a3a;
    --color-green-light: #2d6a4f;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, sans-serif;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-strong: 0 12px 40px rgba(0,0,0,0.18);
    --border-radius: 16px;
    --border-radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-cream);
    overflow-x: hidden;
}

/* ===== DECORATIVE BACKGROUND ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(196, 30, 58, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(29, 74, 58, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }

p {
    margin-bottom: 1rem;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 60px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("../uploads/header.jpg");
    background-size: cover;
    opacity: 0.5;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header h1 {
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-subtitle {
    color: var(--color-gold-light);
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ===== CONTADOR ===== */
.counter-section {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

.counter-card {
    background: var(--color-warm-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.counter-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.counter-label {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.progress-bar {
    background: var(--color-gold-light);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-primary) 100%);
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* ===== SECCIONES ===== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--color-warm-white);
}

.section-green {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-light) 100%);
    color: white;
}

.section-green h2,
.section-green h3 {
    color: white;
}

.section-green p {
    color: rgba(255,255,255,0.9);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.section-green .section-header p {
    color: rgba(255,255,255,0.85);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.content-block {
    max-width: 800px;
    margin: 0 auto 40px;
}

.highlight-text {
    font-size: 1.25rem;
    color: var(--color-text);
    line-height: 1.8;
    text-align: center;
}

/* ===== CÓMO FUNCIONA ===== */
.how-it-works {
    background: var(--color-warm-white);
    border-radius: var(--border-radius);
    padding: 50px;
    margin-top: 40px;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--color-gold);
}

.how-it-works h3 {
    color: var(--color-primary);
    margin-bottom: 24px;
}

.steps {
    display: grid;
    gap: 24px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--color-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 4px;
}

/* ===== MEDIA PLACEHOLDER ===== */
.media-placeholder {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(196, 30, 58, 0.1) 100%);
    border: 2px dashed var(--color-gold);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
}

.media-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.media-placeholder p {
    color: var(--color-text-light);
    margin: 0;
}

.video-container {

}

.video-background {
    top: 50%;
    left: 50%;
    /* Centra el video y asegura que cubra todo el contenedor */
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 70%;
    filter: blur(5px); /* Ajusta el valor de píxeles (ej. 5px, 15px) para mayor o menor desenfoque */
    -webkit-filter: blur(5px);
}

.video-no-background {
    top: 50%;
    left: 50%;
    /* Centra el video y asegura que cubra todo el contenedor */
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 70%;
}

.content-overlay {
    position: relative;
    z-index: 1; /* Asegura que este contenido esté por encima del video desenfocado */
    color: white;
    text-align: center;
    padding-top: 20vh; /* Ajusta el posicionamiento del contenido */
    /* Puedes añadir más estilos para el texto aquí */
}

/* ===== BOTONES ===== */
.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(29, 74, 58, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(29, 74, 58, 0.5);
}

.btn-icon {
    font-size: 1.3rem;
}

/* ===== TARJETAS DE REFUGIOS ===== */
.shelters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.shelter-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
}

.shelter-image{
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.shelter-card:hover {
    transform: translateY(-5px);
}

.shelter-card h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shelter-card h3::before {
    content: '🐱';
    font-size: 1.5rem;
}

.shelter-card p {
    line-height: 1.8;
}

/* ===== SOBRE MÍ ===== */
.about-section {
    text-align: center;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.9;
}

.signature {
    margin-top: 30px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-primary);
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--color-warm-white);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-strong);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.modal-header h3 {
    color: var(--color-primary);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-primary);
}

.modal-body {
    padding: 30px;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ===== LISTA DE NIÑOS ===== */
.children-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.children-category {
    margin-bottom: 20px;
}

.children-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.child-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.02);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.child-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.child-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
}

.child-item label {
    flex: 1;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.child-name {
    font-weight: 500;
}

.child-age {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.7);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin: 0;
}

.footer-heart {
    color: var(--color-primary);
}

/* ===== ALERTAS ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: none;
}

.alert.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: rgba(29, 74, 58, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(29, 74, 58, 0.2);
}

.alert-error {
    background: rgba(196, 30, 58, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(196, 30, 58, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header {
        padding: 40px 0 60px;
    }
    
    .counter-card {
        padding: 30px 20px;
    }
    
    .counter-number {
        font-size: 3rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .how-it-works {
        padding: 30px 20px;
    }
    
    .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .shelters-grid {
        grid-template-columns: 1fr;
    }
    
    .shelter-card {
        padding: 30px 20px;
    }
    
    .modal {
        margin: 10px;
    }
}

/* ===== SNOWFLAKES DECORATION ===== */
.snowflake {
    position: fixed;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    top: -20px;
    animation: snowfall linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* ===== ESTILOS PARA RESULTADOS ADMIN ===== */
.admin-item {
    background: rgba(0,0,0,0.03);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--color-gold);
}

.admin-item.sponsored {
    border-left-color: var(--color-green);
    background: rgba(29, 74, 58, 0.05);
}

.admin-item.available {
    border-left-color: var(--color-primary);
    background: rgba(196, 30, 58, 0.05);
}

.admin-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.admin-item-name {
    font-weight: 600;
    color: var(--color-text);
}

.admin-item-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.admin-item-badge.sponsored {
    background: var(--color-green);
    color: white;
}

.admin-item-badge.available {
    background: var(--color-primary);
    color: white;
}

.admin-item-details {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.admin-item-details span {
    display: block;
    margin-top: 4px;
}

/* ===== RESPONSIVE WHATSAPP ===== */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}


/* ===== FIN DEL CSS ===== */

/* Spinner de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}