/* Color Palette & Typography Variables */
:root {
    --primary-color: #1504a9;
    /* Deep Blue */
    --secondary-color: #ffffff;
    /* Light Grey Blue */
    --accent-color: #ffcc00;
    /* Gold/Bronze */
    --text-color: #333333;
    /* Dark Grey */
    --light-text-color: #f8f8f8;
    /* Off-white for dark backgrounds */
    --border-color: #e0e6ed;
    /* Lighter border 
    --shadow-color: rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    --hover-link-color: #0066CC;
    /* Brighter Blue for hover */

    --font-heading: Montserrat, 'Times New Roman', sans-serif;
    --font-body: Times New Roman, Open Sans, 'Times New Roman', sans-serif;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    /* background-color: var(--shadow-color);
    color: var(--text-color); */
    line-height: 1.6;
    scroll-behavior: smooth;
    /* Smooth scrolling for anchor links */
}

/* Scroll lock for mobile nav */
body.nav-open {
    overflow: hidden;
}

/* General Link Styling */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    border: none;
    margin-top: 15px;
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--hover-link-color);
    transform: translateY(-2px);
    color: white;
    /* Keep text white on hover */
    text-decoration: none;
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 23px;
    /* Adjust padding for border */
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-group {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

header.sticky {
    background-color: var(--primary-color);
    /* Maintain color */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--light-text-color);
    text-decoration: none;
}

.logo img {
    height: 50px;
    /* Adjust logo size */
    margin-right: 10px;
    border-radius: 50%;
    /* If logo is round */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

header h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

nav ul {
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus,
nav ul li a.active {
    /* Added active state */
    color: var(--accent-color);
}

nav ul li a:hover::after,
nav ul li a:focus::after,
nav ul li a.active::after {
    /* Added active state */
    width: 100%;
}

/* Hamburger menu for mobile */
.nav-toggle {
    display: none;
    /* Hidden by default, shown on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    /* Above nav menu */
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--light-text-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

main {
    padding: 30px 20px;
    max-width: 1800px;
    margin: 30px auto;
    background-color: #fff;
    box-shadow: 0 5px 20px var(--shadow-color);
    border-radius: 10px;
}

/* Dynamic content area needs to wrap the actual section for padding/margin consistency */
#dynamic-content-area>section {
    margin-bottom: 0;
    /* Remove bottom margin as content area acts as wrapper */
    padding: 30px;
    background-color: #fff;
    /* Ensure section background is white */
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    max-width: 1800px;
}

section {
    margin-bottom: 50px;
    padding: 30px;
    /*background-color: #fff;
    /* Ensure section background is white 
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color); */
}

section:last-child {
    margin-bottom: 0;
}

.contenedor-genially {
    width: 100%;
    max-width: 1250px;
    /* Evita que se vea gigante en monitores 4K */
    margin: 20px auto;
    /* Centra el contenido y da espacio arriba/abajo */
}

.contenedor-genially iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Mantiene la proporción perfecta automáticamente */
    border: none;
    border-radius: 12px;
    /* Bordes redondeados para un look moderno */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    /* Sombra suave para darle profundidad */
    display: block;
}

/* Ajuste opcional para móviles */
@media (max-width: 600px) {
    .contenedor-genially {
        margin: 10px 0;
    }
}

/* Contenedor principal para alinear hijos */
.main-layout {
    display: flex;
    flex-direction: row;
    /* Los pone uno al lado del otro */
    gap: 20px;
    /* Espacio entre auditorio y sidebar */
    align-items: flex-start;
    padding: 20px;
}

/* El auditorio toma la mayor parte del espacio */
.auditorium-container {
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* El sidebar tiene un ancho fijo o proporcional menor */
.sidebar-container {
    flex: 1;
    min-width: 200px;
    background: #f4f4f4;
    padding: 15px;
    border-radius: 8px;
    position: sticky;
    /* Opcional: para que te siga al hacer scroll */
    top: 20px;
}

/* Responsive: si la pantalla es pequeña, se ponen uno abajo del otro */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar-container {
        width: 100%;
    }
}

h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
    margin-bottom: 35px;
    text-align: center;
    font-weight: 700;
    position: relative;
}

