/* === FASE 0: DEFINICIÓN DEL ADN DIGITAL === */
:root {
    /* Paleta de Color */
    --color-background: rgb(21, 21, 21); /* Ébano */
    --color-accent: rgb(197, 171, 128);   /* Oro Pálido */
    --color-text: rgb(241, 237, 230);      /* Hueso */
    --color-text-muted: rgba(241, 237, 230, 0.7);

    /* Tipografía */
    --font-primary: 'Cormorant Garamond', serif;
    --font-secondary: 'Inter', sans-serif;

    /* Otros */
    --header-height: 80px;
}

/* === RESET Y BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-text);
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }

/* === HEADER Y NAVEGACIÓN === */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background-color: rgba(21, 21, 21, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    /* CORRECCIÓN: Posicionamiento absoluto para un centrado perfecto */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a, .language-selector a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem;
}

.main-nav a.active, .language-selector a.active {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-accent);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === SECCIÓN HERO (IMPACTO INICIAL) === */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(21, 21, 21, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--color-accent);
    color: var(--color-background);
    padding: 1rem 2.5rem;
    font-family: var(--font-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--color-text);
    color: var(--color-background);
}

/* === SECCIONES DE CONTENIDO GENERAL === */
.intro-preview {
    padding: 6rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-preview h2 {
    margin-bottom: 1rem;
}

/* === FOOTER === */
.main-footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    border-top: 1px solid rgba(197, 171, 128, 0.2);
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* === HERO DE PÁGINA INTERIOR === */
.page-hero {
    padding-top: var(--header-height);
    padding-bottom: 4rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: center;
    background-color: rgb(27, 27, 27);
    border-bottom: 1px solid rgba(197, 171, 128, 0.2);
}

.page-hero h2 {
    font-size: 3rem;
    margin-top: 2rem;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* === LISTA DE SERVICIOS === */
.services-list {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.service-category {
    margin-bottom: 4rem;
}

.service-category h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(197, 171, 128, 0.2);
    padding-bottom: 1rem;
}

.service-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    padding: 1.5rem 0;
    position: relative;
    cursor: default;
}

.service-item h4 {
    margin-bottom: 0.5rem;
    flex-basis: 100%;
}

.service-description {
    color: var(--color-text-muted);
    flex-basis: 70%;
    padding-right: 1rem;
}

.service-price {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-accent);
    flex-basis: 20%;
    text-align: right;
}

.service-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-item:hover::after {
    transform: scaleX(1);
}

/* === PÁGINA DE GALERÍA === */
.gallery-grid-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(21, 21, 21, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.gallery-item-overlay p {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--color-text);
    transform: translateY(20px);
    transition: transform 0.4s ease-out;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-item-overlay p {
    transform: translateY(0);
}

.frame-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.frame-rect {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2px;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.gallery-item:hover .frame-rect {
    stroke-dashoffset: 0;
}

/* === PÁGINA SOBRE NOSOTROS === */
.story-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

.story-section h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.story-section p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.team-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.team-section h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.team-member {
    text-align: center;
}

.team-member-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1.1;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.team-member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.team-member:hover .team-member-photo img {
    transform: scale(1.1);
}

.team-member .frame-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.team-member .frame-rect {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2px;
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.team-member:hover .frame-rect {
    stroke-dashoffset: 0;
}

.team-member-info h4 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.team-member-info h5 {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.team-member-info p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* === PÁGINA DE CONTACTO Y RESERVAS === */
.contact-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-weight: 400;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.contact-info a {
    color: var(--color-text-muted);
}

.contact-info a:hover {
    color: var(--color-accent);
}

.contact-form-container h3 {
    font-weight: 400;
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(241, 237, 230, 0.3);
    color: var(--color-text);
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    outline: none;
    position: relative;
    z-index: 1;
}

.form-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 0;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -15px;
    font-size: 0.9rem;
    color: var(--color-accent);
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.form-group:focus-within::after {
    transform: scaleX(1);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c5ab80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    cursor: pointer;
}

.contact-form .cta-button {
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
}

/* === ÚLTIMAS ADICIONES (MAPA, NUEVAS SECCIONES) === */
.map-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-top: 2rem;
    border: 1px solid rgba(197, 171, 128, 0.2);
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(100%) contrast(1.2) brightness(0.9);
    transition: filter 0.4s ease;
}

.map-container:hover iframe {
    filter: none;
}

.featured-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 4rem auto;
    padding: 0 2rem;
}

.featured-item {
    background-color: rgb(27, 27, 27);
    text-align: center;
}

.featured-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.featured-item-content {
    padding: 2rem;
}

.featured-item-content h3 {
    margin-bottom: 0.5rem;
}

.text-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 5px;
}

.text-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.text-link:hover::after {
    transform: scaleX(1);
}

.philosophy-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.philosophy-content h2 {
    margin-bottom: 1.5rem;
}

.philosophy-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.philosophy-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.experience-section {
    padding: 6rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 4rem auto;
    background-color: rgb(27, 27, 27);
}

.experience-section h2 {
    margin-bottom: 1rem;
}

.experience-section p {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .logo {
        position: static;
        transform: none;
        text-align: left;
        flex-grow: 1;
    }
    h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .service-item h4 {
        margin-bottom: 0.75rem;
    }
    .service-description {
        flex-basis: 100%;
        margin-bottom: 1rem;
    }
    .service-price {
        flex-basis: 100%;
        text-align: left;
        font-size: 1.1rem;
    }
    .philosophy-section {
        grid-template-columns: 1fr;
    }
}
/* === NAVEGACIÓN MÓVIL === */

.mobile-nav-toggle {
    display: none; /* Oculto por defecto en escritorio */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height */
    background-color: rgba(21, 21, 21, 0.9);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* Estado Oculto */
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.4s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-nav-inner {
    position: relative;
    width: 100%;
}

.mobile-nav-close {
    position: absolute;
    top: -5vh; /* Ajuste relativo a la altura de la ventana */
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 3rem;
    cursor: pointer;
}

.mobile-nav-links a {
    display: block;
    font-family: var(--font-primary);
    font-size: clamp(2rem, 8vw, 2.5rem);
    color: var(--color-text);
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--color-accent);
    transform: scale(1.1);
}

.mobile-nav-lang {
    margin-top: 2rem;
}

.mobile-nav-lang a {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem;
}
.mobile-nav-lang a.active {
    color: var(--color-text);
}
.mobile-nav-lang span {
    color: var(--color-accent);
    margin: 0 0.5rem;
}


/* Estado Visible */
body.mobile-nav-open .mobile-nav {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Transformación de la hamburguesa a una 'X' */
body.mobile-nav-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.mobile-nav-open .hamburger-line:nth-child(2) {
    opacity: 0;
}
body.mobile-nav-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Ocultar/mostrar elementos en móvil */
@media (max-width: 768px) {
    .main-nav, .language-selector {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
}