/* Estilos para el banner de la Hermandad */
.hermandad-banner {
    width: 100%;
    height: 420px;
    position: relative;
    overflow: hidden;
}

.video-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 40%;
}

/* Responsive */
@media (max-width: 900px) {
    .hermandad-banner {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hermandad-banner {
        height: 250px;
    }
}

/* Estilos para el módulo de calendario */
.calendar-module {
    max-width: 1200px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    position: relative;
}

.calendar-header {
    background: #0F4C81;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.calendar-header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header p {
    opacity: 0.9;
    margin: 8px 0 0;
    font-size: 16px;
}

.calendar-content {
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.calendar-column {
    flex: 1;
    min-width: 650px;
    padding: 20px;
    background: #fff;
    border-right: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.events-column {
    flex: 1;
    min-width: 450px;
    padding: 20px;
    background: #fafafa;
    position: relative;
}

#google-calendar {
    height: 400px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 76, 129, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
}

#google-calendar iframe {
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
}

.events-column h3 {
    color: #0F4C81;
    font-weight: 500;
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #D4AF37;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

#eventos-lista {
    max-height: 360px;
    overflow-y: auto;
}

.evento {
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #0F4C81;
    transition: transform 0.2s, box-shadow 0.2s;
}

.evento:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #800020;
}

.evento h4 {
    font-weight: 500;
    color: #0F4C81;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.evento-details {
    font-size: 14px;
    color: #5F6368;
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.calendar-footer {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-top: 1px solid #eee;
    position: relative;
    z-index: 10;
}

.calendar-footer p {
    margin: 0 0 16px;
    color: #5F6368;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-footer a {
    display: inline-flex;
    align-items: center;
    background: #0F4C81;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.calendar-footer a:hover {
    background: #800020;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#eventos-lista::-webkit-scrollbar {
    width: 6px;
}

#eventos-lista::-webkit-scrollbar-thumb {
    background: #800020;
    border-radius: 4px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #5F6368;
}

.error {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
}

/* Responsive: Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .calendar-module {
        max-width: 95%;
        margin: 30px auto;
    }
    
    .calendar-column {
        min-width: 400px;
    }
    
    .events-column {
        min-width: 300px;
    }
    
    #google-calendar {
        height: 350px;
    }
    
    .calendar-header h2 {
        font-size: 22px;
    }
    
    .calendar-header p {
        font-size: 15px;
    }
}

/* Responsive: Móvil (menos de 768px) */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }
    
    .calendar-module {
        max-width: 100%;
        margin: 15px auto;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow: visible;
    }
    
    .calendar-header {
    padding: 15px 12px;
        border-radius: 8px 8px 0 0;
    }
    
    .calendar-content {
        flex-direction: column;
    }
    
    .calendar-column, .events-column {
        flex: 0 0 100%;
        min-width: 100%;
        border-right: none;
        padding: 15px;
    }
    
    .calendar-column {
        order: 1;
        padding-bottom: 10px;
    }
    
    .events-column {
        order: 2;
        padding-top: 5px;
    }
    
    #google-calendar {
        height: 500px; /* Más alto para mejor visualización del mes */
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #google-calendar iframe {
        min-width: 320px; /* Ancho mínimo para que se vea bien */
        transform: scale(0.9); /* Ligero zoom out para ver mes completo */
        transform-origin: top center;
    }
    
    .calendar-header h2 {
        font-size: 18px;
        flex-direction: row;
        gap: 8px;
    }
    
    .calendar-header p {
        font-size: 14px;
        margin-top: 8px;
    }
    
    .events-column h3 {
        font-size: 18px;
        margin-top: 0;
    }
    
    #eventos-lista {
        max-height: 250px;
    }
    
    .evento {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .calendar-footer {
        padding: 15px;
        border-radius: 0 0 8px 8px;
    }
    
    .calendar-footer p {
        font-size: 14px;
        flex-direction: column;
        gap: 5px;
    }
    
    .calendar-footer a {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Pequeños móviles (menos de 480px) */
@media (max-width: 480px) {
    .calendar-module {
        margin: 10px auto;
    }
    
    .calendar-header {
        padding: 12px 10px;
    }
    
    .calendar-header h2 {
        font-size: 16px;
    }
    
    .calendar-header p {
        font-size: 13px;
    }
    
    .calendar-column, .events-column {
        padding: 12px 10px;
    }
    
    #google-calendar {
        height: 450px;
    }
    
    #google-calendar iframe {
        transform: scale(0.85); /* Un poco más de zoom out */
    }
    
    .events-column h3 {
        font-size: 16px;
    }
    
    #eventos-lista {
        max-height: 200px;
    }
    
    .evento h4 {
        font-size: 15px;
    }
    
    .evento-details {
        font-size: 13px;
    }
    
    .calendar-footer {
        padding: 12px 10px;
    }
    
    .calendar-footer p {
        font-size: 13px;
    }
    
    .calendar-footer a {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Móviles muy pequeños (menos de 360px) */
@media (max-width: 360px) {
    #google-calendar {
        height: 420px;
    }
    
    #google-calendar iframe {
        transform: scale(0.8); /* Ajuste final para móviles pequeños */
    }
    
    .calendar-header h2 {
        font-size: 15px;
    }
    
    .events-column h3 {
        font-size: 15px;
    }
}