/* h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -3px;  /* Position it below the border /
    width: 80px;
    /* Shorter accent line /
    height: 3px;
    background-color: var(--accent-color); 
}*/

h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: left;
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
}

h4 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

p {
    margin-bottom: 15px;
    line-height: 1.7em;
    text-align: justify;
}

#cargo {
    text-align: center;
}

ul {
    list-style: none;
    /* Removed default bullet for cleaner look */
    padding: 0;
    margin-left: 0;
    margin-bottom: 15px;
}

ul li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

ul li::before {
    content: "\2022";
    /* Unicode bullet */
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: 0.5em;
    position: absolute;
    left: 0;
}

/* Specific styles for new sections */

/* Intro blocks */
.intro-block {
    background-color: white;
    /* Always white */
    text-align: center;
    padding: 30px;
    border: none;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.intro-block h3 {
    text-align: center;
    border-left: none;
    padding-left: 0;
    font-size: 2rem;
    color: var(--text-color);
}

.intro-block p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
    color: #555;
}

.section-image {
    max-width: 100%;
    height: auto;
    border-radius: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Esta linea de codigo es para prueba de un diseno */
/* Hero Banner (for Misiones and other main sections) */
.hero-banner {
    position: relative;
    width: 100%;
    height: 400px;
    /* Standard height */
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 64, 128, 0.75);
    /* Darker blue overlay */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-overlay h2 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 4em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    border-bottom: none;
    /* Remove border from H2 in overlay */
    padding-bottom: 0;
}

.hero-overlay h2::after {
    content: none;
    /* Remove pseudo-element border */
}

.hero-overlay p {
    font-family: var(--font-body);
    font-size: 1.8em;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    max-width: 80%;
}

/* Banner */
.banner {
    position: relative;
    width: 100%;
    height: 450px;
    /* Increased height for impact */
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

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

.banner-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 64, 128, 0.75);
    /* Darker, more professional overlay */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.banner-message h3 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 4em;
    /* Larger */
    margin-bottom: 15px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    border-left: none;
    /* Remove border from banner H3 */
    padding-left: 0;
}

.banner-message p {
    font-family: var(--font-body);
    font-size: 1.8em;
    /* Larger */
    margin: 0 0 25px 0;
    /* Add margin below paragraph */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    max-width: 80%;
}

/* Content Blocks */
.content-block {
    padding: 25px;
    background-color: var(--secondary-color);
    /* border: 1px solid var(--border-color); */
    border-radius: 8px;
    margin-bottom: 25px;
    /*  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); */
}

/* Esta linea de codigo es para prueba de un diseno */
#dynamic-content-area>section>.content-block:first-of-type:not(.intro-block) {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#dynamic-content-area>section>.content-block:last-of-type {
    margin-bottom: 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}


.content-block:last-child {
    margin-bottom: 0;
}

/* News Grid (Home Section) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    /* Increased gap */
    margin-top: 25px;
}

.news-item {
    display: flex;
    /* Use flexbox for image and content */
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    overflow: hidden;
    /* Hide overflowing image corners */
}

.news-item:hover {
    transform: translateY(-8px);
    /* More pronounced lift */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    /* Stronger shadow */
    text-decoration: none;
}

.news-item img {
    width: 100%;
    height: 200px;
    /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.news-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Allow content to take available space */
}

.news-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    line-height: 1.3;
}

.news-item p {
    font-size: 0.95em;
    margin-bottom: 15px;
    flex-grow: 1;
    /* Pushes read-more to bottom */
}

.news-item .read-more {
    display: flex;
    align-items: center;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: auto;
    /* Push to bottom */
}

.news-item .read-more i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.news-item:hover .read-more i {
    transform: translateX(5px);
}

/* Home Ministries Summary */
.home-ministries-summary {
    text-align: center;
}

.home-ministries-summary h3 {
    text-align: center;
    border-left: none;
    padding-left: 0;
}

.home-ministry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.home-ministry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 20px;
   /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);*/
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    padding: 15px;
    text-align: center;
}

.home-ministry-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.home-ministry-item img {
    width: 100px;
    /* Fixed size for summary images */
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    /* Make them round */
    margin-bottom: 10px;
    border: 3px solid var(--accent-color);
    /* Add a border */
}

