/* RESET Y ESTILOS BASE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Fondo acuarela: manchas pastel suaves repartidas por la página,
   fijas al viewport y teñidas según el tiempo litúrgico. Sin patrones. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--bg-base);
    background-image:
        radial-gradient(42% 40% at 14% 16%, var(--bg-grad1) 0%, transparent 60%),
        radial-gradient(38% 36% at 88% 12%, var(--bg-grad2) 0%, transparent 58%),
        radial-gradient(46% 44% at 82% 72%, var(--bg-grad1) 0%, transparent 60%),
        radial-gradient(42% 46% at 18% 86%, var(--bg-grad2) 0%, transparent 58%),
        radial-gradient(34% 32% at 55% 42%, var(--bg-grad2) 0%, transparent 68%),
        radial-gradient(28% 30% at 62% 92%, var(--bg-grad1) 0%, transparent 64%);
    background-repeat: no-repeat;
    transition: background-color 0.6s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Vidrio esmerilado: deja ver la acuarela detrás de superficies translúcidas */
.header,
.card,
.info-card,
.sacrament-card,
.certificate-form-section,
.footer {
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

/* HEADER */

.header {
    padding: 0.6rem 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 200;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    font-family: var(--font-title);
    font-size: clamp(1.05rem, 3.4vw, 1.9rem);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.4px;
    white-space: nowrap;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.site-title:hover {
    color: var(--color-secondary);
}

/* Animación elegante de entrada letra por letra */
.site-title .ltr {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em);
    animation: letterIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes letterIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-contact {
    background: var(--gradient-primary);
    color: var(--color-white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-colored);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored-hover);
}

.social-icons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    padding-right: 0.8rem;
    border-right: 1px solid rgba(var(--color-primary-rgb), 0.2);
}

.social-icons a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: var(--shadow-colored);
}

.header-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
}

.liturgical-badge {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    transition: background 0.4s ease;
}

/* NAVBAR */

.navbar {
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 199;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    border-bottom: 3px solid var(--color-gold);
}

/* Brillo superior sutil sobre el degradado del menú */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

.menu {
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.menu-link {
    display: block;
    color: var(--color-white);
    padding: 1rem 0;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 1px;
    position: relative;
    opacity: 0.9;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    transform: translateX(-50%);
    background: var(--color-gold);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.menu-link:hover {
    opacity: 1;
}

.menu-link:hover::after {
    width: 60%;
}

.menu-link.active {
    opacity: 1;
}

.menu-link.active::after {
    width: 100%;
    background: var(--color-gold);
}

/* HERO CAROUSEL */

.hero {
    width: 100%;
    height: 850px;
    overflow: hidden;
    position: relative;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(to right, var(--bg-grad1) 0%, var(--bg-base) 28%, var(--bg-base) 72%, var(--bg-grad1) 100%);
}


.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-white);
}

.slide-title {
    font-family: var(--font-title);
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-description {
    font-family: var(--font-subtitle);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--color-white);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.08);
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.7rem;
    z-index: 10;
}

.indicator {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.indicator:hover {
    transform: scale(1.2);
}

.indicator.active {
    width: 32px;
    border-radius: 6px;
}

/* MAIN CONTENT */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* BIENVENIDA */

.welcome-band {
    text-align: center;
    max-width: 720px;
    margin: 1rem auto 3.5rem;
    padding: 0 1rem;
}

.welcome-eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 0.8rem;
}

.welcome-title {
    font-family: var(--font-title);
    font-size: 2.6rem;
    color: var(--color-primary);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.welcome-text {
    font-family: var(--font-subtitle);
    font-size: 1.15rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* INFORMACIÓN RÁPIDA */

.quick-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    margin-bottom: 4rem;
}

.info-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 2.2rem 1.9rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(var(--color-primary-rgb), 0.07);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.10);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.3rem;
}

.info-card h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: 0.9rem;
}

.info-lead {
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.info-body {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-text-light);
    flex-grow: 1;
}

.info-body p {
    margin-bottom: 0.9rem;
}

.info-body strong {
    color: var(--color-text);
}

.btn-text {
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    transition: gap 0.3s ease, color 0.3s ease;
}

.btn-text:hover {
    gap: 0.85rem;
    color: var(--color-secondary);
}

/* CARD GRID */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(var(--color-primary-rgb), 0.07);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-highlight {
    border-left: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.card-header i {
    font-size: 1.4rem;
    color: var(--color-primary);
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.12);
}

.card-header h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--color-text);
}

.card-body {
    font-size: 0.95rem;
    line-height: 1.8;
}

.card-body p {
    margin-bottom: 0.8rem;
}

/* BOTONES */

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.7rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
    margin-top: 1rem;
}

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

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored-hover);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid rgba(var(--color-primary-rgb), 0.45);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored);
}

/* SACRAMENTOS */

.sacraments-section {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-text);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    border-radius: 4px;
    background: var(--gradient-primary);
    transition: background 0.4s ease;
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-subtitle);
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.sacraments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.sacrament-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 2.4rem 1.7rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
    border: 1px solid rgba(var(--color-primary-rgb), 0.07);
}

.sacrament-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.sacrament-icon {
    color: var(--color-primary);
    margin: 0 auto 1.5rem;
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.10);
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.4s ease;
}

.sacrament-icon svg {
    width: 50px;
    height: 50px;
    transition: transform 0.4s ease;
}

.sacrament-card:hover .sacrament-icon {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
}

.sacrament-card:hover .sacrament-icon svg {
    transform: scale(1.05);
}

