﻿/* =============================================================================
   CSS VARIABLES & ROOT CONFIGURATION
   ============================================================================= */
:root {
    /* Color Palette */
    --primary-color: #29186d;
    --secondary-color: #da241b;
    --accent-color: #1f4e79;
    --background-dark: #080838;
    --background-light: #f9f9f9;
    --background-card: rgba(255, 255, 255, 0.9);
    --hover-bg: #f0f0f0;
    --text-muted: #666;
    --border-color: #ddd;
    /* Layout & Spacing */
    --border-radius: 16px;
    --border-radius-small: 12px;
    --border-radius-large: 20px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 6px 16px rgba(41, 24, 109, 0.3);
    --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.05);
    /* Typography */
    --heading-font: inherit;
    --font-size-base: 1rem;
    --font-size-large: 1.3rem;
    --font-weight-normal: 400;
    --font-weight-medium: 550;
    --font-weight-bold: 600;
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    /* Responsive Breakpoints */
    --breakpoint-xs: 576px;
    --breakpoint-sm: 768px;
    --breakpoint-md: 992px;
    --breakpoint-lg: 1200px;
    --breakpoint-xl: 1400px;
}

/* =============================================================================
   RTL SUPPORT
   ============================================================================= */

html[dir="ltr"], body[dir="ltr"] {
    font-family: 'Ubuntu', system-ui, sans-serif;
}

html[dir="rtl"], body[dir="rtl"] {
    font-family: 'Tajawal', system-ui, sans-serif;
}

    html[dir="rtl"] .link-button:hover i {
        transform: translateX(-4px);
    }

    html[dir="rtl"] .social-links a {
        margin-right: 0;
        margin-left: 10px;
    }

    html[dir="rtl"] .dropdown-menu {
        text-align: right;
        right: 0;
        left: auto;
    }

    html[dir="rtl"] .modal-header {
        flex-direction: row; /* keep LTR order even in RTL */
    }

        html[dir="rtl"] .modal-header .modal-title {
            text-align: left; /* keep title on the left */
        }

        html[dir="rtl"] .modal-header .btn-close {
            margin-left: 0;
            margin-right: auto; /* push close button to the far right */
        }