.home-ministry-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1em;
}

/* Social Links */
.social-links .social-icons,
.footer-social-links .social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    /* Increased gap */
    margin-top: 20px;
}

.social-links .social-icons a,
.footer-social-links .social-icons a {
    color: var(--primary-color);
    /* Default color */
    font-size: 2.2em;
    /* Larger icons */
    transition: transform 0.2s ease, color 0.3s ease;
}

.social-links .social-icons a:hover,
.footer-social-links .social-icons a:hover {
    transform: scale(1.3);
    /* More pronounced scale */
    color: var(--accent-color);
    /* Hover color */
}

.footer-social-links .social-icons a {
    color: var(--light-text-color);
    /* White for footer */
}

.footer-social-links .social-icons a:hover {
    color: var(--accent-color);
}

/* Nosotros MVV Grid */
.mvv-grid {
    display: flex;
    flex-wrap: wrap;
    /*grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); */
    gap: 25px;
    /* Increased gap */
    margin-top: 25px;
}

.mvv-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-top: 5px solid var(--accent-color);
    border-radius: 8px;
    padding: 25px;
    /* Increased padding */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mvv-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.mvv-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.4em;
    text-align: left;
    /* Align h4 left */
    display: flex;
    align-items: center;
    gap: 10px;
}

.mvv-item h4 .icon-left {
    color: var(--accent-color);
    font-size: 1.1em;
}

.mvv-item ul {
    list-style: none;
    padding: 0;
}

.mvv-item ul li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--accent-color);
    display: inline-flex;
    width: 1.5em;
    /* Adjust width for icon */
    margin-left: 0.5em;
    position: absolute;
    left: 0;
}

/* Leader Grid */
.leader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.leader-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leader-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.leader-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid var(--primary-color);
    /* Stronger border for emphasis */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.leader-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.3em;
}

.leader-item p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 0;
}

.leader-item p.description {
    /* Style for descriptions under leader names */
    font-style: italic;
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
    flex-grow: 1;
    /* Pushes content down for consistent height */
    display: flex;
    align-items: center;
    /* Vertically align description if multi-line */
    justify-content: center;
}

/* Doctrine Principles Grid */
.doctrine-principles-grid {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    /* Increased gap */
    margin-top: 25px;
    flex-wrap: wrap;
    overflow-x: auto;
    /* scroll horizontal */
}


.doctrine-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    /* Increased padding */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctrine-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.doctrine-item .icon {
    font-size: 3em;
    /* Larger icons */
    color: var(--accent-color);
    margin-bottom: 15px;
    /* More space */
}

.doctrine-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.5em;
}

/* Ministries and Media Grids (replacing lists for consistency) */
.ministries-grid,
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    /* Increased gap */
    margin-top: 25px;
}

.ministry-item,
.media-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    /* Accent bar */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    display: flex;
    /* Make it flex to align content better */
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ministry-item:hover,
.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.ministry-item img {
    width: 100%;
    height: 195px;
    /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ministry-item .icon,
.media-item .icon {
    font-size: 2.8em;
    /* Larger icons */
    color: var(--primary-color);
    margin-bottom: 15px;
}

.ministry-item h4,
.media-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.4em;
}

.ministry-item-content {
    flex-grow: 1;
    /* Allow content to push button to bottom */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ministry-item p {
    flex-grow: 1;
    /* Pushes button down */
    margin-bottom: 15px;
}

.media-item .btn {
    margin-top: auto;
    /* Push button to bottom */
}

/* New: Areas of Focus Grid */
/* Esta linea de codigo es para prueba de un diseno */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.area-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-top: 5px solid var(--primary-color);
    /* Accent bar for items */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.area-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.area-item .icon {
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.area-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.3em;
}

/* New: Involvement Steps Grid */
.involvement-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.step-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-bottom: 5px solid var(--accent-color);
    /* Accent bar at bottom */
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.step-item .icon {
    font-size: 3.5em;
    /* Larger icons for steps */
    color: var(--primary-color);
    margin-bottom: 20px;
}

.step-item h4 {
    color: var(--accent-color);
    /* Title in accent color */
    margin-top: 0;
    font-size: 1.6em;
}

/* Event Cards Grid */
.event-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.event-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.event-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.25em;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.event-card p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #555;
}

