/* ============================================================
   RESPONSIVE CSS — Full Mobile-First Overhaul
   Aarif Ali & Associates
   ============================================================ */

/* ── Contact: Icon-Only Action Buttons ── */

/* Row containing all three icon buttons */
.contact-icons-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Wrapper for call icon + its dropdown */
.contact-icon-pill {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

/* Shared base style for all three icon buttons */
.contact-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    flex-shrink: 0;
}
.contact-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.25s ease;
    pointer-events: none;
}
.contact-icon-btn:hover svg {
    transform: scale(1.12);
}

/* ── Call Icon (gold) ── */
.call-icon-btn {
    color: var(--gold-primary);
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.07);
}
.call-icon-btn:hover,
.call-icon-btn.active {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--gold-primary);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

/* ── WhatsApp Icon (green) ── */
.whatsapp-icon-btn {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.4);
    background: rgba(37, 211, 102, 0.07);
}
.whatsapp-icon-btn:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: #25D366;
    box-shadow: 0 0 18px rgba(37, 211, 102, 0.25);
    transform: translateY(-2px);
}

/* ── Gmail Icon (red) ── */
.gmail-icon-btn {
    color: #EA4335;
    border-color: rgba(234, 67, 53, 0.4);
    background: rgba(234, 67, 53, 0.07);
}
.gmail-icon-btn:hover {
    background: rgba(234, 67, 53, 0.18);
    border-color: #EA4335;
    box-shadow: 0 0 18px rgba(234, 67, 53, 0.25);
    transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════
   3D CALL DROPDOWN — floats ABOVE the call icon
   ════════════════════════════════════════════════════ */

/* Keyframes — card rises from below with 3D flip */
@keyframes cardRise3D {
    0%   { opacity: 0; transform: perspective(600px) rotateX(30deg) translateY(18px) scale(0.88); }
    60%  { opacity: 1; transform: perspective(600px) rotateX(-4deg) translateY(-3px) scale(1.02); }
    100% { opacity: 1; transform: perspective(600px) rotateX(0deg) translateY(0)    scale(1); }
}
@keyframes cardSink3D {
    0%   { opacity: 1; transform: perspective(600px) rotateX(0deg)  translateY(0)     scale(1); }
    100% { opacity: 0; transform: perspective(600px) rotateX(20deg) translateY(14px) scale(0.88); }
}
@keyframes caretPop {
    0%   { transform: translateX(-50%) scaleX(0.4) scaleY(0); opacity: 0; }
    70%  { transform: translateX(-50%) scaleX(1.1) scaleY(1.15); opacity: 1; }
    100% { transform: translateX(-50%) scaleX(1) scaleY(1); opacity: 1; }
}
@keyframes goldPulseRing {
    0%   { box-shadow: 0 0 0 0 rgba(212,175,55,0.55), 0 20px 60px rgba(0,0,0,0.85); }
    60%  { box-shadow: 0 0 0 10px rgba(212,175,55,0), 0 20px 60px rgba(0,0,0,0.85); }
    100% { box-shadow: 0 0 0 0 rgba(212,175,55,0), 0 20px 60px rgba(0,0,0,0.85); }
}

/* Container — sits ABOVE the call button */
.call-dropdown {
    position: absolute;
    bottom: calc(100% + 14px);   /* appears above the icon */
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    perspective: 800px;
    min-width: 188px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 300;
    /* closing animation handled via .closing class */
}

/* Inner card — gets the 3D surface */
.call-dropdown-inner {
    background: linear-gradient(145deg, rgba(18,14,6,0.98) 0%, rgba(8,6,2,0.99) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(212, 175, 55, 0.08),
        inset 0 1px 0 rgba(212, 175, 55, 0.18);
    transform-origin: bottom center;
    transform-style: preserve-3d;
}

/* Open state — trigger entrance animation */
.call-dropdown.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.call-dropdown.open .call-dropdown-inner {
    animation: cardRise3D 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               goldPulseRing 0.7s 0.15s ease-out forwards;
}

/* Closing state */
.call-dropdown.closing .call-dropdown-inner {
    animation: cardSink3D 0.28s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* Arrow caret — points DOWN toward the button */
.call-dropdown::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(212, 175, 55, 0.45);
    filter: drop-shadow(0 2px 4px rgba(212,175,55,0.3));
    pointer-events: none;
}
.call-dropdown.open::after {
    animation: caretPop 0.32s 0.08s cubic-bezier(0.22,1,0.36,1) both;
}

/* Thin gold shimmer line at top of card */
.call-dropdown-inner::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212,175,55,0.9) 30%,
        #fff9d6 50%,
        rgba(212,175,55,0.9) 70%,
        transparent 100%);
    animation: shimmerLine 2.5s infinite linear;
    background-size: 200% 100%;
}
@keyframes shimmerLine {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* Each option row */
.call-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease,
        transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
}
.call-dropdown-item:last-child {
    border-bottom: none;
}

