/* ====== COMPACT MODERN STYLES ====== */

/* === CSS Variables for Compact Design === */
:root {
    /* Darker Red/Purple Color Palette */
    --primary: #C2183D;
    /* Darker Red (was #E53049) */
    --primary-light: #E53049;
    /* Original as light variant */
    --primary-dark: #A11532;
    /* Even darker red */
    --accent: #7A0F54;
    /* Darker Purple (was #941167) */
    --accent-light: #941167;
    /* Original as light variant */
    --secondary: #E85D04;
    /* Darker orange accent */
    --success: #2E7D32;
    /* Darker green */
    --warning: #F9A825;
    /* Darker yellow */
    --danger: #C62828;
    /* Darker red */
    --dark: #121212;
    /* Very dark gray */
    --light: #f5f5f5;
    /* Slightly darker light gray */
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;

    /* Compact Spacing */
    --spacing-xs: 0.375rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 1.75rem;
    --spacing-xl: 2.5rem;

    /* Compact Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Light Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Fast Transitions */
    --transition-fast: 120ms ease;
    --transition-normal: 250ms ease;
}

/* === Base Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    /* Smaller base font */
}

body {
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background: #f9fafb;
    min-height: 100vh;
    direction: rtl;
}

/* === App Container === */
/* .app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
} */

/* === COMPACT HEADER === */
/* .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: var(--spacing-md);
    position: relative;
    min-height: 60px;
    border-bottom: 1px solid var(--gray-200);
} */

/* Logo on LEFT (western left) in RTL */
/* .logo-wrapper {
    flex-shrink: 0;
    z-index: 10;
    order: 3;
} */

/* .logo {
    height: 45px;
    width: auto;
    max-height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
    transition: all 0.25s ease;
} */

/* .logo:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
} */

/* Centered Navigation - WIDE but SHORT */
/* .nav-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 4px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    min-width: 360px;
    max-width: 460px;
    width: auto;
    z-index: 5;
    height: 44px;
} */

/* .nav-center::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1.5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
} */

/* Compact Navigation Buttons */
/* .nav-button {
    flex: 1;
    padding: 6px 18px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    border-radius: 6px;
    z-index: 1;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
}

.nav-button:hover {
    color: var(--primary);
    background: var(--gray-100);
    transform: translateY(-1px);
}

.nav-button.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.nav-button i {
    font-size: 11px;
} */

/* Header Spacer for Balance */
/* .header-spacer {
    flex-shrink: 0;
    width: 100px;
} */

/* === Content Area === */
/* .content-area {
    flex: 1;
    margin-bottom: var(--spacing-lg);
    height: 70vh;
} */



/* === App Container === */
.app-container {
    /* max-width: 1400px; */
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === ENHANCED HEADER CONTAINER === */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: var(--spacing-lg);
    position: relative;
    min-height: 80px;
}

/* Remove border for cleaner look */
.header-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--gray-300) 15%,
            var(--gray-300) 85%,
            transparent 100%);
}

/* Logo on LEFT (western left) in RTL */
.logo-wrapper {
    flex-shrink: 0;
    z-index: 10;
    order: 3;
}

.logo {
    height: 55px;
    width: auto;
    max-height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/* === MODERN BUSINESS-4 STYLE NAVIGATION === */
.nav-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    background: white;
    border-radius: 50px;
    /* More rounded for modern look */
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 400px;
    max-width: 500px;
    width: auto;
    z-index: 20;
    height: 52px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(10px);
    /* Modern glass effect */
    background: rgba(255, 255, 255, 0.95);
    /* Semi-transparent white */
}

/* Remove the top accent line for cleaner look */
.nav-center::before {
    display: none;
}


/* === MODERN NAVIGATION BUTTONS (Business-4 Style) === */
.nav-button {
    flex: 1;
    padding: 0 28px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 50px;
    z-index: 1;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    letter-spacing: 0.2px;
    text-transform: none;
}

/* Hover effect - subtle background with theme color text */
.nav-button:hover:not(.active) {
    color: var(--primary);
    background: rgba(194, 24, 61, 0.03);
    /* Very light primary color tint */
    transform: none;
    /* Remove lift for flatter design */
}

/* Active state - minimalist underline style */
.nav-button.active {
    color: var(--primary);
    background: transparent;
    box-shadow: none;
    font-weight: 700;
    position: relative;
    overflow: visible;
}

/* Modern underline indicator for active tab */
.nav-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    animation: underlineSlide 0.4s ease-out;
}

@keyframes underlineSlide {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 30px;
        opacity: 1;
    }
}

/* Active state with optional subtle glow */
.nav-button.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg,
            rgba(194, 24, 61, 0.05) 0%,
            rgba(122, 15, 84, 0.05) 100%);
    border-radius: 50px;
    z-index: -1;
    animation: fadeInBackground 0.3s ease-out;
}

