/* UGEM Portal Premium CSS - Breathtaking Responsive Design System */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
    --primary-color: #5c2c0e; /* Deeper majestic brown */
    --primary-light: #9a3412; /* Rich brick/orange-brown */
    --accent-color: #ea580c; /* Vibrant orange */
    --accent-hover: #d97706; /* Warm gold-orange */
    --accent-light: #fef3c7; /* Soft gold accent */
    --bg-color: #ffffff; /* Majestic pure white background */
    --card-bg: #ffffff;
    --text-color: #2c1a11; /* Warm dark text */
    --text-muted: #7c5d4d; /* Muted brown */
    --border-color: #f3e8ff; /* Soft violet/gold neutral border */
    --border-gold: #fde047;
    --success-color: #059669;
    --danger-color: #dc2626;
    --cairo-font: 'Cairo', sans-serif;
    --amiri-font: 'Amiri', serif;
    --shadow-sm: 0 4px 6px -1px rgba(92, 44, 14, 0.05);
    --shadow-md: 0 10px 20px -3px rgba(92, 44, 14, 0.08);
    --shadow-lg: 0 20px 30px -5px rgba(92, 44, 14, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

body {
    font-family: var(--cairo-font);
    background: #ffffff;
    color: var(--text-color);
    line-height: 1.65;
    direction: rtl;
    text-align: right;
    padding-bottom: 80px; /* Space for bottom nav on mobile */
    min-height: 100vh;
}

/* Entry Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

/* Animation utility delays */
.animate-fadeIn {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Typography styling using Amiri for titles */
h1, h2, h3, .union-title {
    font-family: var(--amiri-font);
    font-weight: 700;
    color: var(--primary-color);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Header styling with Floating animation */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #ffffff;
    padding: 30px 16px;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 10%, transparent 80%);
    pointer-events: none;
}

header img.logo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 4px solid var(--accent-light);
    margin-bottom: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    animation: float 4s ease-in-out infinite;
}

header h1 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 13px;
    opacity: 0.9;
    letter-spacing: 0.5px;
    font-weight: 300;
}

/* Container */
.container {
    padding: 20px 16px;
    max-width: 800px; /* Enhanced wide majestic desktop display */
    margin: 0 auto;
}

/* Premium Card Design with Glassmorphism overlay */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid rgba(124, 93, 77, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(234, 88, 12, 0.3);
}

.card-title {
    font-size: 19px;
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.card-title i {
    color: var(--accent-color);
}

/* Service Button Grids */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr); /* Elegant 4 column horizontal grid on desktop */
    }
}

