/* Variables CSS */
:root {
    --primary-color: #111111;
    --secondary-color: #333333;
    --accent-color: #d4af37;
    --light-color: #f8f8f8;
    --dark-color: #222222;
    --text-color: #444444;
    --text-light: #777777;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --gold-gradient: linear-gradient(45deg, #b8860b, #d4af37, #f5d742);
    --heading-font: 'Cormorant Garamond', serif;
    --body-font: 'Montserrat', sans-serif;
}

/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
}

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    background: var(--gold-gradient);
    color: #111;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
}

/* Header */
header {
    background-color: var(--primary-color);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    transition: var(--transition);
}

header.scrolled {
    padding: 15px 40px;
    background-color: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 0;
    position: relative;
    display: inline-block;
}

.logo h1::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: width 0.3s ease;
}

.logo:hover h1::after {
    width: 100%;
}

.logo p {
    font-size: 0.9rem;
    color: var(--light-color);
    margin: 0;
    opacity: 0.8;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--light-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

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

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--accent-color);
}

.carrito-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Burger Menu */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--accent-color);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1010;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section - Parallax Effect */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(17, 17, 17, 0.8), rgba(17, 17, 17, 0.9)), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--primary-color), transparent);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
}

.hero h2::after {
    background: var(--gold-gradient);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--light-color);
}