/* Staggered 3D entrance for each item (inside .call-dropdown-inner) */
.call-dropdown.open .call-dropdown-inner .call-dropdown-item:nth-child(1) {
    animation: cardRise3D 0.40s 0.10s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.call-dropdown.open .call-dropdown-inner .call-dropdown-item:nth-child(2) {
    animation: cardRise3D 0.40s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Staggered 3D EXIT — reverse order so bottom item leaves first */
.call-dropdown.closing .call-dropdown-inner .call-dropdown-item:nth-child(2) {
    animation: cardSink3D 0.22s 0.00s cubic-bezier(0.55, 0, 1, 0.45) both;
}
.call-dropdown.closing .call-dropdown-inner .call-dropdown-item:nth-child(1) {
    animation: cardSink3D 0.22s 0.06s cubic-bezier(0.55, 0, 1, 0.45) both;
}

/* Hover: subtle 3D tilt + gold sweep */
.call-dropdown-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        transparent 30%,
        rgba(212, 175, 55, 0.07) 50%,
        transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
    pointer-events: none;
}
.call-dropdown-item:hover::after {
    transform: translateX(120%);
}
.call-dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    padding-left: 26px;
    transform: perspective(300px) translateZ(4px);
}

/* Icon inside each item */
.call-dropdown-item svg {
    width: 17px;
    height: 17px;
    fill: var(--gold-primary);
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(212,175,55,0.5));
    transition: transform 0.25s ease, filter 0.25s ease;
}
.call-dropdown-item:hover svg {
    transform: scale(1.2) rotate(-5deg);
    filter: drop-shadow(0 0 8px rgba(212,175,55,0.9));
}

/* Keep old contact-row / contact-icon-wrap for email row (address screen) */
.contact-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.contact-icon-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── Address: Map & Direction Styles ── */
.address-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.address-pin-icon {
    width: 24px;
    height: 24px;
    fill: var(--gold-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.address-line {
    color: var(--text-dim);
    line-height: 1.9;
    font-size: 1rem;
    margin: 0;
}

.map-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-primary);
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.06);
    padding: 0.55rem 1.3rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    letter-spacing: 0.8px;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}
.map-directions-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.map-directions-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    transform: translateY(-1px);
}

.map-embed-wrapper {
    width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.25);
    overflow: hidden;
    border-radius: 2px;
    background: #050505;
}
.map-embed-wrapper iframe {
    width: 100%;
    height: 320px;
    border: none;
    display: block;
}

/* ============================================================
   TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .screen-container {
        padding: 4rem 3rem;
    }
    .advocate-intro h1 {
        font-size: 3rem;
    }
}

/* ============================================================
   MOBILE (≤ 768px) — Bottom Navigation Bar replaces sidebar
   ============================================================ */