.service-btn {
    background-color: var(--card-bg);
    border: 1.5px solid rgba(124, 93, 77, 0.08);
    border-radius: 18px;
    padding: 18px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-btn i {
    font-size: 28px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.service-btn:hover {
    background-color: #fffdf6;
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-btn:hover i {
    transform: scale(1.15);
}

/* Inputs and Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid rgba(124, 93, 77, 0.15);
    border-radius: 12px;
    font-family: var(--cairo-font);
    font-size: 13px;
    background-color: #ffffff;
    color: var(--text-color);
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 14px;
    font-family: var(--cairo-font);
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(92, 44, 14, 0.25);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #ffffff;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(234, 88, 12, 0.25);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-success {
    background-color: var(--success-color);
    color: #ffffff;
    animation: pulseGlow 2.5s infinite;
}
.btn-success:hover {
    background-color: #047857;
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid rgba(124, 93, 77, 0.2);
    color: var(--text-color);
}
.btn-outline:hover {
    background-color: rgba(124, 93, 77, 0.05);
    border-color: var(--primary-color);
}

/* Badge/Chips */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.badge-published {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-unpublished {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: var(--accent-light);
    color: var(--primary-color);
    border: 1px solid rgba(234, 88, 12, 0.2);
}

/* Search and Filter System */
.search-container {
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border: 1.5px solid rgba(124, 93, 77, 0.15);
    border-radius: 16px;
    font-family: var(--cairo-font);
    font-size: 14px;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

/* Filter Drawer */
.filter-panel {
    background-color: #fffdf5;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1.5px dashed var(--accent-color);
    animation: fadeInUp 0.4s ease-out;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modern Bottom Navigation (Mobile First) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(124, 93, 77, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    gap: 4px;
    transition: all 0.2s ease;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Social Media Bar ( mock icon circular bar ) */
.social-bar {
    background: linear-gradient(135deg, #ea580c, #d97706);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 16px;
    margin-top: -16px;
    margin-bottom: 24px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.25);
    position: relative;
    z-index: 10;
}

.social-circle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-circle-btn:hover {
    background-color: #ffffff;
    transform: scale(1.15) translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-circle-btn.whatsapp-btn:hover { color: #25D366; }
.social-circle-btn.youtube-btn:hover { color: #FF0000; }
.social-circle-btn.tiktok-btn:hover { color: #000000; }
.social-circle-btn.snapchat-btn:hover { color: #FFFC00; background-color: #000000; border-color: #000000; }
.social-circle-btn.facebook-btn:hover { color: #1877F2; }

/* Institutions Listing Card Accordion */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 14px;
    background-color: #fbfbf9;
    border-radius: 12px;
    border: 1px solid rgba(124, 93, 77, 0.08);
    margin-top: 10px;
    font-weight: 700;
    font-size: 12px;
}

.accordion-content {
    display: none;
    padding: 12px;
    border: 1px solid rgba(124, 93, 77, 0.08);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    background-color: #ffffff;
    animation: fadeInUp 0.3s ease-out;
}

/* Admin Dashboard Table */
.admin-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(124, 93, 77, 0.08);
    margin-top: 15px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th, .admin-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid rgba(124, 93, 77, 0.08);
}

.admin-table th {
    background-color: #f7f5f0;
    color: var(--primary-color);
    font-weight: 700;
}

.admin-table tbody tr:hover {
    background-color: #fcfbf8;
}

/* Spec list items inside editor */
.spec-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.spec-item {
    background-color: #fdfdfc;
    border: 1.5px solid rgba(124, 93, 77, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.spec-item button {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.checkbox-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-pill {
    cursor: pointer;
}

.checkbox-pill input {
    display: none;
}

.checkbox-pill span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(124, 93, 77, 0.15);
    background-color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.checkbox-pill input:checked + span {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* Alerts custom design */
.alert {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.4s ease-out;
}

.alert-success {
    background-color: #e6fdf4;
    color: #047857;
    border: 1px solid #10b981;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #ef4444;
}

/* Hide on desktop wrapper */
@media (min-width: 1024px) {
    body {
        padding-bottom: 20px; /* Remove mobile nav space on wide layouts */
    }
    .bottom-nav {
        display: none; /* Hide mobile menu bottom on large displays */
    }
}

/* Premium Admin Dashboard Layout & Navigation Panel */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color), #3f1e0a);
    color: #ffffff;
    padding: 24px 20px;
    text-align: center;
    border-bottom: 4px solid var(--accent-color);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.admin-header h1 {
    color: #ffffff;
    font-family: var(--amiri-font);
    font-size: 24px;
    margin-bottom: 6px;
}

.admin-header p {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.admin-header p a {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-weight: 700;
    transition: all 0.2s ease;
}

.admin-header p a:hover {
    background: rgba(239, 68, 68, 0.45);
    color: #ffffff;
}

.admin-nav-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 8px 12px 8px;
    margin-bottom: 24px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    border-bottom: 1.5px solid rgba(124, 93, 77, 0.1);
    justify-content: flex-start;
}

.admin-nav-tabs::-webkit-scrollbar {
    display: none; /* WebKit */
}

.admin-tab {
    white-space: nowrap;
    background: #ffffff;
    border: 1.5px solid rgba(124, 93, 77, 0.1);
    color: var(--text-color);
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-tab:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-tab.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

/* Breathtaking Glassmorphism WhatsApp Modal overlay & animations */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 26, 17, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(92, 44, 14, 0.25);
    border: 1.5px solid rgba(124, 93, 77, 0.1);
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    direction: rtl;
    text-align: right;
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}

.modal-header-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    margin-top: 4px;
}

.modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.modal-list::-webkit-scrollbar {
    width: 5px;
}
.modal-list::-webkit-scrollbar-thumb {
    background: rgba(124, 93, 77, 0.2);
    border-radius: 99px;
}

.modal-item {
    background: #fdfdfd;
    border: 1.5px solid rgba(124, 93, 77, 0.08);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.modal-item:hover {
    border-color: rgba(37, 211, 102, 0.3);
    background: #f6fdf8;
    transform: translateY(-2px);
}

.modal-item-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
}

.btn-whatsapp-join {
    background-color: #25D366;
    color: #ffffff;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
    transition: all 0.2s ease;
}

.btn-whatsapp-join:hover {
    background-color: #128C7E;
    color: #ffffff;
    transform: scale(1.05);
}


