/* ========================================
   VARIABLES GLOBALES
   ======================================== */
:root {
    --azul-oscuro: #214351;
    --azul-medio: #53819A;
    --azul-claro: #54A0BA;
    --azul-muy-claro: #50B8D4;
    --azul-claro-brillante: #83D3EB;
    --naranja-oscuro: #F47B20;
    --naranja-medio: #F89626;
    --naranja-claro: #F89626;
    --text-dark: #1b1b18;
    --text-light: #f8f6f0;
    --light-bg: #f8f6f0;
}

/* ========================================
   RESET Y BASE
   ======================================== */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar-custom {
    background: rgba(33, 67, 81, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    padding: 0.5rem 0;
    background: rgba(33, 67, 81, 0.98);
}

.navbar-custom .navbar-brand {
    padding: 0;
    margin: 0;
}

.navbar-custom .navbar-brand .navbar-logo {
    height: 55px;
    width: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand .brand-main {
    font-weight: 700;
    color: white;
    font-size: 1rem;
    display: block;
    line-height: 1.2;
}

.navbar-custom .navbar-brand .brand-main span {
    color: var(--naranja-medio);
}

.navbar-custom .navbar-brand .brand-sub {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    letter-spacing: 1px;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--naranja-medio) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar scrolled */
.navbar-custom.scrolled .navbar-brand .navbar-logo {
    height: 35px;
}

.navbar-custom.scrolled .navbar-brand .brand-main {
    font-size: 0.9rem;
}

.navbar-custom.scrolled .navbar-brand .brand-sub {
    font-size: 0.55rem;
}

/* Botones del navbar */
.btn-sm-nav {
    padding: 0.4rem 1.5rem;
    font-size: 0.85rem;
}

/* ========================================
   BOTONES
   ======================================== */
.btn-primary-custom {
    background: var(--naranja-medio);
    color: white;
    font-weight: 600;
    padding: 0.7rem 2rem;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background: var(--naranja-oscuro);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(248, 150, 38, 0.4);
}

.btn-outline-custom {
    border: 2px solid var(--naranja-medio);
    color: var(--naranja-medio);
    background: transparent;
    font-weight: 600;
    padding: 0.7rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: var(--naranja-medio);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(248, 150, 38, 0.3);
}

.btn-azul-custom {
    background: var(--azul-medio);
    color: white;
    font-weight: 600;
    padding: 0.7rem 2rem;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-azul-custom:hover {
    background: var(--azul-oscuro);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(83, 129, 154, 0.4);
}

/* ========================================
   HERO CON SLIDER
   ======================================== */
.hero-section {
    padding-top: 76px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slider .carousel-item {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
}

.hero-slider .carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 67, 81, 0.85) 0%, rgba(33, 67, 81, 0.6) 50%, rgba(33, 67, 81, 0.4) 100%);
    z-index: 1;
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    z-index: 10;
    width: 5%;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
    opacity: 1;
}

.hero-slider .carousel-indicators {
    z-index: 10;
    bottom: 30px;
}

.hero-slider .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    margin: 0 6px;
}

.hero-slider .carousel-indicators button.active {
    background: var(--naranja-medio);
    border-color: var(--naranja-medio);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 100px 0 60px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    color: white;
    line-height: 1.1;
    animation: fadeInUp 1s ease;
}

.hero-title .highlight {
    color: var(--naranja-medio);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--naranja-medio);
    border-radius: 2px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    max-width: 500px;
    margin: 1.5rem 0 2rem;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SECCIONES
   ======================================== */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--azul-oscuro);
    margin-bottom: 0.5rem;
}

.section-title .highlight {
    color: var(--naranja-medio);
}

.section-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--naranja-medio);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

/* ========================================
   CARDS
   ======================================== */
.card-feature {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--naranja-medio);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card-feature:hover::before {
    transform: scaleX(1);
}

.card-feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(33, 67, 81, 0.15);
    border-color: transparent;
}

.card-feature .icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    display: inline-block;
    background: rgba(248, 150, 38, 0.1);
    width: 90px;
    height: 90px;
    line-height: 90px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.card-feature:hover .icon {
    background: var(--naranja-medio);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* ========================================
   PASTORES
   ======================================== */
.pastor-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.pastor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(33, 67, 81, 0.12);
    border-color: var(--naranja-medio);
}

.pastor-card .pastor-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--naranja-medio);
    padding: 3px;
    transition: all 0.3s ease;
}

.pastor-card:hover .pastor-img {
    border-color: var(--azul-medio);
    transform: scale(1.05);
}

.pastor-card h5 {
    font-weight: 700;
    color: var(--azul-oscuro);
}

.pastor-card .position {
    color: var(--naranja-medio);
    font-weight: 600;
    font-size: 0.9rem;
}

.pastor-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

.pastor-card .social-pastor a {
    color: var(--azul-medio);
    transition: color 0.3s ease;
    margin: 0 5px;
}

.pastor-card .social-pastor a:hover {
    color: var(--naranja-medio);
}

/* ========================================
   MINISTERIOS CON IMÁGENES
   ======================================== */