@media (max-width: 768px) {

    /* ── Sidebar → Bottom Nav ── */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 64px;
        flex-direction: row;
        padding: 0 1rem;
        border-right: none;
        border-top: var(--border-gold);
        z-index: 200;
        background: rgba(5, 5, 5, 0.97);
        backdrop-filter: blur(12px);
        justify-content: center;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 0;
        width: 100%;
        justify-content: space-around;
        align-items: center;
    }

    .nav-item {
        width: auto;
        flex: 1;
        justify-content: center;
    }

    .nav-link {
        width: 48px;
        height: 48px;
    }

    /* Hide the 'A' monogram on mobile */
    .sidebar > div:first-child {
        display: none;
    }

    /* Tooltip → small label below icon on mobile */
    .nav-tooltip {
        position: absolute;
        left: 50%;
        top: auto;
        bottom: -18px;
        transform: translateX(-50%) translateY(0);
        font-size: 0.62rem;
        letter-spacing: 0.5px;
        padding: 2px 6px;
        opacity: 0;
        visibility: hidden;
        white-space: nowrap;
        pointer-events: none;
    }

    /* ── Main View — no left margin, bottom padding for nav ── */
    #main-view {
        margin-left: 0;
        width: 100%;
        padding-bottom: 70px; /* space above bottom nav */
    }

    /* ── Screens ── */
    .screen-container {
        padding: 2rem 1.25rem;
        min-height: calc(100vh - 64px);
        width: 100%;
        overflow-x: hidden;
    }

    /* ── Home Layout ── */
    .home-layout {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }
    .home-image-col {
        flex: none;
        width: 100%;
        padding-top: 0;
        margin-top: 1rem;
        order: -1; /* Move image to top on mobile for better branding */
    }
    .hero-image {
        max-width: 340px;
        margin: 0 auto 1.5rem;
        transform: perspective(800px) rotateY(-6deg) rotateX(4deg);
    }
    .home-content {
        max-width: 100%;
    }

    /* ── Typography ── */
    .advocate-intro h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
        margin-bottom: 0.5rem;
    }
    .advocate-intro h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    .advocate-intro p {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #ddd;
    }
    .section-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
        text-align: center;
        width: 100%;
    }

    /* ── Cards ── */
    .premium-card {
        padding: 1.5rem 1.2rem;
        text-align: left; /* Keep card text aligned left */
        width: 100%;
        margin-top: 1rem;
    }
    .premium-card h3 {
        font-size: 1.2rem;
        text-align: center;
    }

    /* ── Screen Header ── */
    .screen-header {
        margin-bottom: 1.8rem;
    }

    /* ── AI Panel (new fullscreen — handled in ai.css) ── */
    /* Old .ai-layout / .ai-typing-area / .ai-btn removed — fullscreen AI manages its own responsive styles */

    /* ── Contact Icon Buttons (mobile) ── */
    .contact-icons-row {
        gap: 20px;
    }
    .contact-icon-btn {
        width: 56px;
        height: 56px;
    }
    .contact-icon-btn svg {
        width: 24px;
        height: 24px;
    }
    /* 3D dropdown on mobile — ensure it stays in viewport */
    .call-dropdown {
        left: 0;
        transform: translateX(0);
        min-width: 178px;
    }
    .call-dropdown::after {
        left: 28px;
        transform: none;
    }

    /* ── Map ── */
    .map-embed-wrapper iframe {
        height: 240px;
    }
}

/* ============================================================
   SMALL MOBILE (≤ 400px)
   ============================================================ */
@media (max-width: 400px) {
    .screen-container {
        padding: 1.5rem 1rem;
    }
    .advocate-intro h1 {
        font-size: 1.8rem;
    }
    .section-title {
        font-size: 1.35rem;
    }
    .contact-action-btn {
        font-size: 0.82rem;
        padding: 0.6rem 0.5rem;
    }
    .map-embed-wrapper iframe {
        height: 200px;
    }
    .premium-card {
        padding: 1.2rem 1rem;
    }
}
