:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-muted: #666666;
    --primary: #0052a3;
    --secondary: #004080;
    --accent: #0066cc;
    --glass: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-highlight: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif;
    -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

body {
    background-color: var(--bg); color: var(--text); overflow-x: hidden; min-height: 100vh;
}

/* --- VISTAS INDEPENDIENTES --- */
main { padding-top: 0; min-height: 80vh; }

.view-section { 
    display: none; 
    animation: fadeIn 0.5s ease-in-out; 
    padding: 20px; 
    max-width: 1000px; 
    margin: 0 auto; 
    width: 100%;
}
.view-section.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes pulse { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.2; } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

/* --- NAVEGACIÓN --- */
.glass-nav {
    position: sticky; top: 0; left: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border); padding: 15px 25px;
    display: flex; align-items: center; justify-content: center;
    width: 100%; gap: 15px;
    z-index: 9999; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    animation: slideInDown 0.5s ease-out;
}

.nav-links { display: flex; gap: 5px; }
.nav-links { gap: 12px; }

.nav-logo {
    font-size: 1.5rem; font-weight: 900; color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 8px 16px; border-radius: 8px; margin-right: 20px;
    animation: slideInLeft 0.5s ease-out;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 82, 163, 0.3);
}

.section-header { text-align: center; margin-bottom: 20px; }
.section-header .section-title { font-weight: 900; color: var(--primary); }
.section-header .section-subtitle { color: var(--text-muted); }
.icon-header-wrapper { display: flex; justify-content: center; align-items: center; margin-bottom: 10px; }

