/* Reset y configuraciones globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
}

:root {
    --color-gold: #B5915E;
    --color-beige: #FDF7EB;
    --color-green: #566E2B;
    --color-uva: #502033;
    --color-orange: #C15523;
    --color-carbon: #2F2417;
}

body {
    background: var(--color-beige);
    color: var(--color-carbon);
}

/* Utilidades */
.hidden {
    display: none !important;
}

/* Loading */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--color-carbon);
}

/* Contenedor principal */
#app {
    height: 100vh;
    width: 100vw;
}

/* Logo */
.logo-container {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.logo {
    height: 110px;
    width: auto;
}

/* Contenedor dividido */
.split-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.split-section {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-section .section-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* Estados para cuando el menú está activo */
.menu-active .split-container {
    transform: none;
    transition: transform 0.3s ease;
}

.menu-active .right-section {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.menu-active .left-section {
    flex: 1;
}

/* Secciones específicas */
.left-section {
    background-image: url('../images/home-left.jpg');
}

.right-section {
    background-image: url('../images/home-right.jpg');
}

/* Overlay para el efecto gris */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(80, 32, 51, 0.65), rgba(181, 145, 62, 0.5));
    transition: all 0.3s ease;
}

.left-section .overlay {
    background: linear-gradient(135deg, rgba(80, 32, 51, 0.45), rgba(193, 85, 35, 0.35));
}

.right-section .overlay {
    background: linear-gradient(135deg, rgba(80, 32, 51, 0.7), rgba(193, 85, 35, 0.55));
}

/* Efecto hover - zoom x2 */
.split-section:hover .overlay {
    background: linear-gradient(135deg, rgba(181, 145, 62, 0.35), rgba(86, 110, 43, 0.4));
}

.split-section:hover {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.1);
    z-index: 50;
}

/* Contenido de las secciones */
.section-content {
    z-index: 10;
    text-align: center;
    color: white;
    pointer-events: none;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: none;
    margin: 0 auto 20px auto;
    text-align: center;
    width: 100%;
    display: block;
    line-height: 1.2;
    color: var(--color-beige);
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: normal;
    color: rgba(253, 247, 235, 0.9);
    text-shadow: none;
    text-align: center;
    margin-bottom: 20px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-btn {
    background-color: rgba(253, 247, 235, 0.08);
    border: 2px solid var(--color-beige);
    color: var(--color-beige);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(5px);
}

.portfolio-btn:hover {
    background-color: var(--color-gold);
    color: var(--color-beige);
    transform: translateY(-2px);
}

/* Menú lateral */
.country-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: rgba(32, 32, 32, 0.68);
    backdrop-filter: blur(8px);
    z-index: 200;
    transition: left 0.35s ease;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3);
}

.country-menu.active {
    left: 0;
}

.country-menu.closing {
    left: -100%;
    transition: left 0.35s ease;
}

.menu-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 80px 60px 60px;
    color: var(--color-beige);
}

.menu-content h3 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: right;
    font-weight: normal;
    color: var(--color-beige);
}

.country-list {
    list-style: none;
    padding: 0;
    text-align: right;
}

.country-list li {
    margin-bottom: 20px;
}

.country-list a {
    color: var(--color-beige);
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    display: block;
    padding: 10px 0;
    transition: opacity 0.3s ease;
}

.country-list a:hover {
    opacity: 0.7;
    color: var(--color-gold);
}

.country-list a.active {
    color: var(--color-gold);
    opacity: 1;
}

.close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-beige);
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
}

.close-menu:hover {
    opacity: 0.7;
}

/* Iconos sociales */
.social-links {
    margin-top: 40px;
    text-align: right;
}

.social-icons {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 15px;
}

.social-icons a {
    color: var(--color-beige) !important;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(253, 247, 235, 0.15);
    text-decoration: none;
}

.social-icons a:hover {
    background-color: var(--color-gold);
    transform: translateY(-2px);
    color: var(--color-beige) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-popup {
        align-items: flex-end;
        padding: 16px;
    }

    .whatsapp-popup__card {
        max-width: 100%;
        border-radius: 20px;
    }
}



/* WhatsApp Float Button */
.whatsapp-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    pointer-events: none;
}

.whatsapp-widget__trigger {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: var(--color-beige);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto;
}

.whatsapp-widget__trigger svg {
    width: 28px;
    height: 28px;
}

.whatsapp-widget__trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.4);
}

.whatsapp-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.whatsapp-popup.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.whatsapp-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}


    display: none;
    position: relative;
    width: 100%;
    max-width: 360px;
    background: rgba(18, 18, 18, 0.95);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    transform: translateY(30px);
    transition: transform 0.25s ease;
    z-index: 1;
}

.whatsapp-popup.is-visible 
    display: none;
    transform: translateY(0);
}

.whatsapp-popup__close {
    display: none !important;
}

.whatsapp-popup__header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.whatsapp-popup__header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: radial-gradient(circle at top, rgba(149, 252, 120, 0.45), rgba(62, 241, 124, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-popup__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(253, 247, 235, 0.65);
}

.whatsapp-popup__header h3 {
    margin: 2px 0 4px;
    color: var(--color-beige);
    font-size: 1.2rem;
}

.whatsapp-popup__header p {
    margin: 0;
    color: rgba(253, 247, 235, 0.75);
    font-size: 0.95rem;
}

.whatsapp-popup__options {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.country-option,
.country-sublist button {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-beige);
    display: none;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.country-option span,
.country-sublist button span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.country-option strong,
.country-sublist button strong {
    font-size: 1rem;
}

.country-option small,
.country-sublist button small {
    font-size: 0.8rem;
    color: rgba(253, 247, 235, 0.65);
}

.country-option:hover,
.country-sublist button:hover {
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

.country-option__chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(253, 247, 235, 0.7);
    border-bottom: 2px solid rgba(253, 247, 235, 0.7);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.country-option.is-expanded .country-option__chevron {
    transform: rotate(-135deg);
}

.country-sublist {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-left: 12px;
}

.country-sublist.is-open {
    display: flex;
}

.country-sublist button {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .whatsapp-popup {
        align-items: flex-end;
        padding: 16px;
    }

    .whatsapp-popup__card {
        max-width: 100%;
        border-radius: 20px;
    }
}



.whatsapp-popup.is-visible .whatsapp-popup__options {
    display: flex;
}

.whatsapp-popup.is-visible .country-option, .whatsapp-popup.is-visible .country-sublist button {
    display: flex;
}

.whatsapp-popup.is-visible .whatsapp-popup__card {
    display: block;
}

/* WPP Fix: Normalize popup card styles to ensure visibility */
.whatsapp-popup__card {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: rgba(18, 18, 18, 0.95);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    transform: translateY(30px);
    transition: transform 0.25s ease;
    z-index: 1;
    display: none;
}
.whatsapp-popup.is-visible .whatsapp-popup__card {
    transform: translateY(0);
    display: block;
}
.whatsapp-popup__overlay { z-index: 0; }
