/* ============================================
   IGLESIA DE CRISTO ATIQUIZAYA - ESTILOS
   ============================================ */

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

:root {
    --gold: #D4AF37;
    --gold-light: rgba(212,175,55,0.15);
    --gold-border: rgba(212,175,55,0.25);
    --bg-dark: #0a1628;
    --bg-card: #0d1f3c;
    --bg-card-hover: #122a4a;
    --text-primary: #e8e8e8;
    --text-secondary: #8aa4c0;
    --text-muted: #5a7a9a;
    --green: #2ecc71;
    --red: #e74c3c;
    --blue: #4A90E2;
    --orange: #e67e22;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, #0d1f3c 0%, #1a3a5c 50%, #0d1f3c 100%);
    border-bottom: 2px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
}

.site-logo:hover { text-decoration: none; }

.logo-icon { font-size: 2rem; }
.logo-title { color: var(--gold); font-weight: bold; font-size: 1.1rem; letter-spacing: 1px; line-height: 1.2; }
.logo-subtitle { color: var(--text-secondary); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; }

/* Navigation */
.main-nav { display: flex; gap: 4px; align-items: center; }

.nav-link {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link:hover { color: var(--gold); background: var(--gold-light); }
.nav-link.active { color: var(--gold); background: var(--gold-light); border-color: var(--gold-border); }
.nav-label { font-size: 0.85rem; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.btn-login {
    background: var(--gold-light);
    border: 1px solid var(--gold-border);
    color: var(--gold);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-login:hover { background: rgba(212,175,55,0.25); }

.btn-logout {
    background: rgba(255,107,107,0.15);
    border: 1px solid rgba(255,107,107,0.3);
    color: #FF6B6B;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
}

.user-name { color: var(--gold); font-size: 0.8rem; }

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--gold);
    cursor: pointer;
    padding: 4px;
    font-size: 1.5rem;
}

/* Mobile nav */
.mobile-nav {
    display: none;
    background: var(--bg-card);
    border-top: 1px solid var(--gold-border);
    padding: 15px;
}

.mobile-nav.open { display: block; }

.mobile-nav .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    margin-bottom: 4px;
    font-size: 1rem;
}

/* ===== MAIN CONTENT ===== */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: var(--radius);
    padding: 25px;
    transition: all 0.3s;
}

.card:hover { border-color: var(--gold-border); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 50px;
    background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, rgba(26,58,92,0.25) 50%, rgba(212,175,55,0.06) 100%);
    border-radius: 20px;
    border: 1px solid rgba(212,175,55,0.15);
    position: relative;
    overflow: hidden;
}

.hero-icon { font-size: 4rem; margin-bottom: 15px; }
.hero h1 { color: var(--gold); font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 10px; letter-spacing: 2px; }
.hero-location { color: var(--text-secondary); font-size: clamp(1rem, 2.5vw, 1.3rem); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 20px; }
.hero-divider { width: 60px; height: 2px; background: var(--gold); margin: 20px auto; }
.hero-verse { color: var(--text-muted); max-width: 600px; margin: 0 auto; line-height: 1.8; font-size: 1.05rem; }
.hero-ref { color: var(--text-muted); margin-top: 8px; font-size: 0.9rem; }

/* ===== GRID LAYOUTS ===== */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }

/* ===== SECTION CARDS (HOME) ===== */
.section-card {
    background: linear-gradient(145deg, var(--bg-card), #1a2d4a);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.section-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-border);
    box-shadow: var(--shadow);
}

.section-card-icon-bg {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0.5;
}

.section-card-icon { font-size: 2.5rem; margin-bottom: 15px; }
.section-card h3 { color: var(--gold); margin-bottom: 4px; font-size: 1.3rem; }
.section-card-subtitle { font-size: 0.85rem; margin-bottom: 10px; font-weight: bold; }
.section-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.section-card-link { margin-top: 15px; color: var(--gold); font-size: 0.85rem; display: flex; align-items: center; gap: 4px; }

/* ===== MONTH CARDS (SYLLABUS) ===== */
.month-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.1);
}

.month-card.current { border: 2px solid var(--green); }

.month-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.month-header .month-name { font-weight: bold; font-size: 1.1rem; }
.month-header .month-focus { font-size: 0.75rem; opacity: 0.85; text-align: right; max-width: 55%; }

