/* 
 * Aden Link Hub - Specific Styles
 * Reuses tokens from style.css but scopes layout
 */

/* =========================================
   1. SETUP & UTILS
   ========================================= */
.link-hub-body {
    background-color: var(--color-bg-olive);
    min-height: 100vh;
    font-family: var(--font-en-body);
    display: flex;
    justify-content: center;
    color: var(--color-text-light);
    overflow-x: hidden;
}

/* Background Layers */
.hub-bg-layers {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.bg-gradient-hub {
    position: absolute;
    inset: 0;
    /* User provided background image */
    background-image: linear-gradient(to bottom, rgba(0, 20, 10, 0.7), rgba(0, 0, 0, 0.8)), url('../assets/backgrounds/linktree background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bg-pattern-hub {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--color-gold-shadow) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.08;
    /* Will animate parallax in JS */
}

/* Container */
.hub-container {
    width: 100%;
    max-width: 480px;
    padding: 10px 16px 4px;
    /* Zero scroll target */
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Minimize gap */
    position: relative;
    z-index: 10;
}

/* Typography Helpers */
.font-display-en {
    font-family: var(--font-en-header);
}

.font-display-ar {
    font-family: var(--font-ar-header);
}

.font-body-en {
    font-family: var(--font-en-body);
}

.font-body-ar {
    font-family: var(--font-ar-body);
}

/* =========================================
   2. PROFILE HEADER
   ========================================= */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-items: center;
    gap: 4px;
    /* Very tight gap */
    margin-bottom: 4px;
}

/* Avatar */
.avatar-zone {
    position: relative;
    position: relative;
    width: 70px;
    /* Extreme compact avatar */
    height: 70px;
}

.avatar-img-wrapper {
    width: 100%;
    height: 100%;
    /* border-radius: 50%; remove circle constraint */
    /* background: radial-gradient(circle at center, #005c35, #002e1a); */
    display: flex;
    justify-content: center;
    align-items: center;
    /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); */
    /* border: 2px solid rgba(214, 173, 69, 0.3); */
    /* overflow: hidden; */
}

.hub-logo {
    width: 100%;
    /* Use full container width */
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.avatar-ring {
    display: none;
    /* Hide the ring */
}

@keyframes ringData {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
}

/* Profile Text */
.profile-text {
    text-align: center;
}

.brand-title-en {
    font-size: 1.1rem;
    color: var(--color-gold-main);
    line-height: 1.1;
    margin-bottom: 0;
}

.brand-title-ar {
    font-size: 0.95rem;
    color: var(--color-gold-main);
    margin-bottom: 2px;
}

.tagline-group p {
    font-size: 0.95rem;
    color: #dfdfdf;
    line-height: 1.4;
    margin: 0;
}

.location-micro {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--color-gold-main);
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* =========================================
   3. LINK GROUPS & CARDS
   ========================================= */
.section-label {
    text-align: center;
    margin-bottom: 4px;
    /* Tight */
    display: flex;
    flex-direction: column;
    gap: 0;
}

.label-en {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-gold-main);
    opacity: 0.8;
}

.label-ar {
    font-size: 0.9rem;
    color: var(--color-gold-main);
    font-family: var(--font-ar-body);
}

/* Card General */
.hub-card {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    /* Ultra slim cards */
    border-radius: 12px;
    /* Modern UI rounded corners (not pill) */
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    /* Minimal margin */

    /* Base Glass Style */
    background: rgba(20, 30, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

    /* Animation Start State */
    animation: slideUpFade 0.7s ease-out forwards;
    opacity: 0;
}

.hub-card::before {
    /* Shine effect element */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    pointer-events: none;
}

.hub-card:hover::before {
    left: 150%;
    transition: 0.7s;
}

.hub-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(214, 173, 69, 0.4);
}

/* Primary Action (Gold) */
.primary-action {
    background: linear-gradient(135deg, rgba(214, 173, 69, 0.9), rgba(168, 133, 45, 0.9));
    border: 1px solid rgba(255, 223, 130, 0.3);
}

.primary-action .card-icon {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-right: 12px;
    /* Tighter icon spacing */
}

.primary-action .link-label-en {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.15rem;
    font-family: var(--font-en-header);
    /* Use header font for primary buttons */
    letter-spacing: 0.5px;
}

.primary-action .link-label-ar {
    color: #2c2108;
    font-weight: 600;
    margin-top: 2px;
}

