/* 
   Funeraria Valenzuela - Custom CSS
   Basado en los colores del logo
*/

:root {
    /* Colores principales basados en el logo */
    --primary: #594B3E;
    /* Marrón oscuro */
    --primary-light: #96866D;
    /* Marrón claro */
    --secondary: #D0C9BD;
    /* Beige */
    --dark: #090504;
    /* Negro/Marrón muy oscuro */
    --light: #EDEDED;
    /* Gris claro */
    --white: #FFFFFF;
    /* Blanco */

    /* Fuentes */
    --font-primary: 'Lora', serif;
    --font-secondary: 'Montserrat', sans-serif;
}

/* Estilos para íconos de servicios y contacto */
#servicios .icon-box i,
#contacto .icon-box i,
#contacto .social-icons a {
    color: var(--primary-light) !important;
}

/* Estilos generales */
body {
    font-family: var(--font-secondary);
    
    color: #333;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    color: var(--primary);
}

.section-title h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 200px;
    height: 3px;
    background-color: var(--primary);
}

/* Botones */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Top Bar */
.top-bar {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    font-size: 0.9rem;
    transition: all 0.5s;
}

.top-bar a:hover {
    color: var(--white) !important;
    text-decoration: underline;
}

/* Header */
#header {
    transition: all 0.5s;
    z-index: 997;
    padding: 20px 0;
    background-color: transparent;
    /* Transparente por defecto */
}

#header.scrolled {
    background-color: rgba(9, 5, 4, 0.95);
    /* Color sólido al hacer scroll */
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

#header .navbar-brand img {
    max-height: 120px;
    transition: max-height 0.5s;
}

#header.scrolled .navbar-brand img {
    max-height: 80px;
}

#header .navbar-nav .nav-link {
    color: var(--secondary);
    font-weight: 500;
    padding: 10px 15px;
    transition: 0.3s;
}

#header .navbar-nav .nav-link:hover {
    color: var(--white);
}

#header .navbar-toggler {
    border-color: var(--secondary);
}


/* Hero Section */
.hero-section {
    height: 50vh !important;
    min-height: 350px !important;
    /* Reducimos la altura mínima */
    padding-top: 80px;
    /* Ajustamos el padding para el header transparente */
    background-image: url('../images/la-relevancia-del-coche-funebre.webp');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    position: relative;
    color: var(--white);
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 5, 4, 0.2);
}

.hero-section h1 {
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .container.h-100 {
    position: relative;
    z-index: 1;
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    width: 100%;
    height: 100px;
}

.wave-divider .wave-fill {
    fill: var(--white);
}

#planes {
    background-color: var(--secondary) !important;
    padding: 80px 0;
}

#gallery {
    background-color: var(--secondary) !important;
    padding: 80px 0;
}

/* Quienes Somos Section */
#quienes-somos {
    background-color: var(--secondary) !important;
    padding: 80px 0;
}

#quienes-somos .text-center {
    margin-bottom: 3rem;
}

#quienes-somos .lead {
    color: var(--primary);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

#quienes-somos h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

#quienes-somos h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: var(--primary);
}

#quienes-somos h3 {
    color: var(--primary);
    position: relative;
    padding-bottom: 1rem;
    font-size: 1.8rem;
    margin-top: 0.5rem;
}

#quienes-somos h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

#quienes-somos .position-relative {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

#quienes-somos .position-relative:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#quienes-somos .position-relative img.rounded-3 {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    width: 100%;
    height: auto;
}

#quienes-somos .position-relative:hover img.rounded-3 {
    transform: scale(1.05);
}

#quienes-somos .row {
    margin-bottom: 4rem;
}

#quienes-somos .row:last-child {
    margin-bottom: 0;
}

#quienes-somos p {
    color: var(--dark);
    line-height: 1.8;
}

#quienes-somos .position-absolute img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

#quienes-somos .position-relative:hover .position-absolute img {
    transform: scale(1.1) rotate(5deg);
}

/* Secciones */
.py-5 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.bg-light {
    background-color: var(--secondary) !important;
    color: var(--dark);
}

/* Modal personalizado */
.modal-custom {
    background-color: rgba(9, 5, 4, 0.8);
}