@font-face {
    font-family: 'Ubuntu';
    src: url('../fonts/Ubuntu-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/*html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}*/

/* =============================================================================
   BASE LAYOUT & TYPOGRAPHY
   ============================================================================= */
.page-background {
    background: linear-gradient(135deg, #abacae, #f4f6f9);
    min-height: 100vh;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar {
    border-radius: 10px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-family: var(--heading-font);
    margin-bottom: 1rem;
}

h4 {
    font-weight: var(--font-weight-medium);
    color: var(--primary-color);
}

    h4.fw-bold {
        color: var(--primary-color) !important;
        font-weight: var(--font-weight-bold);
    }

.text-muted {
    color: var(--text-muted) !important;
}

/* =============================================================================
   MAIN CARD COMPONENT
   ============================================================================= */
.link-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    margin: 1rem auto;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.icons-container {
    background-color: #f4f6f9;
    border-radius: 15px;
    padding: 20px 20px;
    display: flex;
    gap: 11px;
    align-items: center;
    border: 1px solid;
    border-color: #29186d;
}
/*.icons-container {
    background-color: #f4f6f9;
    border-top: 1px solid #29186d;*/ /* looks like a footer divider */
/*border-radius: 0 0 15px 15px;*/ /* match bottom corners only */
/*padding: 10px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}*/
.logo {
    max-width: 100%;
    width: 600px;
    height: auto;
    display: block;
    margin-bottom: 30px;
}


/* =============================================================================
   NAVIGATION & LANGUAGE TOGGLE
   ============================================================================= */
/*.language-toggle {
    font-size: var(--font-size-large);
    transition: transform var(--transition-fast);
    color: var(--secondary-color);
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem;
    border-radius: 8px;
}

    .language-toggle:hover {
        transform: scale(1.2);
        color: var(--primary-color);
        background-color: rgba(255, 255, 255, 0.1);
    }*/
/* Container */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
    margin: auto;
}

/* Container */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    margin: auto;
}

/* Dropdown button */
.language-dropdown-custom .btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #29186d;
    border-radius: 8px;
    background-color: #fff; /* Default button background */
    color: #29186d; /* Text color */
    font-weight: 500;
    padding: 6px 12px;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

    /* Hover / focus for button */
    .language-dropdown-custom .btn:hover,
    .language-dropdown-custom .btn:focus {
        background-color: #29186d;
        color: #fff;
        border-color: #29186d;
        box-shadow: 0 0 6px rgba(41, 24, 109, 0.3);
    }

    /* Translate icon inside button */
    .language-dropdown-custom .btn i {
        font-size: 1.2rem;
    }

/* Dropdown menu */
.language-dropdown-custom .dropdown-menu {
    border-radius: 8px;
    border: 2px solid #29186d;
    padding: 0;
    min-width: 100%;
}

/* Dropdown items */
.language-dropdown-custom .dropdown-item {
    background-color: #fff;
    color: #29186d;
    font-weight: 500;
    padding: 8px 12px;
    transition: all 0.3s ease-in-out;
}

    /* Hover effect on items */
    .language-dropdown-custom .dropdown-item:hover {
        background-color: #29186d;
        color: #fff;
    }

/* Responsive */
@media (max-width: 576px) {
    .language-switcher {
        flex-direction: column;
        gap: 5px;
        max-width: 100%;
    }

    .language-dropdown-custom .btn {
        width: 100%;
    }

    .language-dropdown-custom .dropdown-menu {
        width: 100%;
    }
}



/* =============================================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ============================================================================= */
.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 2px solid var(--primary-color);
    color: var(--secondary-color);
    background-color: transparent;
    transition: all var(--transition-normal);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-base);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-small);
    text-decoration: none;
    width: 100%;
    box-shadow: var(--shadow-light);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

    .link-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .link-button:hover::before {
        left: 100%;
    }

    .link-button i {
        font-size: 1.1rem;
        transition: transform var(--transition-normal), color var(--transition-normal);
        color: inherit;
        flex-shrink: 0;
    }

    .link-button:hover {
        background-color: var(--primary-color);
        color: #fff;
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
        border-color: var(--primary-color);
    }

        .link-button:hover i {
            color: #fff !important;
            transform: translateX(4px);
        }

    .link-button:active {
        transform: translateY(0);
        box-shadow: var(--shadow-light);
    }

/* =============================================================================
   ICON LINKS & SOCIAL MEDIA
   ============================================================================= */
.icon-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    font-size: var(--font-size-large);
    color: var(--secondary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

    .icon-link::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background-color: var(--primary-color);
        border-radius: 50%;
        transition: all var(--transition-normal);
        transform: translate(-50%, -50%);
        z-index: -1;
    }

    .icon-link:hover::before {
        width: 100%;
        height: 100%;
    }

    .icon-link:hover {
        transform: scale(1.1);
        color: #fff;
        border-color: var(--primary-color);
    }

/*.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

    .social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid color-mix(in srgb, var(--primary-color), transparent 50%);
        font-size: 18px;
        color: color-mix(in srgb, var(--primary-color), transparent 20%);
        transition: var(--transition-normal);
        position: relative;
        overflow: hidden;
    }

        .social-links a::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background-color: var(--accent-color);
            border-radius: 50%;
            transition: all var(--transition-normal);
            transform: translate(-50%, -50%);
            z-index: -1;
        }

        .social-links a:hover::before {
            width: 100%;
            height: 100%;
        }

        .social-links a:hover {
            color: #fff;
            border-color: var(--accent-color);
            transform: translateY(-2px);
        }*/


/* =============================================================================
   MODAL COMPONENTS
   ============================================================================= */
