
/* Variables de colores */
:root {
    --primary-color: #0a2947; /* Azul principal */
    --primary-light: #133c63;
    --primary-dark: #06182a;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #6C757D;
    --dark-gray: #343A40;
    --text-dark: #212529;
    --shadow: 0 4px 6px rgba(10, 41, 71, 0.1);
    --shadow-hover: 0 8px 15px rgba(10, 41, 71, 0.2);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header elegante */
.header-elegant {
    position: relative;
    min-height: 350px;
    background: #0a2947 !important;
    overflow: hidden;
}

/* Gradiente y fondo solo para el header de la página principal */
body:not(.recursos-page) .header-background {
    background: #0a2947 !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat !important;
}

body.recursos-page .header-background {
    background: #0a2947 !important;
}

body.misiones-page .header-background {
    background: #0a2947 !important;
}

body.recursos-page .header-elegant, body.recursos-page .header-elegant * {
    color: #fff !important;
}

body.misiones-page .header-elegant, body.misiones-page .header-elegant * {
    color: #fff !important;
}

body.live-stream-page .header-elegant, body.live-stream-page .header-elegant * {
    color: #fff !important;
}

/* Excepción para el texto del logo en la página de recursos */
body.recursos-page .logo-header-text .logo-title-main,
body.recursos-page .logo-header-text .logo-title-sub {
    color: #111 !important;
}

/* Texto del logo en footer para páginas con fondo oscuro */
body.home-page .footer .logo-header-text .logo-title-main,
body.home-page .footer .logo-header-text .logo-title-sub,
body.recursos-page .footer .logo-header-text .logo-title-main,
body.recursos-page .footer .logo-header-text .logo-title-sub,
body.sermones-page .footer .logo-header-text .logo-title-main,
body.sermones-page .footer .logo-header-text .logo-title-sub,
body.live-stream-page .footer .logo-header-text .logo-title-main,
body.live-stream-page .footer .logo-header-text .logo-title-sub {
    color: #fff !important;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    min-height: 350px;
    animation: none;
    z-index: -2;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* Overlay elegante */
.header-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: -1;
}

/* Navegación */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(10, 41, 71, 0.1);
    padding-left: 0px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 0 !important;
    padding-right: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 80px;
}
.nav-brand,
.nav-brand.logo-header-group {
    flex-shrink: 0;
    margin-right: auto;
    margin-left: 0 !important;
    padding-left: 0px !important;
}

