:root {
    --primary: #d4af37;
    --secondary: #1a1a1a;
    --accent: #8b0000;
    --text: #f5f5f5;
    --font-title: 'Abril Fatface', cursive;
    --font-text: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-text);
    background-color: var(--secondary);
    color: var(--text);
    overflow-x: hidden;
}

/* Animación de fondo */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(212, 175, 55, 0.1) 2px,
        rgba(212, 175, 55, 0.1) 4px
    );
    z-index: -1;
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* Header con Bootstrap */
.navbar {
    background: rgba(26, 26, 26, 0.9) !important;
    backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar-brand {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--primary) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.nav-link {
    color: var(--text) !important;
    font-weight: 600;
    position: relative;
    margin: 0 0.5rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1585747860715-ebba7e41a936?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80') no-repeat center/cover;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

.hero-content {
    animation: fadeInUp 1.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 4rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 2px;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary); }
}

.btn-primary {
    background-color: var(--primary) !important;
    color: var(--secondary) !important;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.6);
}

/* Servicios - Flip Cards */
.service-card {
    height: 400px;
    perspective: 1000px;
    margin-bottom: 1.5rem;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.service-card-front {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(139, 0, 0, 0.8));
    border: 1px solid var(--primary);
}

.service-card-back {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(139, 0, 0, 0.9));
    transform: rotateY(180deg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card-front .service-icon {
    color: var(--primary);
}

.service-card-back .service-icon {
    color: var(--secondary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
}

.service-card-front .price {
    color: var(--primary);
}

.service-card-back .price {
    color: var(--secondary);
}

/* Galería */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.gallery-item img {
    transition: transform 0.5s;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.9);
    color: var(--secondary);
    text-align: center;
    transition: bottom 0.3s;
}

.gallery-item:hover .gallery-caption {
    bottom: 0;
}

/* Testimonios Carousel */
.testimonials {
    background: rgba(0, 0, 0, 0.7);
    padding: 5rem 0;
}

.testimonial-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 2rem;
    margin: 0 1rem;
    height: 100%;
}

.testimonial-card .stars {
    color: var(--primary);
    margin-bottom: 1rem;
}

.testimonial-card .quote {
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-card .author {
    display: flex;
    align-items: center;
}

.testimonial-card .author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
    border: 2px solid var(--primary);
}

.carousel-control-prev, .carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-size: 60%;
}

/* Footer */
.footer-wave {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%231a1a1a" opacity=".25"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%231a1a1a" opacity=".5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%231a1a1a"/></svg>');
    background-size: cover;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

footer {
    position: relative;
    background: var(--secondary);
}

.footer-column h3 {
    font-family: var(--font-title);
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    transition: all 0.3s;
    margin-right: 0.5rem;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Responsividad mejorada */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 70vh;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .typewriter {
        animation: none;
        border-right: none;
        white-space: normal;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Optimización Landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }

    .hero-content {
        transform: scale(0.9);
    }

    .service-card {
        height: 350px;
    }
}

/* Estilos para galeria*/
/* Estilos base de la galería (ya existentes) */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox personalizado */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: -10px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    transition: transform 0.3s;
}

.close-lightbox:hover {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
    }
    
    .close-lightbox {
        top: -50px;
        right: 0;
    }
}


/* Imagen logo en navbar*/ 
/* Estilos para la imagen del logo */
.logo-image {
height: 40px; /* Tamaño inicial */
width: auto; /* Mantiene proporciones */
animation: pulse 3s infinite; /* Misma animación que el texto */
transition: all 0.3s ease;
filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5)); /* Sombra similar al texto */
}

/* Ajustes responsivos */
@media (max-width: 992px) {
.logo-image {
height: 35px;
}
}

@media (max-width: 768px) {
.logo-image {
height: 30px;
}
}

@media (max-width: 576px) {
.logo-image {
height: 25px;
}
}


/* Estilos para section Hero */
/* Estilos para el video hero */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Estrategia de carga optimizada */

    /* Forzar reproducción en iOS */
    -webkit-tap-highlight-color: transparent;
}

/* Overlay para mejor contraste */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

/* Solución para dispositivos móviles */
@media (max-width: 768px) {
    .hero-video {
        /* Alternativa 1: Forzar display (puede no funcionar en todos los navegadores) */
        display: block !important;
        
        /* Alternativa 2: Usar imagen de respaldo solo si el video falla */
        background: url('img/hero-mobile-fallback.jpg') center/cover no-repeat;
    }
    
    /* Asegurar que el overlay sea visible */
    .video-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
}




/* Estilos para el mapa */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
}

.map-container iframe {
    filter: grayscale(20%) contrast(90%) brightness(0.9);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: grayscale(0%) contrast(100%) brightness(1);
}

/* Estilos para el formulario */
.form-control {
    border: 1px solid var(--primary);
    color: var(--text);
    background: rgba(26, 26, 26, 0.8) !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    background: rgba(26, 26, 26, 0.9) !important;
}

/* Responsividad */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
        margin-top: 2rem;
    }
}

/* Estilos para el footer */
footer {
    background-color: var(--secondary);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%231a1a1a" opacity=".25"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%231a1a1a" opacity=".5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%231a1a1a"/></svg>');
    background-size: cover;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    transition: all 0.3s;
    color: var(--primary);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}

/* Estilos para el mapa */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    height: 100%;
    min-height: 300px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(20%) contrast(90%);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: grayscale(0%) contrast(100%);
}

/* Responsividad */
@media (max-width: 992px) {
    .map-container {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
}