.ministerio-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ministerio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(33, 67, 81, 0.12);
    border-color: var(--naranja-medio);
}

/* Imagen del ministerio - RECTANGULAR CON BORDES REDONDEADOS */
.ministerio-card .ministerio-img {
    width: 100%;
    max-width: 120px;
    height: 100px;
    object-fit: contain;  /* ✅ Mantiene la proporción sin recortar */
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 8px;
    background: rgba(83, 129, 154, 0.05);
}

.ministerio-card:hover .ministerio-img {
    transform: scale(1.08);
    background: rgba(248, 150, 38, 0.08);
}

/* Si las imágenes tienen fondo blanco, usa esta versión */
.ministerio-card .ministerio-img-white-bg {
    width: 100%;
    max-width: 120px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ministerio-card h6 {
    font-weight: 700;
    color: var(--azul-oscuro);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ministerio-card p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ministerio-card .badge-ministerio {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(248, 150, 38, 0.1);
    color: var(--naranja-medio);
    margin-top: 0.3rem;
}

/* ========================================
   RESPONSIVE - MINISTERIOS
   ======================================== */
@media (max-width: 768px) {
    .ministerio-card .ministerio-img {
        max-width: 90px;
        height: 80px;
    }
    
    .ministerio-card h6 {
        font-size: 0.8rem;
        min-height: 2rem;
    }
    
    .ministerio-card p {
        font-size: 0.7rem;
        min-height: 1.6rem;
    }
    
    .ministerio-card .badge-ministerio {
        font-size: 0.55rem;
        padding: 0.15rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .ministerio-card {
        padding: 1rem 0.5rem;
    }
    
    .ministerio-card .ministerio-img {
        max-width: 80px;
        height: 70px;
    }
    
    .ministerio-card h6 {
        font-size: 0.7rem;
        min-height: 1.6rem;
    }
    
    .ministerio-card p {
        font-size: 0.6rem;
        min-height: 1.2rem;
    }
}


/* ========================================
   EVENTOS
   ======================================== */
.event-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    border-left: 5px solid var(--naranja-medio);
    height: 100%;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.event-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.event-card .event-date {
    background: var(--azul-oscuro);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.event-card h5 {
    color: var(--azul-oscuro);
    font-weight: 700;
}

.event-card .event-time {
    color: var(--naranja-medio);
    font-weight: 600;
    font-size: 0.9rem;
}

.event-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ========================================
   GALERÍA
   ======================================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(33, 67, 81, 0.8));
    color: white;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(20px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item .gallery-overlay h6 {
    font-weight: 700;
    margin-bottom: 0;
}

/* ========================================
   TESTIMONIOS
   ======================================== */
.card-testimonial {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border-left: 5px solid var(--naranja-medio);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.card-testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-testimonial .quote {
    font-size: 1.1rem;
    font-style: italic;
    color: #4a4a4a;
    line-height: 1.6;
}

.card-testimonial .quote::before {
    content: '"';
    font-size: 2rem;
    color: var(--naranja-medio);
    font-family: 'Playfair Display', serif;
}

.card-testimonial .quote::after {
    content: '"';
    font-size: 2rem;
    color: var(--naranja-medio);
    font-family: 'Playfair Display', serif;
}

.card-testimonial .author {
    font-weight: 700;
    color: var(--azul-oscuro);
    margin-top: 1rem;
}

.card-testimonial .position {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ========================================
   MAPA
   ======================================== */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
   CONTACTO
   ======================================== */
.contact-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--naranja-medio);
}

.contact-card .icon {
    font-size: 2.5rem;
    color: var(--naranja-medio);
    margin-bottom: 0.8rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--azul-oscuro);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 2rem;
}

.footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--naranja-medio);
}

.footer .social-links a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.footer .social-links a:hover {
    color: var(--naranja-medio);
    transform: translateY(-3px);
}

.footer .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.footer ul {
    padding-left: 0;
}

.footer ul li {
    list-style: none;
    margin-bottom: 0.5rem;
}

/* ========================================
   ANIMACIONES
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    .section-title {
        font-size: 2.5rem;
    }
    .map-container {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-content {
        padding: 120px 0 40px;
    }
    .section-padding {
        padding: 50px 0;
    }
    .pastor-card .pastor-img {
        width: 120px;
        height: 120px;
    }
    .map-container {
        height: 250px;
    }
    .navbar-custom .navbar-brand .navbar-logo {
        height: 35px;
    }
    .navbar-custom .navbar-brand .brand-main {
        font-size: 0.85rem;
    }
    .navbar-custom .navbar-brand .brand-sub {
        font-size: 0.55rem;
    }
    .btn-sm-nav {
        padding: 0.3rem 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .navbar-custom .navbar-brand .navbar-logo {
        height: 30px;
    }
    .navbar-custom .navbar-brand .brand-main {
        font-size: 0.7rem;
    }
    .navbar-custom .navbar-brand .brand-sub {
        font-size: 0.5rem;
    }
    .btn-sm-nav {
        padding: 0.25rem 0.8rem;
        font-size: 0.65rem;
    }
}