.nav-brand .church-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.nav-brand .church-logo {
    height: 85px; /* 68px * 1.25 = 85px */
    width: auto;
    max-width: 297px; /* 238px * 1.25 = 297px */
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.nav-brand .church-logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

body.recursos-page .nav-menu a {
    color: #111 !important;
}

body.misiones-page .nav-menu a {
    color: #000000 !important;
}

body.misiones-page .nav-menu a:hover {
    color: var(--primary-color) !important;
}

body.misiones-page .nav-menu a.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Asegurar que la clase active funcione en todas las páginas */
body.recursos-page .nav-menu a.active,
body.sermones-page .nav-menu a.active,
body.nosotros-page .nav-menu a.active,
body.ministerios-page .nav-menu a.active {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Contenido hero */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #111 !important;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 80px); /* Restar la altura del navbar (80px) */
    margin-top: 40px; /* Reducir el margen superior para subir el contenido */
    background: #0a2947 !important;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: none !important;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    text-shadow: none !important;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.cta-button.primary {
    background: rgba(10, 41, 71, 0.9);
    color: var(--white);
    border: 2px solid rgba(10, 41, 71, 0.9);
}

.cta-button.primary:hover {
    background: rgba(6, 24, 42, 0.9);
    border-color: rgba(6, 24, 42, 0.9);
    transform: translateY(-2px);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Sección de características */
.features {
    padding: 80px 0;
    background: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Sección de sermones */
.sermons {
    padding: 80px 0;
    background: var(--white);
}

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

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

.sermons-container {
    padding: 40px 0;
}

/* Sección de sermones */
.sermons {
    padding: 80px 0;
    background: var(--white);
}

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

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

.sermons-container {
    padding: 40px 0;
}

/* Sección de sermones */
.sermons {
    padding: 80px 0;
    background: var(--white);
}

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

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

.sermons-container {
    padding: 40px 0;
}

/* Estilos de sermons-grid movidos más abajo para evitar conflictos */

/* Estilos de sermon-card movidos más abajo para evitar conflictos */

.sermon-card:hover {
    transform: translateY(-0.1px);
    box-shadow: 0 0.25px 1px rgba(0,0,0,0.15);
}

/* Estilos de sermon-image movidos más abajo para evitar conflictos */

.sermon-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos de sermon-content movidos más abajo para evitar conflictos */

/* Estilos de sermon-content h3 movidos más abajo para evitar conflictos */

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9.6rem; /* 400% más grande que 2.4rem */
    height: 9.6rem;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(0.25px);
    z-index: 2;
}

.play-button:hover {
    background: rgba(255,255,255,1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button i {
    color: var(--primary-color);
    font-size: 4.8rem; /* 400% más grande que 1.2rem */
    margin-left: 0.2rem;
}

.pastor-label {
    position: absolute;
    bottom: 0.25px; /* Ajustado para el nuevo tamaño */
    left: 0.25px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.05px 0.1px; /* Padding reducido */
    border-radius: 0.1px;
    font-size: 0.04rem; /* Fuente muy pequeña */
    backdrop-filter: blur(0.25px);
}

.sermon-card .video-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 10;
    margin-top: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.sermon-card.video-active .video-container {
    display: block;
}

/* Responsive para la página de sermones */
@media (max-width: 768px) {
    .sermons-grid {
        grid-template-columns: repeat(auto-fit, minmax(12px, 1fr)); /* 40% más pequeño que 20px */
        gap: 2px;
    }
    
    .sermon-card {
        margin-bottom: 0;
    }
    
    .sermon-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .sermon-actions button {
        width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .sermons-grid {
        grid-template-columns: repeat(auto-fit, minmax(8px, 1fr)); /* 40% más pequeño que 15px */
    }
}


/* Sección de ministerios */
.ministries {
    padding: 80px 0;
    background: var(--light-gray);
}

.ministries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.ministry-card {
    background: var(--white);
    padding: 30px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ministry-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.ministry-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.ministry-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.ministry-icon-text {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 700;
    margin-top: 3px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.css-woman-icon {
    position: relative;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.css-woman-icon::before {
    content: '';
    position: absolute;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #ffffff;
    top: 0.2rem;
}

.css-woman-icon::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 0.8rem;
    border-radius: 0.5rem 0.5rem 0 0;
    background: #ffffff;
    bottom: 0.2rem;
}

.ministry-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Sección de contacto */
.contact {
    padding: 80px 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.service-times h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.time-group {
    margin-bottom: 20px;
}

.day-header {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.time-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
}

.time-item .day {
    font-weight: 600;
    color: var(--text-dark);
}

.time-item .service {
    font-weight: 600;
    color: var(--text-dark);
}

.time-item .time {
    color: var(--primary-color);
    font-weight: 500;
}

/* Footer */
.footer {
    background: #0a2947;
    color: var(--white);
    padding: 21px 0 7px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 14px;
}

.footer-brand .footer-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-bottom: 15px;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.footer-social {
    text-align: center;
    margin-top: 10px;
}

.footer-social-btn {
    display: inline-block;
    margin: 0 8px;
    font-size: 1.7rem;
    color: #fff;
    background: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.footer-social-btn:hover {
    background: var(--primary-light);
    color: #fff;
    transform: scale(1.12);
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Menú móvil activo */
    .nav-menu.active {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 15px 20px 20px 20px;
        box-shadow: 0 4px 10px rgba(10, 41, 71, 0.1);
        border-top: 1px solid rgba(10, 41, 71, 0.1);
        gap: 4px;
        z-index: 10001;
        min-height: auto;
        max-height: none;
        overflow: visible;
        width: 100%;
        box-sizing: border-box;
        height: auto;
    }

    /* Animación del botón hamburguesa */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Asegurar que el botón sea clickeable */
    .nav-toggle {
        z-index: 10002;
        position: relative;
    }
    
    /* Estilos adicionales para el menú móvil */
    .nav-menu.active li {
        margin: 0;
        padding: 0;
        width: 100%;
    }
    
    .nav-menu.active a {
        padding: 10px 0;
        display: block;
        text-align: center;
        border-bottom: 1px solid rgba(10, 41, 71, 0.1);
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--primary-color);
        text-decoration: none;
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
        line-height: 1.2;
    }
    
    .nav-menu.active a:hover {
        background: rgba(10, 41, 71, 0.05);
        color: var(--primary-dark);
    }
    
    .nav-menu.active a:last-child {
        border-bottom: none;
    }
    
    /* Asegurar que todos los elementos del menú sean visibles */
    .nav-menu.active li {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Asegurar que el menú se ajuste al contenido */
    .nav-menu.active {
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .nav-brand .church-logo {
        height: 74px; /* Reducido 15% de 70px */
        max-width: 234px; /* Reducido 15% de 220px */
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .map-container iframe {
        height: 245px;
    }
    
    .map-info {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-brand .church-logo {
        height: 63.75px; /* Reducido 15% de 60px */
        max-width: 191px; /* Reducido 15% de 180px */
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .map-container iframe {
        height: 210px;
    }
    
    .map-section h3 {
        font-size: 1.5rem;
    }
    
    .sermons-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .ministries-grid {
        grid-template-columns: 1fr;
    }
}

/* Sección del mapa */
.map-section {
    margin-top: 60px;
    text-align: center;
}

.map-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    background: var(--white);
    position: relative;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 15px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    background: var(--white);
}

/* Marcador personalizado superpuesto */
.custom-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 10;
    pointer-events: none;
}

.marker-content {
    background: transparent;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
    white-space: nowrap;
    animation: markerPulse 2s infinite;
}

.marker-content::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #EA4335;
}

.marker-text {
    font-size: 12px;
    font-weight: 700;
    text-shadow: 
        0 0 4px rgba(255, 255, 255, 0.8),
        0 0 8px rgba(255, 255, 255, 0.8),
        0 0 12px rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    display: inline-block;
}

/* Animación del marcador */
@keyframes markerPulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

.map-info {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 15px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.map-info p {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.map-info p:first-child {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.map-info p i {
    color: var(--primary-color);
    margin-right: 8px;
}

.map-link {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.map-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.map-link i {
    margin-right: 8px;
}

/* Estilos del sistema de administración */
.admin-float {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    background: rgba(10, 41, 71, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.admin-float:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    opacity: 0.8;
    background: rgba(10, 41, 71, 0.9);
}

.admin-float i {
    color: var(--white);
    font-size: 10px;
}

.admin-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 41, 71, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
}

.close-modal {
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: rgba(255, 255, 255, 0.8);
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.admin-btn {
    background: rgba(10, 41, 71, 0.9);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.admin-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 41, 71, 0.3);
}

.logout-btn {
    background: var(--gray);
    margin-top: 20px;
}

.logout-btn:hover {
    background: var(--dark-gray);
}

.image-sections {
    display: grid;
    gap: 25px;
    margin-top: 20px;
}

.section-item {
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 20px;
    background: var(--light-gray);
}

.section-item h5 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.current-image {
    margin-bottom: 15px;
    text-align: center;
}

.current-image img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.current-image p {
    margin: 10px 0 0 0;
    color: var(--gray);
    font-style: italic;
}

.file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    background: rgba(10, 41, 71, 0.05);
    margin-bottom: 10px;
    cursor: pointer;
}

.file-input:hover {
    background: rgba(10, 41, 71, 0.1);
}

/* Estilos para la sección de cambio de contraseña */
.admin-divider {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 30px 0;
}

.password-section {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(10, 41, 71, 0.1);
}

.password-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

.password-section .form-group {
    margin-bottom: 15px;
}

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

.password-section .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.password-section .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 41, 71, 0.1);
}

.password-section .admin-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.password-section .admin-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 41, 71, 0.3);
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .image-sections {
        gap: 15px;
    }
    
    .section-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .admin-float {
        width: 20px;
        height: 20px;
        bottom: 10px;
        right: 10px;
    }
    
    .admin-float i {
        font-size: 8px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 15px;
    }
}

/* Estilos para el Editor Visual */
.visual-editor-section {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(10, 41, 71, 0.1);
}

.visual-editor-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

.visual-editor-section p {
    margin-bottom: 20px;
    color: var(--gray);
    font-size: 0.95rem;
}

.visual-editor-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visual-editor-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 41, 71, 0.3);
}

/* Barra de herramientas del editor */
.editor-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 41, 71, 0.9);
    color: var(--white);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9998;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    height: 50px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.editor-status {
    font-weight: 600;
    font-size: 14px;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.save-btn {
    background: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.save-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Overlay para selección de elementos */
#elementOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

/* Panel de edición */
.edit-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.edit-panel-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-panel-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.close-edit-panel {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-edit-panel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.edit-panel-content {
    padding: 20px;
}

.edit-panel-content h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.edit-panel-content textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.edit-panel-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.edit-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.edit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.current-image-preview {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--light-gray);
    border-radius: 8npx;
}

/* Elementos editables */
.editable-element {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editable-element:hover {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.editable-element::before {
    content: '✏️';
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--primary-color);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.editable-element:hover::before {
    opacity: 1;
}

/* Estilos específicos para secciones de fondo editables */
.header-background.editable-element,
.features.editable-element,
.sermons.editable-element,
.ministries.editable-element,
.contact.editable-element {
    position: relative;
}

.header-background.editable-element::before,
.features.editable-element::before,
.sermons.editable-element::before,
.ministries.editable-element::before,
.contact.editable-element::before {
    content: '🖼️';
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-background.editable-element:hover::before,
.features.editable-element:hover::before,
.sermons.editable-element:hover::before,
.ministries.editable-element:hover::before,
.contact.editable-element:hover::before {
    opacity: 1;
}

.header-background.editable-element:hover,
.features.editable-element:hover,
.sermons.editable-element:hover,
.ministries.editable-element:hover,
.contact.editable-element:hover {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Responsive para el editor */
@media (max-width: 768px) {
    .editor-toolbar {
        padding: 8px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .toolbar-left, .toolbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .edit-panel {
        width: 90%;
        right: 5%;
        left: 5%;
    }
    
    .toolbar-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Recursos en el panel de administración */
.recursos-section {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(10, 41, 71, 0.1);
}
.recursos-categorias {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.recursos-tab {
    background: rgba(10, 41, 71, 0.8);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.recursos-tab.active, .recursos-tab:hover {
    background: rgba(6, 24, 42, 0.9);
}
.recursos-panel {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    min-height: 120px;
    box-shadow: 0 2px 8px rgba(10, 41, 71, 0.05);
}
.recursos-lista {
    margin: 0;
    padding: 0;
    list-style: none;
}
.recurso-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}
.recurso-item:last-child {
    border-bottom: none;
}
.recurso-nombre {
    font-weight: 500;
    color: var(--primary-color);
}
.recurso-actions button {
    margin-left: 8px;
    background: var(--gray);
    color: var(--white);
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.recurso-actions button:hover {
    background: var(--primary-color);
}
/* Página de recursos */
.recursos-categorias-public {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}
.recursos-tab-public {
    background: rgba(10, 41, 71, 0.7);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.recursos-tab-public.active, .recursos-tab-public:hover {
    background: rgba(6, 24, 42, 0.9);
}
.recursos-panel-public {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    min-height: 120px;
    box-shadow: 0 2px 8px rgba(10, 41, 71, 0.05);
    max-width: 700px;
    margin: 0 auto;
}
.recursos-lista-public {
    margin: 0;
    padding: 0;
    list-style: none;
}
.recurso-item-public {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}
.recurso-item-public:last-child {
    border-bottom: none;
}
.recurso-nombre-public {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 1.1rem;
}
.recurso-link-public {
    color: var(--primary-dark);
    text-decoration: underline;
    font-size: 0.98rem;
    margin-left: 10px;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 75vh;
    min-height: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 75vh;
    min-height: unset;
    opacity: 0;
    transition: opacity 0.7s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 1;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide .hero-text {
    background: none !important;
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 600px;
    margin: 0 auto;
    color: #fff !important;
    box-shadow: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-slide .hero-text h1, .hero-slide .hero-text p {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.hero-carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.hero-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bbb;
    border: 2px solid #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-carousel-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-dark);
}

.hero-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s;
}

.hero-carousel-arrow:hover {
    background: var(--primary-color);
    color: #fff;
}

.hero-carousel-arrow.left { left: 20px; }
.hero-carousel-arrow.right { right: 20px; }

.recursos-table-public audio {
    width: 100%;
    max-width: 400px;
    min-width: 220px;
    display: block;
    margin: 0 auto;
}

@keyframes spinY {
  0% { transform: rotateY(0deg); }
  20% { transform: rotateY(360deg); }
  100% { transform: rotateY(360deg); }
}
.church-logo.logo-spin, .footer-logo.logo-spin {
  animation: spinY 10s linear infinite;
  animation-duration: 10s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform-style: preserve-3d;
  display: block;
}

.logo-header-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  gap: 8px;
}
.church-logo.logo-spin {
  margin-top: 0;
  height: 67.5px;
  max-width: 90px;
  min-width: 45px;
}
.logo-title-main {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 1px;
  line-height: 1.1;
}
.logo-title-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #111;
  margin-top: 2px;
  letter-spacing: 2px;
}
@media (max-width: 768px) {
  .logo-title-main {
    font-size: 1.2rem;
  }
  .logo-title-sub {
    font-size: 0.9rem;
  }
  .logo-header-group {
    gap: 10px;
  }
}

.footer-brand.logo-header-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  gap: 8px;
}
.footer-logo.logo-spin {
  margin-top: 0;
  height: 62.5px;
  max-width: 100px;
  min-width: 50px;
  animation: spinY 5s linear infinite;
  animation-duration: 5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform-style: preserve-3d;
  display: block;
}
@media (max-width: 768px) {
  .footer-logo.logo-spin {
    height: 62.5px;
    max-width: 100px;
    min-width: 50px;
  }
  .footer-brand.logo-header-group {
    gap: 10px;
  }
}

@keyframes spinYGlow {
  0% {
    transform: rotateY(0deg);
    filter: drop-shadow(0 0 6px #0a294755);
  }
  10% {
    filter: drop-shadow(0 0 6px #0a294755) drop-shadow(0 0 16px #0a294755) drop-shadow(0 0 32px #0a2947aa);
  }
  20% {
    transform: rotateY(360deg);
    filter: drop-shadow(0 0 6px #0a294755) drop-shadow(0 0 24px #0a2947ff) drop-shadow(0 0 48px #0a2947cc);
  }
  21% {
    filter: drop-shadow(0 0 6px #0a294755);
  }
  100% {
    transform: rotateY(360deg);
    filter: drop-shadow(0 0 6px #0a294755);
  }
}
.church-logo.logo-spin {
  filter: drop-shadow(0 0 6px #0a294755);
  animation: spinYGlow 10s linear infinite;
  transform-style: preserve-3d;
  display: block;
  height: 67.5px;
  max-width: 90px;
  min-width: 45px;
}

.sermones-admin-section {
  background: var(--light-gray);
  border-radius: 12px;
  padding: 25px;
  margin: 20px 0;
  border: 2px solid rgba(10, 41, 71, 0.1);
}
.sermones-admin-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.sermon-admin-item {
  flex: 1 1 250px;
  min-width: 220px;
}

/* === Nuevo Carrusel Gemini === */
.gemini-carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75vh;
    overflow: hidden;
    z-index: 0;
}

.gemini-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.gemini-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.gemini-slide.active {
    opacity: 1;
    z-index: 2;
}

/* --- ESTILOS ESPECÍFICOS PARA PÁGINA DE SERMONES --- */
body.sermones-page .sermon-content {
    padding: 8px 22px 1px 22px; /* Padding reducido - espacio inferior mínimo */
    background: #fff;
    height: 45px; /* Altura fija más baja */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

body.sermones-page .sermon-content h3 {
    margin: 0;
    color: #0a2947;
    font-size: 1.2rem; /* Tamaño base */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-align: left;
    height: 100%; /* Usar toda la altura disponible */
    overflow: hidden;
    display: flex;
    align-items: center; /* Centrar verticalmente */
    justify-content: flex-start;
    white-space: nowrap; /* Una sola línea */
    /* Ajuste automático del tamaño para que quepa */
    font-size: clamp(0.7rem, 1.2rem, 1.2rem); /* Tamaño mínimo más pequeño */
    /* Permitir que el texto se reduzca automáticamente */
    transform-origin: left center;
    transition: font-size 0.1s ease;
}

/* Ajustar altura de tarjetas en página de sermones */
body.sermones-page .sermon-card {
    height: auto; /* Altura automática basada en contenido */
    min-height: 260px; /* Altura mínima reducida */
}

/* --- ESTILOS UNIFICADOS PARA TODAS LAS PÁGINAS --- */
/* Aplicar los mismos estilos en página principal y página de sermones */
.sermons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas de igual tamaño */
    gap: 24px; /* Espaciado más cómodo */
    margin-top: 40px;
    align-items: stretch; /* Hacer que todas las tarjetas tengan la misma altura */
    max-width: 1200px; /* Ancho máximo del contenedor */
    margin-left: auto;
    margin-right: auto;
    justify-items: start;
}

.sermon-card {
    width: 100%;
    max-width: 370px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 6px 32px rgba(10,41,71,0.13);
    overflow: visible; /* Cambiado para permitir el video flotante */
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    height: auto; /* Altura automática basada en contenido */
    min-height: 260px; /* Altura mínima reducida */
}

.sermon-card:hover {
    box-shadow: 0 12px 40px rgba(10,41,71,0.18);
    transform: translateY(-4px) scale(1.02);
}

.sermon-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #eee;
    overflow: hidden;
}

.sermon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(10,41,71,0.10);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
}

.play-button:hover {
    background: #f3f6fa;
    transform: translate(-50%, -50%) scale(1.08);
}

.play-button i {
    color: #0a2947;
    font-size: 2.2rem;
    margin-left: 2px;
}

.pastor-label {
    position: absolute;
    left: 18px;
    bottom: 18px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 1.08rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    z-index: 3;
    letter-spacing: 0.2px;
}

.sermon-content {
    padding: 8px 22px 1px 22px; /* Padding reducido - espacio inferior mínimo */
    background: #fff;
    height: 45px; /* Altura fija más baja */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sermon-content h3 {
    margin: 0;
    color: #0a2947;
    font-size: 1.2rem; /* Tamaño base */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-align: left;
    height: 100%; /* Usar toda la altura disponible */
    overflow: hidden;
    display: flex;
    align-items: center; /* Centrar verticalmente */
    justify-content: flex-start;
    white-space: nowrap; /* Una sola línea */
    /* Ajuste automático del tamaño para que quepa */
    font-size: clamp(0.7rem, 1.2rem, 1.2rem); /* Tamaño mínimo más pequeño */
    /* Permitir que el texto se reduzca automáticamente */
    transform-origin: left center;
    transition: font-size 0.1s ease;
}

/* --- ESTILOS RESPONSIVE PARA PÁGINA PRINCIPAL --- */

.sermon-card {
    width: 100%; /* Ancho fijo para ocupar toda la columna */
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(10,41,71,0.10);
    border: 1px solid #e9ecef;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    height: auto; /* Altura automática basada en contenido */
    min-height: 260px; /* Altura mínima reducida */
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* No permitir que se encoja */
    box-sizing: border-box; /* Incluir border en el tamaño */
}

.sermon-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 32px rgba(10,41,71,0.18);
}

.sermon-image {
    width: 100%;
    height: 200px; /* Altura fija para todas las imágenes */
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    flex-shrink: 0; /* No permitir que se encoja */
}

.sermon-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4.8rem; /* 50% de 9.6rem */
    height: 4.8rem;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(10,41,71,0.10);
    z-index: 2;
}

.play-button i {
    color: var(--primary-color);
    font-size: 2.4rem; /* 50% de 4.8rem */
    margin-left: 0.1rem;
}

.pastor-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 5.6px 14px; /* 30% menos que 8px 20px */
    border-radius: 5.6px; /* 30% menos que 8px */
    font-size: 0.76rem;   /* 30% menos que 1.08rem */
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    z-index: 3;
    letter-spacing: 0.5px;
}

.sermon-content {
    padding: 8px 22px 1px 22px; /* Padding reducido igual que página de sermones - espacio inferior mínimo */
    background: #fff;
    height: 45px; /* Altura fija más baja igual que página de sermones */
    width: 100%; /* Ancho fijo */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar verticalmente */
    flex-shrink: 0; /* No permitir que se encoja */
    box-sizing: border-box; /* Incluir padding en el tamaño */
}

.sermon-content h3 {
    margin: 0;
    color: #0a2947; /* Color igual que página de sermones */
    font-size: 1.2rem; /* Tamaño base igual que página de sermones */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3; /* Line-height igual que página de sermones */
    letter-spacing: 0.01em;
    text-align: left;
    height: 100%; /* Usar toda la altura disponible */
    overflow: hidden;
    /* Configuración para una sola línea igual que página de sermones */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap; /* Una sola línea */
    /* Ajuste automático del tamaño para que quepa */
    font-size: clamp(0.7rem, 1.2rem, 1.2rem); /* Tamaño adaptable */
    /* Permitir que el texto se reduzca automáticamente */
    transform-origin: left center;
    transition: font-size 0.1s ease;
}

@media (max-width: 900px) {
  .sermons-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
    gap: 20px;
  }
  .sermon-card {
    height: auto; /* Altura automática basada en contenido */
    min-height: 240px; /* Altura mínima ajustada para tablet */
  }
  
  .sermon-image {
    height: 180px; /* Altura fija ajustada para tablet */
  }
  
  .sermon-content {
    height: 45px; /* Altura fija para tablet */
  }
}

@media (max-width: 600px) {
  .sermons-grid {
    grid-template-columns: 1fr; /* 1 columna en móvil */
    gap: 16px;
  }
  .sermon-card {
    border-radius: 12px;
    height: auto; /* Altura automática basada en contenido */
    min-height: 220px; /* Altura mínima ajustada para móvil */
  }
  
  .sermon-image {
    height: 160px; /* Altura fija ajustada para móvil */
  }
  
  .sermon-content {
    height: 45px; /* Altura fija para móvil */
  }
  
  .sermon-image {
    border-radius: 12px 12px 0 0;
  }
  .pastor-label {
    bottom: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 0.98rem;
    border-radius: 6px;
  }
  .sermon-content {
    padding: 6px 10px 1px 10px;
  }
  .sermon-content h3 {
    font-size: 1.1rem; /* Tamaño base para móvil */
    line-height: 1.3; /* Line-height igual que página de sermones */
    height: 100%; /* Usar toda la altura disponible */
    overflow: hidden;
    /* Configuración para una sola línea en móvil igual que página de sermones */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap; /* Una sola línea */
    /* Ajuste automático del tamaño para que quepa */
    font-size: clamp(0.7rem, 1.1rem, 1.1rem); /* Tamaño adaptable */
    /* Permitir que el texto se reduzca automáticamente */
    transform-origin: left center;
    transition: font-size 0.1s ease;
  }
  .play-button {
    width: 3.2rem;
    height: 3.2rem;
  }
  .play-button i {
    font-size: 1.6rem;
  }
}
/* --- FIN AJUSTES TARJETAS SERMONES --- */

body.live-stream-page .hero-content,
body.live-stream-page .hero-content h1,
body.live-stream-page .hero-content p {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

body.live-stream-page .nav-menu a,
body.live-stream-page .nav-menu a:visited,
body.live-stream-page .nav-menu a:active {
    color: #111 !important;
}
body.live-stream-page .nav-menu a:hover,
body.live-stream-page .nav-menu a.active {
    color: var(--primary-color) !important;
}
