/* ==========================================================================
   BRICHT — Digital Business Card Horizontal 3D Interactive System
   iPhone / iOS Safari & Mobile Responsive Optimized
   ========================================================================== */
:root {
    --bg-dark: #050508;
    --accent-turquoise: #00d2ff;
    --accent-purple: #9d4ede;
    --accent-green: #06d6a0;
    --text-primary: #ffffff;
    --text-secondary: #a0a4b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    height: 100dvh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* Orientation Prompt Overlay (Mobile Portrait) */
.orientation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(5, 5, 8, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.orientation-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.orientation-modal {
    max-width: 360px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(0, 210, 255, 0.35);
    border-radius: 24px;
    padding: 2.2rem 1.6rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.rotate-phone-icon {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    color: var(--accent-turquoise);
}

.rotate-phone-icon svg {
    width: 100%;
    height: 100%;
}

.arrow-rotate {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.orientation-modal h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.orientation-modal p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.btn-dismiss {
    background: linear-gradient(135deg, #00d2ff 0%, #9d4ede 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

/* Main Viewport & Background */
.app-viewport {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(5, 5, 8, 0.85), rgba(5, 5, 8, 0.85)), url('assets/bg_back_v.jpg') center/cover no-repeat fixed;
    position: relative;
}

/* Fullscreen Control Button */
.fullscreen-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.fullscreen-toggle:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--accent-turquoise);
}

.fullscreen-toggle svg {
    width: 22px;
    height: 22px;
}

/* Horizontal 3D Perspective Card Scene */
.card-scene {
    width: min(94vw, 680px);
    aspect-ratio: 1.58 / 1;
    perspective: 1400px;
    -webkit-perspective: 1400px;
    cursor: pointer;
}

.card-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d.is-flipped {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* Card Faces Common Styling */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 28px;
    padding: 1.8rem 2.2rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%), url('assets/bg_back_v.jpg') center/cover no-repeat;
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* FRONT FACE: Logo BRICHT + Subtitle + High Contrast Filiales */
.card-front {
    text-align: center;
    align-items: center;
}

.front-brand-center {
    margin-top: 1.2rem;
}

.bricht-wordmark-large {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 4rem;
    letter-spacing: 6px;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bricht-wordmark-large:hover {
    transform: scale(1.03);
    color: var(--accent-turquoise);
}

.bricht-tagline {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--accent-turquoise);
    margin-top: 0.6rem;
    letter-spacing: 1px;
}

.brand-divider {
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-turquoise), transparent);
    margin: 1rem auto 0;
}

.tap-hint-banner {
    background: rgba(0, 210, 255, 0.12);
    border: 1px dashed rgba(0, 210, 255, 0.4);
    border-radius: 20px;
    padding: 0.65rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.6rem 0;
}

.tap-icon {
    font-size: 1.15rem;
}

.tap-text {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-turquoise);
}

/* Lower Filiales Row with High Visibility & Contrast */
.footer-filiales-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.filial-logo {
    height: 42px;
    max-width: 130px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s ease;
}

.filial-logo:hover {
    transform: scale(1.08);
}

/* BACK FACE: Executive Profile + Buttons */
.card-back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

.back-horizontal-layout {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

.profile-col-left {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.photo-container-3d {
    width: 145px;
    height: 145px;
    border-radius: 20px;
    border: 3px solid var(--accent-turquoise);
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.35);
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
}

.exec-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.verified-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--accent-green);
    background: rgba(6, 214, 160, 0.12);
    border: 1px solid rgba(6, 214, 160, 0.3);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
}

.dot-green {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
}

.info-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bricht-mini-brand {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent-turquoise);
    display: block;
    margin-bottom: 0.2rem;
}

.exec-fullname {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.3rem;
}

.exec-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

/* CTA Buttons */
.cta-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-card-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-card-cta:active {
    transform: scale(0.97);
}

.btn-portal {
    background: rgba(0, 210, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(0, 210, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

.btn-portal:hover {
    background: rgba(0, 210, 255, 0.28);
}

.btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-facebook {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.flip-back-footer {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.flip-hint-back {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Animations */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* iPhone / Mobile Responsiveness */
@media (max-width: 600px) {
    .card-scene {
        width: 95vw;
    }
    .bricht-wordmark-large {
        font-size: 2.8rem;
    }
    .bricht-tagline {
        font-size: 0.92rem;
    }
    .filial-logo {
        height: 30px;
    }
    .back-horizontal-layout {
        gap: 0.85rem;
    }
    .profile-col-left {
        flex: 0 0 100px;
    }
    .photo-container-3d {
        width: 95px;
        height: 95px;
    }
    .exec-fullname {
        font-size: 1.05rem;
    }
    .btn-card-cta {
        padding: 0.55rem 0.75rem;
        font-size: 0.74rem;
    }
}