.event-card p i {
    color: var(--accent-color);
    font-size: 1.1em;
}

.event-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.event-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.event-info {
    padding: 15px;
}

.carousel-inner {
    padding: 20px 0;
}

/* Diseno de Carrousel*/
.fade-carousel {
    position: relative;
    width: 100%;
    max-width: 850px;
    height: 450px;
    margin: auto;
    overflow: hidden;
    border-radius: 15px;
}

.fade-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: whitesmoke;
    object-position: center;
    position: absolute;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;

}

.fade-carousel img.active {
    opacity: 1;
}

/* Contact Form & Info/Map Grid */
.contact-form-container {
    background-color: white;
    border-top: 5px solid var(--accent-color);
    padding-bottom: 30px;
    border-radius: 8px;
    /* Ensure contact form container has its own radius */
    margin-bottom: 25px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

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

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
/* Added for phone input */
.contact-form input[type="number"],
/* Added for number input */
.contact-form input[type="date"],
/* Added for date input */
.contact-form select,
/* Added for select dropdown */
.contact-form textarea {
    width: calc(100% - 24px);
    /* Account for padding and border */
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1em;
    background-color: var(--secondary-color);
    color: var(--text-color);
    -webkit-appearance: none;
    /* Remove default select styling for custom arrow */
    -moz-appearance: none;
    appearance: none;
}

.contact-form select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23004080%22%20d%3D%22M287%20163.7c-4.3%204.3-10.1%206.5-15.9%206.5H21.3c-5.8%200-11.6-2.2-15.9-6.5-8.7-8.7-8.7-22.6%200-31.3l124.7-124.7c8.7-8.7%2022.6-8.7%2031.3%200l124.7%20124.7c8.7%208.7%208.7%2022.6%200%2031.3z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px;
    padding-right: 30px;
    /* Make space for the arrow */
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
/* Added for phone input */
.contact-form input[type="number"]:focus,
/* Added for number input */
.contact-form input[type="date"]:focus,
/* Added for date input */
.contact-form select:focus,
/* Added for select dropdown */
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.2);
    /* Softer focus ring */
    background-color: #fff;
}

.contact-info-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.contact-info-block {
    background-color: white;
    border-left: 5px solid var(--primary-color);
}

.contact-info-block p i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.1em;
}

.map-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 60%;
    /* Ajusta la proporción vertical del mapa */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.map-placeholder {
    background-color: var(--secondary-color);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    color: var(--text-color);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-style: italic;
    border: 1px dashed var(--border-color);
}

.map-placeholder h3 {
    text-align: center;
    border-left: none;
    padding-left: 0;
    margin-top: 0;
    color: var(--primary-color);
}

.map-placeholder p {
    font-style: normal;
}

/* New: Direct Contact for Misiones/Sections */
.contact-direct {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border: 1px dashed var(--border-color);
    text-align: center;
}

.contact-direct h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.4em;
    text-align: center;
}

.contact-direct p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 1em;
    color: var(--text-color);
}

.contact-direct p i {
    color: var(--primary-color);
    font-size: 1.2em;
}

/* New: FAQ Accordion Styles */
.faq-accordion {
    margin-top: 25px;
}

.faq-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    /* For smooth max-height transition */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 18px 25px;
    background-color: var(--primary-color);
    /* Primary color for question bar */
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    /* Reset margin */
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: var(--hover-link-color);
}

.faq-question i {
    color: var(--accent-color);
    /* Icon color in question */
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
    /* Rotate icon when active */
}

.faq-answer {
    padding: 0 25px;
    background-color: var(--secondary-color);
    /* Light background for answer */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    color: var(--text-color);
}

.faq-answer p {
    padding-top: 15px;
    padding-bottom: 15px;
    margin-bottom: 0;
    /* Remove default paragraph margin */
}

.faq-answer.active {
    max-height: 300px;
    /* Adjust as needed for max content */
    padding-top: 0;
    /* Adjust padding to apply on inner <p> */
    padding-bottom: 0;
    /* Adjust padding to apply on inner <p> */
    border-top: 1px solid var(--border-color);
    /* Separator */
}

