/* =================================
   Variables y Estilos Globales
   ================================= */
:root {
    --primary-color: #333;
    --secondary-color: #007bff; /* Un azul para botones */
    --light-gray: #f4f4f4;
    --font-body: 'Inter', sans-serif;
    --font-headings: 'Playfair Display', serif;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: #fff;
    /* === LA SOLUCIÓN CLAVE PARA EL FOOTER === */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Asegura que el body ocupe al menos toda la pantalla */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================================
   Navegación
   ================================= */
.navbar {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 400;
    padding-bottom: 5px;
}

.nav-links a.active,
.nav-links a:hover {
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

/* =================================
   Secciones y Títulos
   ================================= */
.section {
    padding: 60px 0;
}

.section-title {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

.bg-light {
    background-color: var(--light-gray);
}

/* === EMPUJAR EL FOOTER HACIA ABAJO === */
/* La forma más simple es hacer que el footer tenga un margen superior automático */
footer {
    margin-top: auto; /* Esta es la magia. Empuja el footer al final del contenedor flex (body) */
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* =================================
   Estilos de Páginas Específicas
   ================================= */

/* --- index.html (Hero) --- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1507692049793-9153b2cea52a?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    color: #fff;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-family: var(--font-headings);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.btn-primary {
    background: var(--secondary-color);
    color: #fff;
}
.btn-primary:hover {
    background: #0056b3;
}

/* --- predicas.html y contacto.html (Header de página) --- */
.page-header {
    background: var(--light-gray);
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-headings);
    font-size: 2.8rem;
}

/* --- predicas.html (Grid y Búsqueda) --- */
.search-bar {
    margin-bottom: 40px;
}
.search-bar input {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.sermon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* --- Otros --- */
.map-container iframe {
    border-radius: 5px;
}