/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 0 0.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-left: 0;
    padding-left: 0;
}
.logo {
    margin-left: 0 !important;
    padding-left: 0 !important;
    flex-shrink: 0;
}
.logo img {
    display: block;
    margin-left: 0 !important;
    padding-left: 0 !important;
    max-height: 50px !important;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1300;
    touch-action: manipulation;
}
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

.hamburger span {
    width: 30px;
    height: 4px;
    background: white;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    color: white;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
    overflow: hidden;
    background-image: none; /* Remove background image to avoid conflict */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Add a moderate dark overlay using linear-gradient on top of the image */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Imagen Promocional.jfif');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: none; /* remove previous brightness filter */
    z-index: -1;
    pointer-events: none;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Removed darkened overlay to avoid darkening text */
    z-index: 1;
    pointer-events: none;
}

/* Removed background-attachment fixed and media query override */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 0;
    pointer-events: none;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Responsive background-attachment fix for mobile and tablet */
@media (max-width: 1200px) {
    .hero {
        background-attachment: scroll;
    }
}

.cta-btn {
    background: #1e3c72 !important;
    color: white !important;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #1e3c72 !important;
}
.cta-btn:hover {
    background: #2a5298 !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section h2 {
    color: #1e3c72;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Cards and Grids */
.beliefs-grid,
.ministries-grid,
.pastors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.belief-card,
.ministry-card,
.pastor-card {
    background: white;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.belief-card:hover,
.ministry-card:hover,
.pastor-card:hover {
    transform: translateY(-5px);
}

.belief-card h3,
.ministry-card h3,
.pastor-card h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
}

/* Spacing and decorations for ministries detailed cards */
.ministry-detailed-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ministry-detailed-card p,
.ministry-detailed-card ul {
    margin-bottom: 1rem;
}

/* Spacing and decorations for pastor detailed cards */
.pastor-detailed-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Responsive flex layout for pastor detailed card */
.pastor-detailed-card.flex-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pastor-detailed-card.flex-row img {
    width: 200px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.pastor-detailed-card p,
.pastor-detailed-card ul,
.pastor-detailed-card h4 {
    margin-bottom: 1rem;
}

/* Responsive layout for pastors grid on index.html */
.pastors-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.pastor-image {
    flex: 1;
}

.pastor-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.pastor-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Spacing and decorations for creemos.html */
.intro {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.belief-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 5px solid #1e3c72;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.belief-item p {
    margin-bottom: 1rem;
}

.verses {
    font-style: italic;
    color: #666;
    margin-bottom: 0;
}

/* Spacing and decorations for crece.html */
.growth-opportunities {
    margin-bottom: 2rem;
}

.growth-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.growth-card p {
    margin-bottom: 1rem;
}

/* Spacing and decorations for donaciones.html */
.donation-info {
    margin-bottom: 2rem;
}

.donation-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.donation-card p {
    margin-bottom: 1rem;
}

.method {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.method p {
    margin-bottom: 1rem;
}

/* Spacing and decorations for contacto.html */
.contact-info {
    margin-bottom: 2rem;
}

.contact-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-card p {
    margin-bottom: 1rem;
}

/* Buttons */
.read-more-btn {
    display: inline-block;
    background: #2a5298;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.read-more-btn:hover {
    background: #1e3c72;
    transform: translateY(-2px);
}

/* Social Buttons for Contacto Redes Sociales */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.social-buttons img {
    width: 64px;
    height: 64px;
    filter: invert(24%) sepia(96%) saturate(7452%) hue-rotate(214deg) brightness(0.7) contrast(87%);
    transition: filter 0.3s ease;
}
.social-buttons img:hover {
    filter: invert(24%) sepia(96%) saturate(7452%) hue-rotate(214deg) brightness(1) contrast(87%);
}
@media (max-width: 768px) {
    .social-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    .social-btn {
        width: 100%;
        justify-content: center;
    }
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.social-btn i {
    font-size: 1.2rem;
}


/* Mail */

.social-btn.mail:hover {
    background-color: #2d4373;
}

/* Facebook */
.social-btn.facebook {
    background-color: #3b5998;
}

.social-btn.facebook:hover {
    background-color: #2d4373;
}

/* Instagram */
.social-btn.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-btn.instagram:hover {
    filter: brightness(0.85);
}

/* TikTok */
.social-btn.tiktok {
    background: linear-gradient(45deg, #000000, #ffffff);
    color: white;
}

.social-btn.tiktok:hover {
    background: linear-gradient(45deg, #333333, #cccccc);
}

/* WhatsApp */
.social-btn.whatsapp {
    background-color: #25d366;
}

.social-btn.whatsapp:hover {
    background-color: #1ebe57;
}

/* Typography */
blockquote {
    background: #e3f2fd;
    border-left: 5px solid #1e3c72;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    color: #1e3c72;
}

.subsection {
    margin: 2rem 0;
    padding: 2rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.subsection p,
.subsection ul {
    margin-bottom: 1rem;
}

/* Services Section */
.services-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-time {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-time h3 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

/* Spacing and decorations for services detailed cards */
.service-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid #1e3c72;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.service-card p {
    margin-bottom: 1rem;
}

.service-card .time {
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 1rem;
}

/* Enhanced Responsive Design */
/* Mobile First Approach */

/* Extra small devices (phones, 320px and up) */
@media (min-width: 320px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
}

/* Small devices (phones, 480px and up) */
@media (min-width: 480px) {
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
}

/* Mobile devices (max-width: 768px) {
    ... existing styles ...
} */

/* Removed conflicting background image on .hero to avoid conflict with .hero-bg */
@media (min-width: 769px) {
    .hero {
        /* background-image: url('Imagen Promocional.jfif'); */
        /* background-attachment: fixed; */
        height: 100vh;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: #1e3c72;
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: left 0.3s ease-in-out;
        padding: 2rem 0;
        gap: 1.5rem;
        z-index: 1100;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1200;
        position: relative;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section h2 {
        font-size: 2.2rem;
    }
    
    .beliefs-grid,
    .ministries-grid,
    .pastors-grid,
    .services-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-content h2 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .section h2 {
        font-size: 2.5rem;
    }
    
    .beliefs-grid,
    .ministries-grid,
    .pastors-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.image-container {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.image-container img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* Responsive Google Maps iframe */
.map-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin: 2rem 0;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: none;
}

/* Taggbox Widget Responsive */
.taggbox-container {
    width: 100%;
    margin: 2rem 0;
    min-height: 400px;
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }
    
    nav {
        padding: 0 1rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo p {
        font-size: 0.8rem;
    }
    
    .nav-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .nav-btn:hover,
    .cta-btn:hover,
    .read-more-btn:hover {
        transform: none;
    }
    
    .belief-card:hover,
    .ministry-card:hover,
    .pastor-card:hover {
        transform: none;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Footer */
footer {
    position: relative;
    background: url('Final de Página con Logo.jpeg') no-repeat center center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    filter: none;
    height: 300px;
    margin-top: 4rem;
    overflow: hidden;
}

/* Override footer background-attachment for mobile and tablet devices */
@media (max-width: 1200px) {
    footer {
        background-attachment: scroll;
    }
}

/* Fix footer background for tall vertical screens */
@media (min-aspect-ratio: 9/20) and (max-width: 1080px) and (min-height: 2000px) {
    footer {
        background-position: top center;
        background-size: contain;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }
}

footer .footer-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: white;
    text-align: center;
    padding: 2rem 0;
    background-color: rgba(30, 60, 114, 0.6); /* semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Centering for Homepage Sections */
#conocenos .container {
    text-align: center;
}

#conocenos .container .read-more-btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
    background-color: #1e3c72 !important;
    color: white !important;
    border: 2px solid #1e3c72 !important;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#conocenos .container .read-more-btn:hover {
    background-color: #1e3c72;
    color: white;
}

#conocenos .subsection {
    text-align: center;
}

#conocenos .subsection .read-more-btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

#creemos .container {
    text-align: center;
}

#creemos .container .read-more-btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

#creemos .beliefs-grid {
    justify-items: center;
}

#ministerios .container {
    text-align: center;
}

#ministerios .container .read-more-btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

#ministerios .ministries-grid {
    justify-items: center;
}

/* Fix background for tall screens */
@media (min-aspect-ratio: 9/20) and (max-width: 1080px) and (min-height: 2000px) {
    .hero::before {
        background-position: top center;
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }
}

/* Center background for all other screens */
.hero::before {
    background-position: center center;
}
