/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    /* Brand Colors */
    --color-primary: #D00000;
    --color-dark: #101010;
    --color-light: #F8F9FA;
    --color-white: #FFFFFF;
    --color-gray: #6C757D;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    /* Default to English font, overridden by [lang="ar"] */
    background-color: var(--color-light);
    color: var(--color-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-md);
    line-height: 1.6;
}

/* Arabic Specifics */
[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}

.container {
    width: 100%;
    max-width: 480px;
    /* Mobile-first constraint */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

/* Header / Profile */
.profile-section {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    width: 120px;
    height: 120px;
    background: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    padding: var(--spacing-xs);
    border: 3px solid var(--color-white);
}

.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--color-dark);
}

.brand-bio {
    font-size: 1rem;
    color: var(--color-gray);
    max-width: 90%;
    margin: 0 auto;
}

/* Language Toggle */
.lang-toggle {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

[dir="rtl"] .lang-toggle {
    right: auto;
    left: var(--spacing-md);
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
}

/* Links List */
.links-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.link-card {
    background: var(--color-white);
    color: var(--color-dark);
    text-decoration: none;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Icon and text */
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out backwards;
}

/* Staggered animation delays */
.link-card:nth-child(1) {
    animation-delay: 0.1s;
}

.link-card:nth-child(2) {
    animation-delay: 0.2s;
}

.link-card:nth-child(3) {
    animation-delay: 0.3s;
}

.link-card:nth-child(4) {
    animation-delay: 0.4s;
}

.link-card:nth-child(5) {
    animation-delay: 0.5s;
}

.link-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.link-card:active {
    transform: scale(0.98);
}

.link-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    justify-content: center;
    position: relative;
    min-height: 24px;
}

.link-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
    position: absolute;
    left: 0;
}

[dir="rtl"] .link-icon {
    left: auto;
    right: 0;
}

.link-text {
    font-weight: 600;
    font-size: 1.1rem;
    flex-grow: 1;
    text-align: center;
    line-height: 1.2;
    padding: 0 32px;
}

/* Button Group (Side-by-Side) */
.button-group {
    display: flex;
    gap: var(--spacing-sm);
    width: 100%;
}

.button-group .link-card {
    flex: 1;
    justify-content: center;
}

.button-group .link-text {
    font-size: 0.95rem;
    /* Slightly smaller for side-by-side */
}

/* Footer */
.footer {
    margin-top: var(--spacing-xl);
    font-size: 0.8rem;
    color: var(--color-gray);
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (min-width: 768px) {
    body {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    }

    .container {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
        padding: var(--spacing-xl);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        margin-top: 5vh;
    }
}