/* Parallax Sections */
.sobre-nosotros, .mision {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.sobre-nosotros {
    background-image: linear-gradient(rgba(250, 250, 250, 0.92), rgba(250, 250, 250, 0.92)), url('https://images.unsplash.com/photo-1507679799987-c73779587ccf?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80');
}

.mision {
    background-image: linear-gradient(rgba(248, 248, 248, 0.94), rgba(248, 248, 248, 0.94)), url('https://images.unsplash.com/photo-1436450412740-6b988f486c6b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
}

/* Sobre Nosotros */
.sobre-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.sobre-text {
    flex: 1;
    font-size: 22px;
    min-width: 300px;
    text-align: justify;
    text-justify: inter-word;
    font-family: "Playfair Display", serif;
}

.sobre-text p {
    margin-bottom: 20px;
    color: var(--text-color);
}

.sobre-img {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

/* Equipo */
.equipo {
    background-color: #f8f9fa;
}

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

.miembro {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 30px;
    text-align: center;
}

.miembro:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.miembro-img {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.miembro h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.miembro p {
    color: var(--text-light);
    margin-bottom: 5px;
}

/* Servicios */
.categorias {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 10px;
}

.categoria {
    padding: 8px 20px;
    background-color: #f1f1f1;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.categoria:hover {
    background-color: #e0e0e0;
}

.categoria.active {
    background-color: var(--accent-color);
    color: white;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.servicio-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 25px;
    transition: var(--transition);
}

.servicio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.servicio-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.servicio-item p {
    color: var(--text-color);
    margin-bottom: 15px;
}

.precio {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.add-to-cart:hover {
    background-color: var(--secondary-color);
}

.mas-servicios {
    text-align: center;
    margin-top: 30px;
}

/* Estilos para el botón de "Más información" */
.more-info {
    color: var(--accent-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.more-info i {
    margin-left: 5px;
    font-size: 0.8rem;
}

.more-info:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Estilos para el dialog modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1050;
    overflow: auto;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gold-gradient);
}

.modal-header {
    padding: 20px 25px;
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-body h4 {
    color: var(--primary-color);
    margin: 20px 0 10px;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body ul li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .close-modal {
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
        background-color: rgba(0,0,0,0.05);
        border-radius: 50%;
    }
}

/* Estilos para el modal de bienvenida */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.welcome-modal.active {
    display: flex;
    opacity: 1;
}

.welcome-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.4s ease;
    animation: fadeIn 0.5s ease forwards;
}

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

.welcome-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.close-welcome-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.05);
    z-index: 10;
}

/* Modificación para posicionar el formulario en escritorio */
@media (min-width: 992px) {
    .welcome-modal {
        justify-content: flex-end;
        align-items: flex-start;
    }
    
    .welcome-modal-content {
        margin: 80px 20px 0 0;
        max-width: 400px;
    }
}

/* Versión móvil centrada */
@media (max-width: 991px) {
    .welcome-modal {
        justify-content: center;
        align-items: center;
    }
    
    .welcome-modal-content {
        margin: 0 20px;
    }
}

/* Misión */
.mision {
    background-color: var(--light-color);
}

.mision-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.mision-icon {
    flex: 0 0 500px;
}

.mision-icon img {
    width: 4000px;
    height: 450px;
    box-shadow: var(--shadow);
    border-radius: 15px;
}

.mision-text {
    flex: 1;
    min-width: 300px;
}

.mision-text p {
    margin-bottom: 20px;
    font-style: italic;
    font-size: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.mision-text p b {
    color: rgb(212, 173, 42);
}

/* Ubicación */
.ubicacion-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.mapa {
    flex: 1;
    min-width: 300px;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.direccion {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.direccion h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.direccion p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.direccion i {
    color: var(--accent-color);
    width: 20px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-links h4::after,
.footer-contact h4::after,
.footer-social h4::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

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

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

.footer-links ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
    header {
        padding: 15px 20px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: rgba(17, 17, 17, 0.95);
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
        transition: 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
        width: 100%;
    }
    
    nav ul li {
        margin: 15px 0;
        text-align: center;
    }
    
    nav ul li a {
        font-size: 1.1rem;
        padding: 10px 0;
        display: block;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .sobre-content, 
    .mision-content {
        flex-direction: column;
        text-align: center;
    }
    
    .mision-icon {
        margin: 0 auto;
    }
    
    .footer-content > div {
        flex: 1 0 100%;
        text-align: center;
    }
    
    .footer-links h4::after,
    .footer-contact h4::after,
    .footer-social h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    .hero {
        background: linear-gradient(rgba(17, 17, 17, 0.8), rgba(17, 17, 17, 0.9)), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') center/cover no-repeat fixed;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .equipo-grid,
    .servicios-grid {
        grid-template-columns: 1fr;
    }
}

/* Añadir al final de tu archivo styles.css */

/* Prevenir desplazamiento horizontal en móviles */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Asegurar que las imágenes sean responsive */
img {
    max-width: 65%;
    height: auto;
}

/* Ajustar el logo en móviles */
@media (max-width: 576px) {
    .logo img {
        width: 280px;
    }
    
    footer .footer-logo img {
        width: 300px;
        height: auto;
    }
}

/* Corregir posibles problemas en la sección de héroe */
.hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Asegurar que todos los contenedores respeten el ancho del viewport */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Evitar que textos largos rompan el layout */
p, h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ajustar el modal de bienvenida para dispositivos móviles */
@media (max-width: 576px) {
    .welcome-modal-content {
        width: 90%;
        max-width: 90%;
        margin: 0;
        padding: 20px;
    }
}

/* Ajustar el mapa en la sección de ubicación */
.mapa {
    width: 100%;
}

/* Asegurar que todas las tablas sean responsive */
table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

@supports (-webkit-touch-callout: none) {
    .hero, .sobre-nosotros, .mision {
        background-attachment: scroll;
    }
}

/* Estilos base para el elemento dirección */
.direccion {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
}

.direccion h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.direccion p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap; /* Mantiene el texto en una sola línea */
    overflow: hidden;
    text-overflow: ellipsis; /* Muestra ... si el texto es demasiado largo */
}

.direccion i {
    color: var(--accent-color);
    width: 20px;
    flex-shrink: 0; /* Impide que los iconos se reduzcan más allá de lo deseado */
    font-size: inherit; /* Hereda el tamaño de fuente del párrafo padre */
}

/* Media queries para ajustar el tamaño del texto en diferentes pantallas */
@media (max-width: 1200px) {
    .direccion p {
        font-size: 0.95rem;
    }
}

@media (max-width: 992px) {
    .direccion p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .direccion {
        padding: 25px;
    }
    
    .direccion h3 {
        font-size: 1.4rem;
    }
    
    .direccion p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .direccion {
        padding: 20px;
    }
    
    .direccion h3 {
        font-size: 1.3rem;
    }
    
    .direccion p {
        font-size: 0.8rem;
        gap: 8px;
    }
    
    /* Para el email específicamente - necesita tratamiento especial por su longitud */
    .direccion p:nth-child(5) {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .direccion p {
        font-size: 0.7rem;
        gap: 6px;
    }
    
    .direccion p:nth-child(5) {
        font-size: 0.65rem;
    }
    
    .direccion i {
        width: 16px;
    }
}

@media (max-width: 375px) {
    .direccion p {
        font-size: 0.65rem;
        gap: 5px;
    }
    
    .direccion p:nth-child(5) {
        font-size: 0.6rem;
    }
    
    .direccion i {
        width: 14px;
    }
}

/* Mejora para las imágenes en la sección "Sobre Nosotros" */
.sobre-img {

}

.sobre-img img {

    box-shadow: var(--shadow);
    border-radius: 8px;
    transition: transform 0.5s ease;
}

.sobre-img:hover img {
    transform: scale(1.03);
}

.miembro {
    padding: 30px;
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    box-shadow: var(--shadow);
}


.miembro:hover {
    transform: scale(1.1);
}