.modal-content {
    background-color: #fefefe;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-small);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

    .modal-footer .btn-secondary {
        background-color: var(--secondary-color);
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: var(--font-weight-bold);
        transition: var(--transition-normal);
    }

        .modal-footer .btn-secondary:hover {
            background-color: #b01c14;
            transform: translateY(-1px);
        }

/* =============================================================================
   DROPDOWN COMPONENTS
   ============================================================================= */
.dropdown-menu {
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    font-weight: 500;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: background-color var(--transition-fast);
    color: var(--primary-color);
}

    .dropdown-item:hover {
        background-color: var(--hover-bg);
        color: #fff;
    }

    .dropdown-item:active {
        background-color: var(--primary-color);
        color: #fff;
    }

/* Highlight the selected dropdown item */
/*input[type="radio"]:checked + label.dropdown-item {
    background-color: #29186d !important;
    color: white !important;
}*/

/* Optional: Change hover color */
label.dropdown-item:hover {
    background-color: #29186d;
    color: white;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

    a:hover {
        color: color-mix(in srgb, var(--accent-color), transparent 25%);
    }

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.gap-3 {
    gap: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* =============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================= */

/* Extra Large Screens (1400px and up) */
@media (min-width: 1400px) {
    .link-card {
        max-width: 600px;
        padding: 3rem;
    }

    

    .link-button {
        font-size: 1.1rem;
        padding: 1.25rem 2rem;
    }
}

/* Large Screens (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .link-card {
        max-width: 550px;
        padding: 2.5rem;
    }

   
}

/* Medium Screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .link-card {
        max-width: 500px;
        padding: 2rem;
    }

    .page-background {
        padding: 2rem;
    }
}

/* Small Screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .link-card {
        max-width: 480px;
        padding: 2rem;
        margin: 1rem;
    }

   

    .link-button {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
        gap: 10px;
    }

    .icon-link {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Extra Small Screens (up to 767px) */
@media (max-width: 767px) {
    .page-background {
        padding: 1rem 0.5rem;
        min-height: 100vh;
    }

    .link-card {
        margin: 0.5rem;
        padding: 1.5rem;
        max-width: none;
        width: calc(100% - 1rem);
        border-radius: var(--border-radius-small);
    }

    

    .link-button {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
        gap: 8px;
        margin-bottom: 0.75rem;
    }

        .link-button i {
            font-size: 1rem;
        }

    .icon-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .social-links {
        gap: 0.75rem;
        margin-top: 1rem;
    }

        .social-links a {
            width: 36px;
            height: 36px;
            font-size: 14px;
        }

    .language-toggle {
        font-size: 1.1rem;
        padding: 0.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* Very Small Screens (up to 480px) */
@media (max-width: 480px) {
    .page-background {
        padding: 0.5rem 0.25rem;
    }

    .link-card {
        margin: 0.25rem;
        padding: 1rem;
        width: calc(100% - 0.5rem);
        border-radius: 12px;
    }

    

    .link-button {
        font-size: 0.85rem;
        padding: 0.625rem 0.75rem;
        gap: 6px;
        flex-direction: row;
        text-align: center;
    }

        .link-button i {
            font-size: 0.9rem;
        }

    .icon-link {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .social-links {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

        .social-links a {
            width: 32px;
            height: 32px;
            font-size: 12px;
        }

    .language-toggle {
        font-size: 1rem;
    }

    h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .text-muted {
        font-size: 0.85rem;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .page-background {
        padding: 0.5rem;
        align-items: flex-start;
    }

    .link-card {
        margin: 0.5rem auto;
        padding: 1rem;
    }

    

    .link-button {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }

    .social-links {
        margin-top: 0.5rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .link-card {
        border: 0.5px solid rgba(255, 255, 255, 0.3);
    }

    .link-button,
    .icon-link {
        border-width: 1.5px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #2a2a2a;
        color: #fff;
    }

    .modal-footer {
        background-color: #1a1a1a;
    }

    .dropdown-menu {
        background: rgba(42, 42, 42, 0.95);
        color: #fff;
    }

    .dropdown-item {
        color: #fff;
    }

        .dropdown-item:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .link-button::before,
    .icon-link::before,
    .social-links a::before {
        display: none;
    }
}

/* Match primary buttons to #29186d */
.btn-primary {
    background-color: #29186d !important;
    border-color: #29186d !important;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background-color: #4630a3 !important; /* Slightly lighter for hover */
        border-color: #4630a3 !important;
    }


/* Print styles */
@media print {
    .page-background {
        background-color: white;
        padding: 0;
    }

    .link-card {
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
    }

    .link-button,
    .icon-link,
    .social-links a {
        border-color: #000;
        color: #000;
    }

    .language-toggle {
        display: none;
    }
}