.sacrament-card h4 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    color: var(--color-text);
    flex-shrink: 0;
    position: relative;
}

.sacrament-card h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 3px;
    border-radius: 3px;
    background: var(--color-gold);
}

.sacrament-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1.2rem;
    flex-grow: 1;
    line-height: 1.7;
}

.sacrament-card .btn-secondary {
    margin-top: auto;
}

/* GALERÍA */

.gallery-preview {
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 14px;
    height: 250px;
    display: block;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-cta {
    text-align: center;
}

/* FOOTER */

.footer {
    background: rgba(255, 255, 255, 0.55);
    border-top: 4px solid var(--color-gold);
    padding: 2.8rem 2rem;
    margin-top: 4rem;
}

.footer-links-row {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links-row a {
    color: var(--color-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-links-row a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.footer-contact-row {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: var(--color-white);
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background-color: #1fa854;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(37, 211, 102, 0.4);
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
}

.footer-social-icons a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.footer-social-icons a:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-colored);
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--color-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

/* MODALS */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #ffffff;
    padding: 0;
    border-radius: var(--radius-md);
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideIn 0.35s ease;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px 8px 0 0;
}

#sacrament-content h2 {
    display: none;
}

/* Modal de sacramento SIN marco: solo la imagen, que además es el botón */
.modal-content--bare {
    background: transparent;
    box-shadow: none;
    max-width: 760px;
    width: auto;
    overflow: visible;
}

.sacrament-flyer-link {
    display: block;
    position: relative;
    cursor: pointer;
}

#sacrament-content img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 10px;
}

/* Marca de agua sutil sobre la imagen */
.sacrament-flyer-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease;
}

.sacrament-flyer-link:hover .sacrament-flyer-hint {
    opacity: 0.65;
}

/* Tarjeta de contacto (sacramentos sin flyer, ej. Unción) */
.sacrament-contact-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    min-height: 260px;
    justify-content: center;
}

.sacrament-contact-card i {
    font-size: 3.4rem;
    color: var(--color-primary);
}

.sacrament-contact-card p {
    font-size: 1.05rem;
    color: var(--color-text);
    padding: 0;
    margin: 0;
}

.modal-content h2 {
    font-family: var(--font-title);
    color: var(--color-primary);
    padding: 1.8rem 1.8rem 0;
}

.modal-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    padding: 0 1.8rem;
}

.modal-content p:last-child {
    padding-bottom: 1.8rem;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-white);
    transition: all 0.3s ease;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* BOTÓN FLOTANTE WHATSAPP */

.floating-whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #25D366;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulseWhatsapp 2.6s infinite;
}

.floating-whatsapp-button:hover {
    background-color: #1fa854;
    transform: scale(1.1);
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5);
    animation-play-state: paused;
}

@keyframes pulseWhatsapp {
    0% {
        box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4), 0 0 0 16px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* FORMULARIO DE CERTIFICADO */

.certificate-form-section {
    background: var(--color-surface);
    padding: 2.8rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(var(--color-primary-rgb), 0.07);
}

.certificate-form-section .section-title {
    text-align: center;
}

.certificate-form-section .section-subtitle {
    text-align: center;
}

.certificate-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* mensaje (7º campo) ocupa el ancho completo */
.form-group:nth-child(7) {
    grid-column: span 2;
}

.form-group label {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.9rem 1.1rem;
    border: 2px solid rgba(var(--color-primary-rgb), 0.15);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.certificate-form button[type="submit"] {
    grid-column: span 2;
    width: 100%;
}

/* PÁGINAS VACÍAS */

.empty-page {
    text-align: center;
    padding: 4rem 2rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-page .section-title {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.empty-page p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* SCROLL REVEAL */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .site-title {
        white-space: normal;
        font-size: 1.35rem;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        gap: 1rem;
    }

    .header-info {
        flex-direction: row;
        gap: 0.7rem;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .menu {
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .menu-link {
        font-size: 0.85rem;
        padding: 0.8rem 0;
    }

    .hero {
        height: 330px;
    }

    .slide-title {
        font-size: 2rem;
    }

    .slide-description {
        font-size: 1rem;
    }

    .carousel-prev,
    .carousel-next {
        padding: 0.8rem 1rem;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .quick-info {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-text {
        font-size: 1.05rem;
    }

    .sacraments-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .footer-links-row {
        gap: 1rem;
    }

    .footer-links-row a {
        font-size: 0.85rem;
    }

    .footer-contact-row {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .floating-whatsapp-button {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .header {
        padding: 1rem;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .header-info {
        flex-direction: row;
        gap: 0.6rem;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-icons {
        gap: 0.45rem;
        padding-right: 0.6rem;
    }

    .social-icons a {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }

    .liturgical-badge {
        padding: 0.35rem 0.75rem;
        font-size: 0.68rem;
    }

    .menu {
        gap: 1rem;
    }

    .menu-link {
        font-size: 0.75rem;
        padding: 0.6rem 0;
    }

    .hero {
        height: 230px;
    }

    .slide-title {
        font-size: 1.5rem;
    }

    .slide-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .sacraments-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sacrament-card {
        padding: 1rem;
    }

    .sacrament-icon {
        font-size: 2.5rem;
    }

    .modal-content {
        width: 95%;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    .certificate-form {
        grid-template-columns: 1fr;
    }

    .form-group:nth-child(7) {
        grid-column: span 1;
    }

    .certificate-form button[type="submit"] {
        grid-column: span 1;
    }
}
