/* ==========================================================================
   VARIABLES DE DISEÑO (Basadas en la identidad de Lixxtorbox)
   ========================================================================== */
:root {
    --bg-crema: #F4F1EA;         /* Fondo suave de la web */
    --brand-green: #0A2E24;      /* Verde oscuro institucional */
    --text-dark: #0A2E24;
    --text-light: #ffffff;
    --accent-glow: rgba(10, 46, 36, 0.15);
}

/* ==========================================================================
   ESTILOS GENERALES Y BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-crema);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   NAVBAR (Adaptada con Glassmorphism)
   ========================================================================== */
.main-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(10, 46, 36, 0.08);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.nav-status {
    font-size: 0.85rem;
    background: rgba(10, 46, 36, 0.05);
    color: var(--brand-green);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--brand-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--brand-green);
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL Y ESCENA 3D (Formato Horizontal)
   ========================================================================== */
.card-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 110px 20px 40px 20px;
}

.permission-container {
    margin-bottom: 20px;
}

.btn-permission {
    background-color: var(--brand-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: transform 0.2s, opacity 0.2s;
}

.btn-permission:hover {
    transform: scale(1.02);
}

.btn-permission.hidden { 
    display: none; 
}

/* Escena que contiene el renderizado 3D */
.card-scene {
    width: 420px;                  /* Formato horizontal */
    height: 250px;                 /* Proporción clásica de tarjeta física */
    perspective: 1200px;           /* Profundidad de la perspectiva 3D */
    max-width: 90vw;               /* Evita que se corte en pantallas de celulares */
    aspect-ratio: 85 / 51;
}

/* Ajuste dinámico responsivo para móviles */
@media (max-width: 480px) {
    .card-scene {
        height: auto; 
    }
}

/* Objeto Tarjeta que rota sobre su propio eje */
.card-object {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    box-shadow: 0 20px 45px rgba(10, 46, 36, 0.18);
    border-radius: 16px;
}

/* Clase de CSS activada por JS al hacer clic */
.card-object.flipped {
    transform: rotateY(180deg);
}

/* ==========================================================================
   CARAS DE LA TARJETA (Manejo de Imágenes de fondo)
   ========================================================================== */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;              /* Recorta la imagen para heredar las esquinas redondeadas */
    border: 1px solid rgba(10, 46, 36, 0.08);
}

.card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;             /* Se adapta al recuadro de la tarjeta sin deformarse */
    display: block;
}

/* Cara Frontal */
.card-front {
    background-color: #ffffff;
}

/* Cara Trasera (Empieza invertida para que se descubra al girar) */
.card-back {
    background-color: #ffffff;
    transform: rotateY(180deg);
}

/* Texto de indicación inferior */
.hint-touch-global {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--brand-green);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* ==========================================================================
   BOTONES DE ACCIÓN (Debajo de la tarjeta)
   ========================================================================== */
.action-area {
    margin-top: 30px;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    transition: transform 0.2s, background-color 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.instagram {
    background-color: var(--brand-green);
    box-shadow: 0 4px 12px rgba(10, 46, 36, 0.15);
}

.social-btn.instagram:hover {
    background-color: #0e3f32;
}

.social-btn.whatsapp {
    background-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.social-btn.whatsapp:hover {
    background-color: #20ba59;
}

/* ==========================================================================
   FOOTER (Pie de página)
   ========================================================================== */
.main-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--brand-green);
    opacity: 0.5;
    margin-top: auto;
}