.lesson-item {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background 0.2s;
}

.lesson-item:last-child { border-bottom: none; }
.lesson-item.past { opacity: 0.4; }
.lesson-item.exam { background: rgba(230,126,34,0.08); }
.lesson-item.clickable { cursor: pointer; }
.lesson-item.clickable:hover { background: rgba(74,144,226,0.1); }

.date-badge {
    padding: 6px 0;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    width: 38px;
    text-align: center;
    flex-shrink: 0;
}

.lesson-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; margin-bottom: 3px; }
.lesson-verse { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }
.lesson-badge { background: rgba(46,204,113,0.2); color: var(--green); font-size: 0.65rem; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }

/* ===== NEXT CLASS BANNER ===== */
.next-class-banner {
    text-align: center;
    margin-bottom: 30px;
    border-radius: 16px;
    padding: 40px 30px;
    border: 1px solid;
}

.next-class-label {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.next-class-banner h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.5rem); }
.next-class-subtitle { font-size: 1rem; }

.next-class-info {
    margin-top: 20px;
    border-radius: 12px;
    padding: 15px;
    display: inline-block;
}

.next-class-info .label { font-size: 0.8rem; margin-bottom: 4px; }
.next-class-info .title { font-size: 1.1rem; font-weight: bold; color: white; }
.next-class-info .detail { font-size: 0.85rem; }

/* ===== SERMONS ===== */
.sermon-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.1);
}

.sermon-video { position: relative; padding-top: 56.25%; background: #000; }
.sermon-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.sermon-body { padding: 20px; }
.sermon-body h3 { color: var(--gold); margin-bottom: 8px; font-size: 1.15rem; }
.sermon-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 4px; }
.sermon-verse { color: var(--text-secondary); font-size: 0.85rem; margin-top: 8px; font-style: italic; }
.sermon-notes { color: var(--text-muted); font-size: 0.9rem; margin-top: 10px; line-height: 1.5; }

/* ===== GOSPEL ACCORDION ===== */
.gospel-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.1);
    margin-bottom: 12px;
}

.gospel-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
    transition: background 0.2s;
}

.gospel-header:hover { background: rgba(212,175,55,0.05); }
.gospel-header-left { display: flex; align-items: center; gap: 15px; }
.gospel-icon { font-size: 2rem; }
.gospel-title { color: var(--gold); font-weight: bold; font-size: 1.1rem; }
.gospel-arrow { color: var(--text-muted); transition: transform 0.2s; font-size: 1.2rem; }
.gospel-arrow.open { transform: rotate(90deg); }

.gospel-content {
    padding: 0 25px 25px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    border-top: 1px solid rgba(212,175,55,0.1);
    padding-top: 20px;
    white-space: pre-line;
}

/* ===== MINISTRIES ===== */
.ministry-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid rgba(212,175,55,0.1);
}

.ministry-icon { font-size: 2.5rem; margin-bottom: 12px; }
.ministry-card h3 { color: var(--gold); margin-bottom: 8px; font-size: 1.15rem; }
.ministry-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; margin-bottom: 10px; }
.ministry-schedule { color: var(--text-muted); font-size: 0.8rem; }

.ministry-members {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212,175,55,0.1);
}

.ministry-members-label { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 6px; }
.member-tag { background: var(--gold-light); color: var(--gold); padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; display: inline-block; margin: 2px 4px 2px 0; }

/* ===== NEWS ===== */
.news-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid rgba(212,175,55,0.1);
    border-left: 4px solid var(--gold);
    margin-bottom: 15px;
}

