/* Reset y variables base */
:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.25);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* --- FONDOS RESPONSIVOS --- */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('fondo-alta.jpeg');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

/* Capa oscura/desenfoque general para asegurar lectura del texto */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35); /* Capa semi-transparente oscura */
    backdrop-filter: blur(4px); /* Desenfoque sutil tipo Apple */
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
}

/* Por defecto (móviles): mostrar video, ocultar imagen */
.desktop-bg { display: none; }
.mobile-bg { display: block; }

/* Para pantallas grandes (resoluciones altas > 1024px) */
@media (min-width: 1024px) {
    .mobile-bg { display: none; }
    .desktop-bg { display: block; }
}

/* --- CONTENEDOR PRINCIPAL --- */
.container {
    width: 100%;
    max-width: 550px;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* --- PERFIL --- */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    background: white; /* Por si el logo tiene fondo transparente */
    border: 3px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.profile-img:hover {
    transform: scale(1.05);
}

.profile-logo-text {
    max-width: 220px;
    height: auto;
    margin-bottom: 0.5rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.profile-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    max-width: 90%;
}

/* --- ENLACES (GLASSMORPHISM) --- */
.links-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.link-card {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.75rem;
    text-decoration: none;
    color: white;
    backdrop-filter: blur(12px); /* Efecto cristal principal */
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out backwards;
    will-change: transform, box-shadow;
}

/* Cascada de animaciones al cargar */
.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }

.link-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: var(--glass-hover);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.4);
}

.link-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    object-fit: cover;
    margin-right: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.link-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.link-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.link-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Botón destacado: WhatsApp */
.whatsapp-link {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.3);
}

.whatsapp-link:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: rgba(37, 211, 102, 0.5);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.2);
}

/* Footer */
footer {
    margin-top: 3.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* --- UBICACIÓN DROPDOWN --- */
.location-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.location-dropdown {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease, padding 0.4s ease;
    background: var(--glass-bg);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 0 1rem;
    margin-top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.location-dropdown.open {
    max-height: 500px;
    opacity: 1;
    padding: 1.5rem 1rem;
    margin-top: 0.5rem;
    border-color: var(--glass-border);
}

.location-address {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.location-btn {
    background: white;
    color: #333;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.location-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* --- ANIMACIONES --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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