.modal-custom .modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    max-width: 800px;
    margin: 0 auto;
    width: 90%;
}

.modal-custom .modal-header img {
    max-height: 400px;
    object-fit: cover;
    width: 100%;
}

@media (max-width: 768px) {
    .modal-custom .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .modal-custom .modal-header img {
        max-height: 300px;
    }

    .modal-custom .modal-body {
        padding: 1.5rem;
    }

    .modal-custom .modal-body h3 {
        font-size: 1.5rem;
    }

    .modal-custom .btn-primary {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-custom .modal-content {
        width: 98%;
        margin: 10px auto;
    }

    .modal-custom .modal-header img {
        max-height: 200px;
    }

    .modal-custom .modal-body {
        padding: 1rem;
    }

    .modal-custom .modal-body h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .modal-custom .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        white-space: normal;
        height: auto;
    }
}

.modal-custom .modal-header {
    border: none;
    padding: 0;
    position: relative;
}

.modal-custom .modal-header .btn-close {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1;
    background-color: var(--primary-light);
    opacity: 1;
    padding: 0.5rem;
    border-radius: 50%;
    width: 20px;
    height: 20px;
}

.modal-custom .modal-body {
    padding: 2rem;
    text-align: center;
    background-color: var(--white);
}

.modal-custom .modal-body h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
}

.modal-custom .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 0.75rem 2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-custom .btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

/* Estilos Adicionales para Botones */
.btn-cafe {
    background-color: #6f4e37;
    /* Tono café */
    color: #ffffff;
    border-color: #6f4e37;
}

.btn-cafe:hover,
.btn-cafe:focus {
    background-color: #5a3f2e;
    color: #ffffff;
    border-color: #5a3f2e;
}

/*--------------------------------------------------------------
# Estilos para la Sección de Planes
--------------------------------------------------------------*/
.plan-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Asegura que la imagen respete los bordes redondeados */
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(9, 5, 4, 0.12);
}

.plan-card-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.plan-card-body {
    padding: 25px;
    flex-grow: 1;
    /* Permite que el cuerpo de la tarjeta ocupe el espacio disponible */
}

.plan-title {
    font-family: var(--font-primary);
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.plan-price {
    text-align: center;
    margin-bottom: 20px;
}

.plan-price .price-amount {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1;
}

.plan-price .price-note {
    font-size: 0.9rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-features {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.plan-features li {
    font-family: var(--font-secondary);
    color: #444;
    padding: 10px 0 10px 30px;
    position: relative;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--secondary);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✓';
    /* Icono de check */
    position: absolute;
    left: 0;
    top: 50%;
}

/*--------------------------------------------------------------
# Footer Social Icons
--------------------------------------------------------------*/
.social-links a {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

.social-links i {
    line-height: 1;
    vertical-align: baseline;
}

/*--------------------------------------------------------------
# Gallery Section
--------------------------------------------------------------*/
.gallery .gallery-item {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    display: block;
}

.gallery .gallery-item img {
    transition: transform 0.3s ease-in-out;
    width: 100%;
    height: 250px;
    /* Altura fija para todas las imágenes */
    object-fit: cover;
    /* Asegura que la imagen cubra el espacio sin deformarse */
}

.gallery .gallery-item:hover img {
    transform: scale(1.1);
}

/* Estilos para el logo del navbar */
.navbar-logo {
    width: 150px !important;
    min-width: 150px;
    height: auto;
    flex-shrink: 0;
}

.navbar-brand {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.gallery .gallery-item::before {
    pointer-events: none;
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1;
}

.gallery .gallery-item:hover::before {
    opacity: 1;
}

.gallery .gallery-item::after {
    pointer-events: none;
    content: '\f00e';
    /* Código del ícono de lupa de Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    color: #fff;
    font-size: 32px;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    z-index: 2;
}

.gallery .gallery-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transform: translateY(-50%);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1.2rem;
}

.plan-features .plan-feature-main {
    font-weight: 600;
    color: var(--primary);
}

.plan-features .plan-feature-main::before {
    content: '★';
    /* Usar una estrella para destacar */
    color: var(--primary-light);
}

.plan-card-footer {
    padding: 25px;
    background-color: var(--white);
    border-top: 1px solid var(--secondary);
}

/* Tarjetas */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background-color: var(--primary);
    color: var(--white);
}

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(89, 75, 62, 0.1);
    color: var(--primary);
}

/* Imágenes */
.img-wrapper {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.img-wrapper img {
    transition: transform 0.5s ease;
}

.img-wrapper:hover img {
    transform: scale(1.05);
}

/* FAQ Section */
#faq {
    background-color: var(--light);
}

#faq .section-title h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

#faq .lead {
    color: var(--gray);
    margin-bottom: 3rem;
}

#faq .accordion-item {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#faq .accordion-button {
    font-weight: 600;
    padding: 1.5rem;
    color: var(--dark);
    background-color: var(--white);
}