.news-card h3 { color: var(--gold); margin-bottom: 8px; font-size: 1.15rem; }
.news-date { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 10px; }
.news-category { background: var(--gold-light); color: var(--gold); padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; }
.news-content { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* ===== FINANCES ===== */
.finance-stat {
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.finance-stat .label { font-size: 0.8rem; margin-bottom: 6px; }
.finance-stat .value { font-size: 1.8rem; font-weight: bold; font-family: 'Playfair Display', serif; }

.finance-stat.income { background: #0d2818; border: 1px solid rgba(46,204,113,0.3); }
.finance-stat.income .label { color: #6a9a7a; }
.finance-stat.income .value { color: var(--green); }

.finance-stat.expense { background: #2d1a1a; border: 1px solid rgba(231,76,60,0.3); }
.finance-stat.expense .label { color: #9a6a6a; }
.finance-stat.expense .value { color: var(--red); }

.finance-stat.balance { background: #1a2d5c; border: 1px solid rgba(74,144,226,0.3); }
.finance-stat.balance .label { color: var(--text-secondary); }

.finance-table { width: 100%; border-collapse: collapse; }
.finance-table th { padding: 14px 18px; text-align: left; color: var(--gold); font-size: 0.85rem; border-bottom: 1px solid var(--gold-border); }
.finance-table td { padding: 12px 18px; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.finance-type { padding: 3px 10px; border-radius: 8px; font-size: 0.75rem; }
.type-income { background: rgba(46,204,113,0.15); color: var(--green); }
.type-expense { background: rgba(231,76,60,0.15); color: var(--red); }

/* ===== EMPTY STATE ===== */
.empty-state {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    border: 1px solid rgba(212,175,55,0.1);
}

.empty-icon { font-size: 3rem; margin-bottom: 15px; }
.empty-text { color: var(--text-muted); font-size: 1.1rem; }
.empty-hint { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; opacity: 0.7; }

/* ===== SCHEDULE BOX ===== */
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }

.schedule-day {
    background: rgba(212,175,55,0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(212,175,55,0.1);
}

.schedule-day h4 { color: var(--gold); margin-bottom: 10px; font-size: 1.05rem; }
.schedule-day p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 4px; }

/* ===== ADMIN ===== */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 25px; flex-wrap: wrap; }

.tab-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.tab-btn:hover { color: var(--gold); border-color: var(--gold-border); }
.tab-btn.active { color: var(--gold); background: var(--gold-light); border-color: var(--gold-border); }

.admin-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(212,175,55,0.1);
    margin-bottom: 15px;
}

.admin-card h3 { color: var(--gold); margin-bottom: 15px; }

.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #2a4a6a;
    background: var(--bg-dark);
    color: #ccc;
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.form-input:focus { outline: none; border-color: var(--gold); }
.form-textarea { min-height: 80px; resize: vertical; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #b8962e);
    border: none;
    color: var(--bg-dark);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212,175,55,0.3); }

.btn-danger {
    background: rgba(231,76,60,0.15);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--red);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
}

.btn-danger:hover { background: rgba(231,76,60,0.25); }

.btn-back {
    background: transparent;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 0;
}

.btn-back:hover { text-decoration: underline; }

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-list-item .item-title { color: #ccc; font-weight: bold; }
.admin-list-item .item-meta { color: var(--text-muted); font-size: 0.85rem; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.modal-box h2 { color: var(--gold); text-align: center; margin-bottom: 25px; font-size: 1.5rem; }
.modal-error { color: var(--red); font-size: 0.85rem; margin-bottom: 12px; text-align: center; }

.btn-modal-submit {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--gold), #b8962e);
    color: var(--bg-dark);
    font-weight: bold;
    font-size: 1.05rem;
    cursor: pointer;
    font-family: inherit;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #060e1a;
    border-top: 2px solid var(--gold);
    padding: 30px 20px;
    text-align: center;
}

.footer-title { color: var(--gold); font-size: 1.1rem; margin-bottom: 8px; }
.footer-verse { color: var(--text-muted); font-size: 0.85rem; }
.footer-copy { color: #3a5a7a; font-size: 0.75rem; margin-top: 12px; }

/* ===== LESSON VIEWER ===== */
.lesson-frame {
    width: 100%;
    min-height: 80vh;
    border: none;
    border-radius: var(--radius);
    background: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .nav-label { display: none; }
    .nav-link { padding: 8px 10px; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
    .hero { padding: 40px 15px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .header-inner { height: 60px; }
    .site-main { padding: 20px 15px; }
    .schedule-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .section-card { padding: 20px; }
    .finance-table { font-size: 0.8rem; }
    .finance-table th, .finance-table td { padding: 10px 12px; }
}

/* ===== UTILITIES ===== */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.overflow-x { overflow-x: auto; }

/* ===== LOADING ===== */
.loading { text-align: center; padding: 60px; color: var(--gold); font-size: 1.2rem; }
.loading-icon { font-size: 3rem; margin-bottom: 15px; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