/* Adjust padding on inner p when active */
.faq-answer.active p {
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

footer h4 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: left;
}

.footer-social-links h4,
.footer-info h4 {
    text-align: center;
}

.footer-info {
    flex-basis: 100%;
    /* Make info section span full width */
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
    padding-left: 0;
}

.footer-links ul li::before {
    content: none;
    /* Remove bullet from footer links */
}

.footer-links ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-info p {
    margin: 8px 0;
    font-size: 0.95em;
    color: var(--light-text-color);
}

.footer-info a {
    color: var(--light-text-color);
    text-decoration: none;
}

.footer-info a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.container {
    display: flex;
    flex-direction: row;
    padding: 20px;
    justify-content: center;
}

/* Auditorio */
#auditorium {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-gap: 10px;
    justify-content: right;
    margin-right: 20px;
}

@media (max-width: 650px) {
    .auditorium {
        grid-template-columns: repeat(5, 40px);
    }
}

.seat {
    width: 30px;
    height: 30px;
    background-color: #90ee90;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.seat.occupied {
    background-color: #ff4d4d;
    cursor: not-allowed;
}

.seat:hover {
    background-color: #ffa500;
}

/* Contador de asientos */
#seat-count {
    margin-top: 20px;
    justify-content: center;
}

#seat-count span {
    justify-content: center;
    font-weight: bold;
    align-content: center;
}

/* Estilos para los botones de control */
.tool-panel button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #4caf50;
    color: white;
    font-size: 14px;
    transition: background 0.3s ease;
}

/* Estilo cuando el botón está deshabilitado */
.controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Estilo para el texto debajo de los controles */
.controls p {
    margin-top: 10px;
    font-size: 14px;
}

/* Estilos para la gestión de usuarios */
.user-management {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Panel de Personalización */
#customization-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background-color: #fff;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    transform: translateX(100%);
    border-radius: 50px;
}

#customization-panel.open {
    transform: translateX(0);
}

#customization-panel h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

#customization-panel label {
    font-size: 0.9rem;
    color: #555;
}

#customization-panel input[type="color"],
#customization-panel input[type="range"] {
    margin-top: 10px;
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#customization-panel button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

#customization-panel button:hover {
    background-color: #0056b3;
}

.customization-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 100%;
    font-size: 16px;
    cursor: pointer;
    z-index: 2000;
    transition: background-color 0.3s ease;
}

.customization-button:hover {
    background-color: #0056b3;
}

/* Panel de herramientas */
#tool-panel {
    width: 200px;
    background-color: #333;
    color: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    position: grid;
    top: 140px;
    right: 20px;
    display: none;
}

#tool-panel.open {
    display: block;
}

#tool-panel button {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px;
    margin: 5px 0;
    width: 100%;
    cursor: pointer;
    border-radius: 100px;
}

#tool-panel button:hover {
    background-color: #555;
}

/* Estilo para barra lateral fija */
#sidebar {
    position: static;
    width: 10%;
    height: 100%;
    background-color: #f8f9fa;
    border-right: 1px solid #ccc;
    padding: 20px 10px;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
}

#sidebar button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background-color: #e9ecef;
    border: none;
    padding: 10px;
    margin: 4px 0;
    border-radius: 5px;
    text-align: left;
    transition: background-color 0.2s ease;
}

#sidebar button:hover {
    background-color: #dee2e6;
    cursor: pointer;
}

/* Estilo para ocultar etiquetas (colapsado) */
#sidebar.collapsed {
    width: 60px;
}

#sidebar.collapsed .label {
    display: none;
}

#sidebar.collapsed h5,
#sidebar.collapsed h6 {
    justify-content: center;
}