#faq .accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: var(--white);
    box-shadow: none;
}

#faq .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

#faq .accordion-button::after {
    background-size: 1.2rem;
    transition: all 0.3s ease;
}

#faq .accordion-body {
    padding: 1.5rem;
    background-color: var(--white);
    color: var(--gray);
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: var(--dark) !important;
}

/* Back to Top Button */
.back-to-top {



    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    z-index: 999;
    display: none;
    /* Hidden by default, shown by JS */
    opacity: 0;
}

.back-to-top:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    /* espacio entre iconos */
    z-index: 999;
}

.floating-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 24px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.floating-button:hover {
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

.whatsapp-button {
    background-color: #25d366;
}

.whatsapp-button:hover {
    background-color: #128C7E;
}

/* Separación entre botones flotantes */
.floating-buttons .back-to-top {
    margin-bottom: 15px;
}



footer h4 {
    color: var(--white);
}

footer .social-links a {
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: var(--secondary) !important;
}

.back-to-top:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

/* Responsive */
@media (max-width: 992px) {
    #header {
        padding: 15px 0;
        background-color: rgba(9, 5, 4, 0.95);
        /* Fondo oscuro en móvil por defecto */
    }

    #header.scrolled {
        padding: 10px 0;
    }

    #header .navbar-brand img {
        max-height: 80px;
    }

    .hero-section {
        height: auto;
        min-height: 500px;
        padding-top: 120px;
        /* Ajuste para el header en móvil */
    }

    #header .navbar-collapse {
        background-color: rgba(9, 5, 4, 0.95);
        padding: 20px;
        border-radius: 5px;
        margin-top: 10px;
    }

    .top-bar {
        display: none;
        /* Ocultamos la top-bar en pantallas pequeñas */
    }
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2rem;
    }

    .hero-section {
        min-height: 500px;
    }
}

@media (max-width: 576px) {
    .section-title h2 {
        font-size: 1.8rem;
    }

    .hero-section {
        min-height: 450px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }
}
/* ===== Galería de servicios ===== */

.grid-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.item-galeria img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.volver-servicios {
    text-align: center;
    margin-top: 40px;
}

.btn-volver {
    background-color: var(--primary);
    color: #fff;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 4px;
}

.btn-volver:hover {
    background-color: var(--primary-light);
}
/* ===== Mejora visual Galería Desplegable ===== */

.grid-galeria {
    max-width: 1200px;
    margin: 0 auto;
    gap: 35px;
}
.item-galeria {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(9, 5, 4, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.item-galeria img {
    height: 300px; /* 🔴 antes 220px */
    transition: transform 0.6s ease;
}
.item-galeria:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(9, 5, 4, 0.25);
}

.item-galeria:hover img {
    transform: scale(1.06);
}
.item-galeria::after {
    content: 'Ver imagen';
    position: absolute;
    inset: 0;
    background: rgba(9, 5, 4, 0.55);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-secondary);
    letter-spacing: 1px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.item-galeria:hover::after {
    opacity: 1;
}
section.galeria-servicios .grid-galeria .item-galeria img {
    width: 100%;
    height: 320px !important;
    object-fit: cover;
    display: block;
}
section.galeria-servicios .item-galeria {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(9, 5, 4, 0.2);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
section.galeria-servicios .item-galeria:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(9, 5, 4, 0.3);
}

section.galeria-servicios .item-galeria:hover img {
    transform: scale(1.06);
    transition: transform 0.6s ease;
}