/* Estilos para el módulo de donaciones */
.donaciones-module {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Roboto', sans-serif; /* Se moverá al body o un estilo general */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.donaciones-module-header {
    background: #0F4C81;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.donaciones-module-header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donaciones-module-header h2 .material-icons {
    margin-right: 10px;
    font-size: 28px;
}

.donaciones-module-header p {
    opacity: 0.9;
    margin: 8px 0 0;
    font-size: 16px;
}

.donacion-item {
    display: flex;
    flex-wrap: wrap;
}

.donacion-item:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.donacion-item-image-container {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donacion-item-image-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(15, 76, 129, 0.1);
    background: #f5f5f5;
    aspect-ratio: 4/3;
}

.donacion-item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.donacion-item-content {
    flex: 1;
    min-width: 300px;
    padding: 25px;
}

.donacion-item-content h3 {
    color: #0F4C81;
    font-weight: 500;
    margin-top: 0;
    font-size: 22px;
    padding-bottom: 8px;
    border-bottom: 2px solid #D4AF37;
    display: flex;
    align-items: center;
}

.donacion-item-content h3 .material-icons {
    margin-right: 10px;
}

.donacion-item-content p {
    color: #5F6368;
    line-height: 1.6;
    margin-bottom: 25px;
}

.donation-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.donation-form-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.donation-form-input-wrapper .material-icons {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #5F6368;
}

.donation-form input[type="number"] {
    width: 100%;
    padding: 12px 12px 12px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.donate-btn {
    flex: 1;
    min-width: 150px;
    background: #0F4C81;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-btn .material-icons {
    margin-right: 8px;
}

.donate-btn:hover {
    background: #800020 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    transform: translateY(-2px);
}

.donation-form input:focus {
    outline: none;
    border-color: #0F4C81 !important;
    box-shadow: 0 0 0 2px rgba(15,76,129,0.2);
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .donaciones-module {
        max-width: 95%;
    }
    .donacion-item-image-wrapper {
        aspect-ratio: 3/2 !important;
    }
}

/* Responsive: Móvil */
@media (max-width: 767px) {
    .donaciones-module {
        max-width: 100%;
        margin: 20px 0 !important;
        border-radius: 0 !important;
    }
    .donacion-item > div {
        flex: 0 0 100% !important;
        min-width: 100% !important;
    }
    .donacion-item-image-wrapper {
        aspect-ratio: 16/9 !important;
        max-width: 100% !important;
    }
    .donacion-item-content h3 {
        font-size: 20px !important;
    }
}

/* Pequeños móviles */
@media (max-width: 480px) {
    .donacion-item-image-wrapper {
        aspect-ratio: 1/1 !important;
    }
    .donation-form input, .donate-btn {
        min-width: 100% !important;
    }
}

/* Estilos para el módulo de Instagram */
.instagram-module {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.instagram-module-header {
    background: #0F4C81;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.instagram-module-header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-module-header h2 .material-icons {
    margin-right: 10px;
    font-size: 28px;
}

.instagram-module-header p {
    opacity: 0.9;
    margin: 8px 0 0;
    font-size: 16px;
}

.instagram-module-header p a {
    color: white;
    text-decoration: underline;
}

.instagram-iframe-container {
    width: 100%;
    overflow-x: auto;
    background: #fafafa;
    padding: 0;
}

.instagram-iframe-wrapper {
    min-width: 100%;
    width: fit-content;
}

.instagram-iframe-wrapper iframe {
    border: none;
    width: 100%;
    height: 900px;
    border-top: 1px solid rgba(15, 76, 129, 0.1);
    border-bottom: 1px solid rgba(15, 76, 129, 0.1);
}

.instagram-cta {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-top: 1px solid #eee;
}

.instagram-cta a {
    display: inline-flex;
    align-items: center;
    background: #0F4C81;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.instagram-cta a .material-icons {
    margin-right: 8px;
    font-size: 20px;
}

.instagram-module a:hover {
    background: #800020 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    transform: translateY(-2px);
}

/* Responsive: Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .instagram-module {
        max-width: 95%;
        margin: 30px auto;
    }
}

/* Responsive: Móvil (menos de 768px) */
@media (max-width: 767px) {
    .instagram-module {
        max-width: 100%;
        margin: 20px 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .instagram-iframe-wrapper iframe {
        height: 450px !important;
    }
    
    .instagram-module-header h2 {
        font-size: 22px !important;
    }
}

/* Pequeños móviles (menos de 480px) */
@media (max-width: 480px) {
    .instagram-iframe-wrapper iframe {
        height: 400px !important;
    }
    
    .instagram-module-header {
        padding: 15px !important;
    }
    
    .instagram-cta {
        padding: 15px !important;
    }
    
    .instagram-cta a {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}