#sidebar.collapsed button {
    justify-content: center;
    padding: 10px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .header-container {
        flex-wrap: wrap;
        padding: 0 20px;
    }

    nav {
        order: 3;
        /* Move nav below logo/toggle */
        width: 100%;
        max-height: 0;
        /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.5s ease-out, opacity 0.5s ease;
        background-color: var(--primary-color);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        opacity: 0;
    }

    nav.active {
        max-height: 300px;
        /* Or a value large enough to show all links */
        opacity: 1;
        padding: 15px 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        padding: 8px 0;
        font-size: 1.1em;
    }

    nav ul li a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
        /* Push to the right */
    }

    .logo {
        margin-right: auto;
        /* Push to the left */
        order: 1;
    }

    .banner {
        height: 350px;
    }

    .banner-message h3 {
        font-size: 3em;
    }

    .banner-message p {
        font-size: 1.5em;
    }

    .hero-banner {
        height: 300px;
    }

    .hero-overlay h2 {
        font-size: 3em;
    }

    .hero-overlay p {
        font-size: 1.5em;
    }

    h2 {
        font-size: 2.2rem;
    }

    h3 {
        font-size: 1.6rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col {
        width: 100%;
        margin-bottom: 25px;
    }

    footer h4 {
        text-align: center;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    main {
        padding: 20px;
        margin: 20px auto;
    }

    #dynamic-content-area>section {
        /* Adjust section padding/margin within dynamic area */
        padding: 20px;
    }

    .banner {
        height: 280px;
    }

    .banner-message h3 {
        font-size: 2.5em;
    }

    .banner-message p {
        font-size: 1.2em;
    }

    .hero-banner {
        height: 250px;
    }

    .hero-overlay h2 {
        font-size: 2.5em;
    }

    .hero-overlay p {
        font-size: 1.2em;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .intro-block h3 {
        font-size: 1.6rem;
    }

    .intro-block p {
        font-size: 0.95em;
    }

    .news-grid,
    .home-ministry-grid,
    .doctrine-principles-grid,
    .mvv-grid,
    .ministries-grid,
    .media-grid,
    .event-cards-grid,
    .contact-info-map-grid,
    .leader-grid,
    .areas-grid,
    .involvement-steps-grid {
        grid-template-columns: 1fr;
    }

    .news-item img {
        height: 180px;
    }

    .ministry-item img {
        height: 120px;
    }

    .home-ministry-item {
        padding: 20px 15px;
    }

    .home-ministry-item img {
        width: 80px;
        height: 80px;
    }

    .btn {
        font-size: 0.95em;
        padding: 15px 20px;
    }

    .social-links .social-icons a,
    .footer-social-links .social-icons a {
        font-size: 1.8em;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        width: calc(100% - 20px);
    }

    .faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
        gap: 10px;
    }

    .contact-direct p {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 5px;
    }

    .contact-direct p i {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .logo img {
        height: 40px;
    }

    .banner {
        height: 220px;
    }

    .banner-message h3 {
        font-size: 2em;
    }

    .banner-message p {
        font-size: 1em;
        margin-bottom: 15px;
    }

    .banner-message .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .hero-banner {
        height: 200px;
        margin-bottom: 25px;
    }

    .hero-overlay h2 {
        font-size: 2em;
    }

    .hero-overlay p {
        font-size: 1em;
    }

    h2 {
        font-size: 1.6rem;
        padding-bottom: 10px;
        margin-bottom: 25px;
    }

    h3 {
        font-size: 1.2rem;
        padding-left: 10px;
    }

    .intro-block h3 {
        font-size: 1.6rem;
    }

    .intro-block p {
        font-size: 0.95em;
    }

    .news-item h4 {
        font-size: 1.1em;
    }

    .btn {
        font-size: 0.9em;
        padding: 10px 18px;
    }

    .social-links .social-icons a,
    .footer-social-links .social-icons a {
        font-size: 1.5em;
    }

    .footer-info {
        padding-top: 15px;
    }

    .mvv-item h4,
    .doctrine-item h4,
    .ministry-item h4,
    .media-item h4,
    .leader-item h4,
    .area-item h4,
    .step-item h4 {
        font-size: 1.2em;
    }

    .mvv-item ul li::before {
        font-size: 0.9em;
    }

    .leader-item img {
        width: 100px;
        height: 100px;
    }

    .faq-question {
        font-size: 1em;
        padding: 12px 15px;
    }

    .faq-question i {
        font-size: 1em;
    }

    .faq-answer p {
        font-size: 0.9em;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .contact-form label {
        font-size: 0.9em;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 0.9em;
        padding: 10px;
        margin-bottom: 15px;
    }
}