.nav-item {
    background: transparent; border: none; color: var(--text-muted);
    cursor: pointer; padding: 8px 12px;
    border-radius: 6px; transition: 0.25s ease; 
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px; animation: scaleIn 0.4s ease-out;
}
.nav-item span { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.nav-item i { font-size: 1.2rem; margin-bottom: 2px; color: var(--text-muted); }

@media (min-width: 768px) { 
    .nav-item { flex-direction: row; gap: 8px; padding: 10px 16px; }
    .nav-item span { font-size: 0.9rem; }
    .nav-item i { margin-bottom: 0; font-size: 1.1rem; }
}
.nav-item:hover, .nav-item.active { background: var(--glass-highlight); color: var(--primary); }
.nav-item.active { border-bottom: 2px solid var(--primary); }

/* --- HERO --- */
#hero.active { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; height: 80vh; width: 100%;
}
.hero-text-wrapper {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; max-width: 800px;
}
.hero-desc { margin-bottom: 24px; }
.hero-actions { margin-top: 16px; }
.badge-location {
    display: inline-block; background: #f0f4f8; color: var(--primary);
    padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: 600;
    margin-bottom: 20px; border: 1px solid var(--primary);
}
.modern-title { font-size: 2.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 20px; text-align: center; color: var(--primary); }
.gradient-text { color: var(--text); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: none; align-items: center; justify-content: center; z-index: 10000; }
.modal-card { background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%); border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); padding: 18px; width: min(420px, 92vw); }
.modal-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: #f0f4f8; color: var(--primary); margin-bottom: 10px; }
.modal-card h4 { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.modal-card p { color: var(--text-muted); margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-modal { background: var(--accent); color: #fff; border: none; border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.btn-modal.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* Botón principal (restaurado) */
.btn-glow {
    appearance: none; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff; font-weight: 800; letter-spacing: 0.3px;
    padding: 12px 20px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,82,163,0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,82,163,0.45); }
.btn-glow:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(0,82,163,0.35); opacity: 0.95; }

.btn-glow, .btn-contact, .btn-login, .btn-add-photo, .btn-logout, .btn-primary-action, .delete-btn, .btn-modal {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-contact:hover, .btn-login:hover, .btn-add-photo:hover, .btn-logout:hover, .btn-primary-action:hover, .delete-btn:hover, .btn-modal:hover {
    transform: translateY(-2px);
}
.btn-contact:active, .btn-login:active, .btn-add-photo:active, .btn-logout:active, .btn-primary-action:active, .delete-btn:active, .btn-modal:active {
    transform: translateY(0) scale(0.98);
}
/* --- MODERN MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
    display: none; align-items: center; justify-content: center;
    z-index: 10000; opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.custom-modal {
    background: var(--bg); padding: 30px; border-radius: 20px;
    max-width: 400px; width: 90%; text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .custom-modal { transform: scale(1); }

.modal-icon {
    font-size: 3rem; margin-bottom: 15px;
    display: inline-block;
}
.modal-icon.error { color: #ff4757; }
.modal-icon.success { color: #2ed573; }
.modal-icon.info { color: var(--primary); }

.modal-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.modal-message { color: var(--text-muted); margin-bottom: 25px; line-height: 1.5; }

.modal-btn {
    background: var(--primary); color: white; border: none;
    padding: 12px 30px; border-radius: 12px; font-weight: 600;
    cursor: pointer; transition: 0.3s ease; width: 100%; font-size: 1rem;
}
.modal-btn:hover { background: var(--secondary); transform: translateY(-2px); }

/* --- LOGIN FORM --- */
.login-card {
    max-width: 420px; margin: 60px auto; padding: 30px;
    background: #fff; border-radius: 20px; text-align: center;
    box-shadow: 0 12px 34px rgba(0,0,0,0.08); border: 1px solid var(--glass-border);
}
.login-header { margin-bottom: 15px; }
.login-header i { font-size: 2rem; color: var(--primary); }
.login-header h2 { font-weight: 900; color: var(--primary); }
.login-header p { color: var(--text-muted); }
.login-form .form-group { margin-bottom: 14px; text-align: left; }
.login-form label { display: block; margin-bottom: 5px; font-weight: 700; color: var(--text-muted); }
.login-form input {
    width: 100%; padding: 12px; border: 1px solid var(--glass-border);
    border-radius: 10px; font-size: 1rem; background: #f7f9fc; transition: 0.25s;
}
.login-form input:focus { border-color: var(--primary); outline: none; background: #fff; }
.btn-login {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff; border: none; border-radius: 12px; padding: 12px 20px;
    font-weight: 800; cursor: pointer; width: 100%;
    box-shadow: 0 8px 20px rgba(0,82,163,0.3); transition: 0.25s ease;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,82,163,0.4); }

/* --- ADMIN DASHBOARD --- */
.admin-dashboard { padding: 20px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.btn-logout { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: white; 
    padding: 8px 16px; border-radius: 10px; border: none; cursor: pointer; font-weight: 800;
}
.admin-content { display: grid; gap: 24px; }
.admin-panel h3, .admin-gallery h3 { color: var(--primary); margin-bottom: 12px; }
.photo-form {
    background: white; padding: 20px; border-radius: 15px; margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.file-upload-wrapper {
    border: 2px dashed var(--glass-border); padding: 30px; text-align: center;
    border-radius: 10px; margin-bottom: 15px; cursor: pointer; transition: 0.3s;
}
.file-upload-wrapper:hover { border-color: var(--primary); background: var(--glass); }
.photo-form .form-group { margin-bottom: 16px; }
.photo-form input[type="text"], .photo-form input[type="file"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--glass-border);
    border-radius: 10px; background: #f7f9fc;
}
.btn-add-photo {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff; border: none; border-radius: 10px; padding: 10px 16px;
    font-weight: 800; cursor: pointer; transition: 0.25s ease;
}
.btn-add-photo:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,82,163,0.3); }

.gallery-admin-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px;
}
.admin-photo-card { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.admin-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.delete-btn {
    position: absolute; top: 5px; right: 5px; 
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white; border: none; width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* --- OTHER SECTIONS FROM ORIGINAL CSS --- */
.gallery-container { padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
.gallery-title { font-size: 1.8rem; margin-bottom: 30px; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .overlay {
    position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0.0), rgba(0,0,0,0.35));
    color: white; padding: 16px; display: flex; align-items: center; justify-content: center; text-align: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover .overlay { opacity: 1; }

/* Grid Modern */
.grid-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 40px 0; }
.glass-card {
    background: white; padding: 25px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--glass-border); transition: 0.3s ease;
}
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.card-icon-wrapper { font-size: 2rem; color: var(--primary); margin-bottom: 15px; }
.glass-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.glass-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.card-primary { border-left: 4px solid var(--primary); }
.card-secondary { border-left: 4px solid var(--secondary); }
.card-tertiary { border-left: 4px solid var(--accent); }

/* Schedule */
.schedule-container { background: white; border-radius: 20px; padding: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.schedule-row { display: flex; padding: 15px 0; border-bottom: 1px solid var(--glass-border); align-items: center; }
.schedule-row:last-child { border-bottom: none; }
.time-col { min-width: 100px; display: flex; flex-direction: column; color: var(--primary); font-weight: 700; }
.time-col .day { font-size: 0.8rem; opacity: 0.8; }
.time-col .time { font-size: 1.1rem; }
.info-col h4 { font-size: 1.1rem; margin-bottom: 4px; }
.info-col .verse { font-style: italic; font-size: 0.9rem; color: var(--text-muted); }
.schedule-actions { text-align: center; }
.btn-primary-action { 
    display: inline-flex; align-items: center; gap: 8px; 
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff; padding: 12px 18px; border-radius: 12px; text-decoration: none; font-weight: 800;
    box-shadow: 0 8px 20px rgba(0,82,163,0.3);
}

/* Contact */
.pastor-card { text-align: center; padding: 40px 20px; background: white; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.profile-image-placeholder { 
    width: 100px; height: 100px; background: var(--glass-highlight); border-radius: 50%; 
    margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--primary);
}
.contact-actions { display: flex; flex-direction: column; gap: 10px; max-width: 300px; margin: 30px auto 0; }
.btn-contact {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 600; color: white;
    transition: 0.3s ease;
}
.btn-contact:hover { transform: translateY(-2px); opacity: 0.95; }
.btn-contact.whatsapp, .btn-contact.gmail, .btn-contact.youtube {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.subtle-credit { text-align: center; padding: 20px; font-size: 0.8rem; color: var(--text-muted); opacity: 0.5; }

/* Audio / Prédicas */
.audio-card h3 { text-align: center; }
.youtube-audio-wrapper {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-width: 900px; margin: 0 auto;
}
.youtube-audio-wrapper iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.cta-container { margin-top: 20px; text-align: center; }

/* Responsive */
@media (max-width: 768px) {
    .modern-title { font-size: 2rem; }
    .hero-text-wrapper { padding: 0 20px; }
    #hero.active { height: auto; padding-top: 40px; }
    .glass-nav { padding: 10px 12px; }
    .nav-links { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 8px; padding-bottom: 6px; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-item { padding: 8px 10px; background: transparent; border: none; scroll-snap-align: center; }
    .nav-item span { font-size: 0.8rem; }
    .nav-item i { font-size: 1.1rem; }
    .grid-modern { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .contact-actions { width: 100%; }
    .login-container { margin: 30px auto; padding: 20px; }
}

@media (max-width: 480px) {
    .modern-title { font-size: 1.7rem; }
    .badge-location { font-size: 0.8rem; padding: 6px 12px; }
    .video-frame-container { margin-top: 12px; }
    .schedule-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .time-col { flex-direction: row; gap: 8px; }
}

/* Video Frame */
.video-frame-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 15px; margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.video-frame-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Admin Specific */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    width: 100%;
}
.admin-login .login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
