/* ==============================
   BENE MUNYANDINDA Digital Business Card
   Professional, Minimal, Investor-Ready
   ============================== */

/* Professional Color Palette */
:root {
    --primary-blue: #2C5F8D;
    --accent-teal: #00B4A6;
    --accent-gold: #D4AF37;
    --charcoal: #2C3E50;
    --slate: #34495E;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #7f8c8d;
    --overlay-bg: rgba(0, 0, 0, 0.4);
    --card-bg: #ffffff;
    --left-offset: 1.75rem; /* x-position for vertical teal accents (logo, dropdown, overlays, cards) */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Allow page scrolling on small/mobile viewports so content isn't clipped */
    overflow: auto;
    /* Respect safe-area insets on devices with notches (iOS) */
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ==============================
   PAYPAL DONATE BUTTON
   ============================== */

.donate-btn-wrapper {
    position: fixed;
    top: 1.75rem;
    right: 1.75rem;
    z-index: 40;
    pointer-events: auto;
}

.donate-btn-wrapper form {
    display: flex;
    align-items: center;
}

.donate-btn-wrapper input[type="image"] {
    display: block;
    width: 37px;
    height: auto;
    opacity: 0.92;
    transition: opacity 0.2s, transform 0.2s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.donate-btn-wrapper input[type="image"]:hover {
    opacity: 1;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .donate-btn-wrapper {
        top: 1.25rem;
        right: 1.25rem;
    }
}

@media (max-width: 480px) {
    .donate-btn-wrapper {
        top: 0.9rem;
        right: 0.9rem;
    }
}

/* ==============================
   BRAND LOGO
   ============================== */

.brand-logo {
    position: fixed;
    top: 1.75rem;
    left: var(--left-offset);
    z-index: 40;
    pointer-events: auto;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-teal);
}

.brand-logo-img {
    height: 72px;
    width: auto;
    display: block;
    filter: brightness(1.1) contrast(1.2) saturate(1.15)
        drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65))
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.15));
}

/* Horizontal divider beneath header controls (logo + donate) */
.top-divider {
    position: fixed;
    left: 0;
    right: 0;
    height: 3px; /* will be overridden to match logo border width by JS */
    background: rgba(200,200,200,0.95); /* light grey */
    z-index: 39; /* below logo (z-index 40) and donate (z-index 40) */
    pointer-events: none;
}

/* Brand dropdown (company info) */
.brand-dropdown {
    position: fixed; /* positioned by JS */
    top: 56px;
    left: var(--left-offset);
    width: 300px;
    max-width: calc(100% - 3.5rem);
    background: rgba(0, 0, 0, 0.92);
    color: var(--text-light);
    border-left: 3px solid var(--accent-teal);
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    z-index: 61;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateY(-6px);
}
.brand-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.brand-dropdown .bd-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    cursor: pointer;
}
.brand-dropdown .bd-content h3 {
    margin: 0 0 0.35rem 0;
    font-size: 0.95rem;
    color: var(--text-light);
    letter-spacing: 0.6px;
}
.brand-dropdown .bd-content p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    margin: 0.35rem 0;
}
.brand-dropdown .bd-content a { color: var(--text-light); text-decoration: underline; }

@media (max-width: 768px) {
    :root { --left-offset: 1.25rem; }
    .brand-logo {
        top: 1.25rem;
    }
    .brand-logo-img { height: 58px; }
}

@media (max-width: 480px) {
    :root { --left-offset: 0.9rem; }
    .brand-logo {
        top: 0.9rem;
    }
    .brand-logo-img { height: 48px; }
}

/* ==============================
   SLIDESHOW CONTAINER
   ============================== */