@keyframes fadeInBackground {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Button text enhancement */
.nav-button span {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}


/* === ENHANCED CONTENT AREA === */
.content-area {
    flex: 1;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

/* Modern fade-in animation */
.fade-in {
    animation: modernFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes modernFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
    .nav-center {
        min-width: 360px;
        max-width: 420px;
        height: 48px;
    }

    .nav-button {
        padding: 0 22px;
        height: 40px;
        font-size: 13.5px;
    }

    .logo {
        height: 50px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 0 var(--spacing-md);
    }

    .header-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: 12px 0;
        min-height: auto;
        margin-bottom: var(--spacing-md);
    }

    .header-container::after {
        display: none;
    }

    .logo-wrapper {
        order: 1;
        text-align: center;
        width: 100%;
        margin-bottom: 12px;
    }

    .nav-center {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        order: 2;
        height: auto;
        margin: var(--spacing-sm) 0;
        border-radius: 40px;
        padding: 3px;
    }

    .nav-button {
        padding: 0 20px;
        height: 42px;
        font-size: 13px;
    }

    .nav-button.active::after {
        width: 25px;
        height: 2.5px;
    }

    .logo {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .nav-center {
        min-width: 100%;
        padding: 2px;
        height: 46px;
    }

    .nav-button {
        padding: 0 16px;
        height: 40px;
        font-size: 12.5px;
        letter-spacing: 0;
    }

    .nav-button i {
        font-size: 11px;
    }

    .nav-button.active::after {
        width: 20px;
        height: 2px;
    }

    .logo {
        height: 40px;
    }
}

/* === ADDITIONAL MODERN EFFECTS === */

/* Subtle pulse animation for active state */
@keyframes subtlePulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    }

    50% {
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.09);
    }
}

.nav-center.pulse {
    animation: subtlePulse 3s ease-in-out infinite;
}

/* Smooth transition for theme changes */
.nav-center,
.nav-button,
.logo {
    transition-property: all;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* === UTILITY CLASSES === */
.shadow-lift {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.shadow-lift:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Modern focus styles for accessibility */
.nav-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 50px;
}





/* === COMPACT STABLE FOOTER === */
.stable-footer {
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}


/* Credits Footer */
.credits {
    text-align: center;
    padding: 12px;
    color: var(--gray-500);
    font-size: 11.5px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    margin-top: var(--spacing-md);
}

/* === Spinner === */
/* .spinner-border {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
    margin-right: 6px;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
} */

/* === Responsive Design === */
@media (max-width: 992px) {
    .results-layout {
        flex-direction: column;
        height: auto;
    }

    .results-list {
        flex: none;
        height: 280px;
    }

    .search-container,
    .login-container {
        height: auto;
        min-height: 75vh;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: 10px 0;
        min-height: auto;
        border-bottom: none;
    }

    .logo-wrapper {
        order: 1;
        text-align: center;
        width: 100%;
    }

    .nav-center {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        order: 2;
        height: auto;
    }

    .header-spacer {
        display: none;
    }

    .logo {
        height: 40px;
    }

    .search-box,
    .participant-info-grid {
        grid-template-columns: 1fr;
    }

    .links-container,
    .sponsors-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .ad-item {
        width: 240px;
        height: 90px;
    }

    .nav-button {
        padding: 6px 14px;
        font-size: 12.5px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .nav-center,
    .login-tabs {
        flex-direction: column;
        height: auto;
    }

    .nav-button,
    .login-tab {
        width: 100%;
        height: 34px;
        margin: 2px 0;
    }

    .logo {
        height: 36px;
    }

    .links-container,
    .sponsors-container {
        grid-template-columns: 1fr;
    }

    .ad-item {
        width: 220px;
        height: 80px;
    }
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* === Utility Classes === */
.mt-3 {
    margin-top: var(--spacing-sm);
}

.mt-4 {
    margin-top: var(--spacing-md);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.p-3 {
    padding: var(--spacing-sm);
}

.p-4 {
    padding: var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: left;
}

.fw-bold {
    font-weight: 600;
}

.small {
    font-size: 12px;
}

.text-muted {
    color: var(--gray-500);
}

.text-primary {
    color: var(--primary);
}

.border {
    border: 1px solid var(--gray-200);
}

.border-start {
    border-left: 1px solid var(--gray-200);
}

.rounded {
    border-radius: var(--radius-sm);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.bg-light {
    background: var(--gray-100);
}

.bg-primary {
    background: var(--primary);
}

.text-white {
    color: white;
}

.w-100 {
    width: 100%;
}

.me-2 {
    margin-left: var(--spacing-xs);
}

/* RTL adjustment */