.primary-action:hover {
    background: linear-gradient(135deg, #eec75d, #bda14f);
    box-shadow: 0 10px 40px rgba(214, 173, 69, 0.3);
}

/* Secondary Action (Dark Glass) */
.secondary-action {
    background: rgba(10, 20, 15, 0.6);
    border: 1px solid rgba(214, 173, 69, 0.2);
}

.secondary-action .card-icon {
    background: rgba(214, 173, 69, 0.1);
    color: var(--color-gold-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-right: 20px;
    transition: 0.3s;
}

.secondary-action .link-label-en {
    color: #f0f0f0;
    font-weight: 600;
}

.secondary-action:hover .card-icon {
    background: var(--color-gold-main);
    color: #000;
}

.secondary-action:hover {
    background: rgba(20, 35, 25, 0.8);
    border-color: var(--color-gold-main);
}

/* Link Icon Image */
.link-icon-img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    display: block;
}

/* Card Internals */
/* Card Internals - Adjusted */
/* .card-icon styles moved to action blocks above for specificity */

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.link-label-en {
    font-size: 1rem;
    font-weight: 600;
}

.link-label-ar {
    font-size: 0.9rem;
    font-family: var(--font-ar-body);
    opacity: 0.8;
}

.card-arrow {
    font-size: 1.5rem;
    margin-left: 10px;
    opacity: 0.5;
    transition: 0.3s;
}

.hub-card:hover .card-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* =========================================
   4. SOCIAL GROUP
   ========================================= */
/* Social Group */
.social-group {
    margin-top: 8px;
    /* Tighter */
}

.social-row {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 66, 37, 0.5);
    border: 1px solid rgba(214, 173, 69, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    /* Removed text styles */
}

.social-icon-img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--color-emerald-deep);
    border-color: var(--color-gold-main);
    transform: scale(1.1) rotate(5deg);
}

.social-btn:hover .social-icon-img {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
    transform: scale(1.1);
}

/* =========================================
   5. STORY CARD
   ========================================= */
.story-highlight {
    margin-top: 10px;
}

.story-card {
    display: block;
    /* Override flex */
    background: rgba(46, 38, 23, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(214, 173, 69, 0.15);
    padding: 24px;
    text-align: center;
}

.story-content h3 {
    margin-bottom: 4px;
}

.story-title-en {
    font-size: 1.2rem;
    color: var(--color-gold-main);
}

.story-title-ar {
    font-size: 1.1rem;
    color: var(--color-gold-main);
    font-family: var(--font-ar-header);
    margin-bottom: 12px;
}

.story-body-en,
.story-body-ar {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 8px;
}

.btn-text-link {
    display: inline-block;
    margin-top: 12px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--color-gold-main);
    color: var(--color-gold-main);
    font-size: 0.9rem;
}

.btn-text-link:hover {
    color: var(--color-gold-highlight);
    border-color: var(--color-gold-highlight);
}

/* =========================================
   6. FOOTER
   ========================================= */
.hub-footer {
    text-align: center;
    margin-top: 4px;
    /* Pulling it up */
    margin-bottom: 4px;
    opacity: 0.6;
    transition: 0.3s;
    font-size: 0.7rem;
}

.hub-footer:hover {
    opacity: 1;
}

.footer-brand {
    font-family: var(--font-ar-header);
    color: var(--color-gold-main);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.footer-info {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* =========================================
   7. ANIMATION UTILS
   ========================================= */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-card {
    /* ... existing styles ... */
    animation: slideUpFade 0.6s ease-out forwards;
    opacity: 0;
    /* Hidden initially, revealed by keyframe */
}

/* Stagger delays via nth-child */
.link-group .hub-card:nth-child(1) {
    animation-delay: 0.1s;
}

.link-group .hub-card:nth-child(2) {
    animation-delay: 0.2s;
}

.link-group .hub-card:nth-child(3) {
    animation-delay: 0.3s;
}

.link-group .hub-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* =========================================
   8. LANGUAGE SWITCHER
   ========================================= */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
    /* No bottom margin */
    z-index: 50;
    position: relative;
    direction: ltr;
    /* Always LTR for the switcher itself */
}

.lang-chip {
    background: rgba(0, 30, 20, 0.4);
    border: 1px solid rgba(214, 173, 69, 0.3);
    color: #ccc;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-en-body);
}

.lang-chip:hover {
    background: rgba(214, 173, 69, 0.1);
    border-color: var(--color-gold-main);
    color: var(--color-gold-highlight);
}

.lang-chip.active {
    background: var(--color-gold-main);
    color: #111;
    border-color: var(--color-gold-main);
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(214, 173, 69, 0.3);
}

/* =========================================
   9. RTL SUPPORT (Arabic)
   ========================================= */
.dir-rtl {
    direction: rtl;
    font-family: var(--font-ar-body);
}

.dir-rtl .card-arrow {
    transform: rotate(180deg);
    margin-left: 0;
    margin-right: 10px;
}

.dir-rtl .hub-card:hover .card-arrow {
    transform: translateX(-4px) rotate(180deg);
}

.dir-rtl .primary-action .card-icon,
.dir-rtl .secondary-action .card-icon {
    margin-right: 0;
    margin-left: 20px;
}

.dir-rtl .footer-info {
    direction: ltr;
    /* Keep footer English copyright flow? Or flip? Let's flip for consistency if purely Arabic, but usually mixed. Keep ltr for names. */
    direction: rtl;
}

/* =========================================
   10. STRICT LANGUAGE SEPARATION
   ========================================= */
/* When in EN or NL: Hide Arabic */
body[data-lang="en"] .lang-ar,
body[data-lang="nl"] .lang-ar {
    display: none !important;
}

/* When in AR: Hide Latin (EN/NL) */
body[data-lang="ar"] .lang-lat {
    display: none !important;
}

/* Promote Arabic Title Size when it's the only one */
body[data-lang="ar"] .brand-title-ar {
    font-size: 1.6rem;
    margin-bottom: 8px;
    font-weight: 700;
}