.slideshow-container {
    position: relative;
    width: 100vw;
    /* Use a dynamic --vh unit to avoid mobile 100vh issues (browser UI hiding part of viewport) */
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Portrait Styling */
.portrait-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: brightness(0.65) contrast(1.1);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Text Overlay */
.overlay {
    /* Make overlays fixed so they remain in the same viewport position when users zoom */
    position: fixed;
    bottom: 3rem;
    left: var(--left-offset);
    right: auto;
    z-index: 60;
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    max-width: 220px;
    border-left: 3px solid var(--accent-teal);
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* About Me Section */
.about-me-section {
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.about-me-header {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.about-me-header i {
    font-size: 0.55rem;
}

.about-audio {
    display: none;
}

.custom-player {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(0,0,0,0.35);
    border-radius: 4px;
    padding: 0.25rem 0.4rem;
}

.ap-play {
    background: var(--accent-teal);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 0.45rem;
    padding: 0;
    transition: background 0.2s;
}

.ap-play:hover { background: var(--primary-blue); }

.ap-time {
    font-size: 0.4rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    min-width: 52px;
}

.ap-progress {
    flex: 1;
    height: 3px;
    accent-color: var(--accent-teal);
    cursor: pointer;
    min-width: 0;
}

.ap-speed {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 3px;
    color: rgba(255,255,255,0.75);
    font-size: 0.38rem;
    padding: 0.1rem 0.2rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    line-height: 1.2;
}

.ap-speed.active,
.ap-speed:hover {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: #fff;
}

.member-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.member-role {
    font-size: 0.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Contact Button */
.contact-btn {
    background: var(--accent-teal);
    color: var(--text-light);
    border: none;
    padding: 0.375rem 1rem;
    font-size: 0.475rem;
    font-weight: 500;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 180, 166, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 180, 166, 0.4);
    background: var(--primary-blue);
}

.contact-btn i {
    font-size: 0.5rem;
}

/* ==============================
   SLIDE INDICATORS (DOTS)
   ============================== */

.slide-indicators {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.dot.active {
    background: var(--accent-teal);
    width: 40px;
    border-radius: 6px;
}

/* ==============================
   CONTACT CARDS (POPUP)
   ============================== */

/* Backdrop: removed to avoid device-specific overlay issues */
.contact-card::after {
    display: none !important;
}

.contact-card {
    position: fixed;
    bottom: 3rem;
    left: var(--left-offset);
    top: auto;
    transform: scale(0.95);
    background: rgba(44, 62, 80, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1rem 0.875rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 190px;
    width: 90%;
    border-left: 3px solid var(--accent-teal);
    overflow: hidden;
}

.contact-card.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.contact-content h2 {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.2rem;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.card-role {
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.875rem;
    font-weight: 400;
}

.contact-details {
    margin-bottom: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 0.55rem;
    color: var(--accent-teal);
    width: 12px;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.contact-item span {
    font-size: 0.475rem;
    color: var(--text-light);
}

/* Make contact links white, remove underline, and allow selection */
.contact-card, .contact-card * {
    user-select: text;
}
.contact-item a,
.contact-item span {
    color: var(--text-light);
    text-decoration: none;
}
.contact-item a:hover {
    text-decoration: none;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact-text span {
    font-size: 0.475rem;
    color: var(--text-light);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.social-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-teal);
    color: var(--text-light);
    font-size: 0.6rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 180, 166, 0.25);
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 180, 166, 0.4);
    background: var(--primary-blue);
}

/* ==============================
   RESPONSIVE DESIGN
   ============================== */

/* Landscape Orientation Warning */
.landscape-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--charcoal);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.warning-content {
    text-align: center;
    padding: 2rem;
}

.warning-content i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-teal);
    animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.warning-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.warning-content p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Show warning only in landscape mode */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .landscape-warning {
        display: flex;
    }
    
    .slideshow-container,
    .contact-card {
        display: none !important;
    }
}

/* Desktop: Compact contact card */
@media (min-width: 1025px) {
    .contact-card {
        max-width: 340px;
        padding: 1.75rem 1.5rem;
    }

    .contact-content h2 {
        font-size: 1.25rem;
    }
    /* Keep the role as a normal text line under the name on desktop */
    .card-role {
        font-size: 0.95rem;
        color: rgba(255,255,255,0.85);
        margin: 0 0 0.875rem 0;
        font-weight: 400;
    }

    .contact-item {
        padding: 0.65rem 0;
    }

    .contact-item i {
        font-size: 1rem;
    }

    .contact-item span,
    .contact-text span {
        font-size: 0.85rem;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .contact-card {
        bottom: 2rem;
        /* Align using the shared left-offset so the teal accent stacks vertically */
        left: var(--left-offset);
        right: var(--left-offset);
        /* Constrain width to viewport minus left/right offsets so it doesn't overflow
           and remains visually consistent with the desktop card */
        max-width: calc(100% - 2 * var(--left-offset));
        width: auto;
        box-sizing: border-box;
    }

    .overlay {
        bottom: 3.5rem;
        right: 1.5rem;
        left: 1.5rem;
        width: auto;
        max-width: none;
    }

    .member-name {
        font-size: 1.5rem;
    }

    .member-role {
        font-size: 0.9rem;
    }

    .contact-btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }

    .contact-content h2 {
        font-size: 1.3rem;
    }

    .contact-item span {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .overlay {
        bottom: 3rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
        padding: 1.25rem 1.5rem;
    }

    .member-name {
        font-size: 1.25rem;
        letter-spacing: 0.3px;
    }

    .member-role {
        font-size: 0.85rem;
    }

    .contact-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }

    .contact-card {
        padding: 2rem 1.5rem;
    }
}
