:root {
    /* Corporate Palette */
    --gold: #BB8E45;
    --gold-light: #d4a75b;
    --gold-dark: #967032;
    --charcoal: #2C2C2C;
    --charcoal-light: #3D3D3D;
    --charcoal-dark: #1A1A1A;
    --stone: #E5E5E5;
    --silver: #F4F4F4;

    /* Functional Colors */
    --bg: #FAFAFA;
    --card-bg: #FFFFFF;
    --text-main: #2C2C2C;
    --text-muted: #666666;
    --border-color: #E0E0E0;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --backdrop-blur: blur(10px);

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 12px;
}

body.dark-mode {
    --bg: #121212;
    --card-bg: #1E1E1E;
    --text-main: #F4F4F4;
    --text-muted: #A0A0A0;
    --border-color: #333333;
    --charcoal: #E0E0E0;
    --glass-bg: rgba(30, 30, 30, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* RTL Support & Globalization */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .navbar .container,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .nav-links a,
html[dir="rtl"] .footer-content,
html[dir="rtl"] .hero-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-links {
    gap: 1.5rem;
}

/* No manual margins needed as flex-direction: row-reverse + space-between handles it */
html[dir="rtl"] .logo,
html[dir="rtl"] .nav-toggle {
    margin: 0;
}

html[dir="rtl"] .text-center {
    text-align: center;
}

/* Language Dropdown */
.nav-item.dropdown {
    position: relative;
}

.nav-item.dropdown:hover .lang-dropdown {
    display: block !important;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    z-index: 9999;
    min-width: 120px;
    padding: 0.5rem 0;
    border: var(--border-color);
}

.lang-dropdown a {
    display: block;
    padding: 0.6rem 1rem !important;
    color: var(--text-main) !important;
    text-decoration: none;
    font-size: 0.9rem !important;
    flex-direction: row !important;
    /* Keep text direction LTR for names if needed, or RTL */
}

html[dir="rtl"] .lang-dropdown a {
    text-align: right;
}

.lang-dropdown a:hover {
    background: var(--silver);
    color: var(--gold) !important;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* Typography & Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

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

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

.mb-4 {
    margin-bottom: 2rem;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(187, 142, 69, 0.3);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 142, 69, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--charcoal-light) 0%, var(--charcoal-dark) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--gold);
    color: white;
}

.btn-outline:hover i {
    color: white;
}

/* Glassmorphism Navbar */
.navbar {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--backdrop-blur);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-links i {
    font-size: 1.1rem;
}

/* Specific override for Get Verified button in navbar */
.nav-links .btn:hover {
    color: white !important;
}

body.dark-mode .nav-links .btn:hover {
    color: black !important;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 85vh;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    background: var(--charcoal-dark);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 8s ease;
    /* Subtle zoom effect */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1.05);
    /* Slow zoom */
}

/* Gradient Overlay for better text readability */
.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    color: white;
    z-index: 2;
    position: relative;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: white !important;
}

.hero-content p {
    font-size: 1.35rem;
    margin-bottom: 3rem;
    font-weight: 300;
    opacity: 0.9;
    color: white !important;
}

/* Interactive Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 4rem 0;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-light);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleY(1);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card i {
    color: var(--gold);
    font-size: 1.8rem;
}

/* Inputs & Forms */
.form-control {
    width: 100%;
    height: 3.5rem;
    /* Explicit height for symmetry */
    padding: 0 1rem;
    /* Adjust padding for fixed height */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
    line-height: normal;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(187, 142, 69, 0.1);
}

/* Custom Dropdown Styling */
/* Custom Dropdown Styling (Single Select Only) */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

body.dark-mode select.form-control:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%23A0A0A0' d='M12 16l-6-6h12z'/%3E%3C/svg%3E");
}

/* Footer */
/* Footer */
.main-footer {
    background: var(--charcoal);
    color: var(--stone);
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .main-footer {
    color: black;
}

/* Slider Controls */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: all 0.3s;
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.1) translateY(-50%);
}

.slider-prev {
    left: 40px;
}

.slider-next {
    right: 40px;
}

/* RTL Slider Arrow Fixes */
html[dir="rtl"] .slider-prev {
    left: auto !important;
    right: 40px !important;
    transform: translateY(-50%) rotate(180deg) !important;
}

html[dir="rtl"] .slider-next {
    right: auto !important;
    left: 40px !important;
    transform: translateY(-50%) rotate(180deg) !important;
}

html[dir="rtl"] .slider-prev:hover,
html[dir="rtl"] .slider-next:hover {
    transform: scale(1.1) translateY(-50%) rotate(180deg) !important;
}

.slider-dots {
    bottom: 40px;
}

.dot {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.dot.active {
    background: var(--gold);
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--card-bg);
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }

    html[dir="rtl"] .nav-links {
        left: auto;
        right: 0;
        flex-direction: column;
        /* Keep vertical stacking */
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    html[dir="rtl"] .nav-links a {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }
}

/* File Upload Preview */
.file-preview-box {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border: 1px solid var(--gold);
    border-radius: var(--border-radius);
    background: rgba(187, 142, 69, 0.05);
    height: 3.5rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.file-preview-box span {
    font-weight: 500;
    color: var(--gold);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    margin-right: 0.8rem;
}

.file-preview-box button {
    background: none;
    border: none;
    color: #dc3545;
    /* Bootstrap danger red */
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    padding: 0;
    flex-shrink: 0;
}

/* Custom override for filter card to prevent overlap on hover */
.filter-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
    border-color: var(--border-color) !important;
}

/* List View Layout */
.card-grid.list-view {
    grid-template-columns: 1fr !important;
}

.card-grid.list-view .profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
}

.card-grid.list-view .profile-card .profile-info {
    flex: 1;
}

.card-grid.list-view .profile-card .profile-actions {
    flex: 0 0 200px;
}

.card-grid.list-view .profile-card .badge {
    float: none !important;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Responsive adjustment for list view on mobile */
@media (max-width: 768px) {
    .card-grid.list-view .profile-card {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .card-grid.list-view .profile-card .profile-actions {
        width: 100%;
        margin-top: 1rem;
        flex: auto;
    }
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--gold);
    text-decoration: none;
    cursor: pointer;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Toggle Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #198754;
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Directory Layout */
.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

.filter-card {
    position: sticky;
    top: 100px;
    /* Sticky sidebar */
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .directory-layout {
        grid-template-columns: 1fr;
    }

    .filter-card {
        position: static;
        margin-bottom: 2rem;
    }
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Sponsors Marquee */
.sponsors-section {
    padding: 3rem 0;
    background: var(--bg);
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-track {
    display: inline-flex;
    gap: 4rem;
    animation: marquee 40s linear infinite;
    padding-left: 4rem;
    /* Gap buffer */
}

.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.sponsor-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    vertical-align: middle;
}

.sponsor-logo-img {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.sponsor-item:hover .sponsor-logo-img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.sponsor-tier-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--stone);
    color: var(--text-muted);
    font-weight: 600;
}

/* Tier Colors */
.tier-platinum .sponsor-tier-badge {
    background: #e5e4e2;
    color: #444;
    border: 1px solid #d1d0ce;
}

.tier-gold .sponsor-tier-badge {
    background: #fffcf2;
    color: #b4860b;
    border: 1px solid #e6c200;
}

.tier-silver .sponsor-tier-badge {
    background: #f8f9fa;
    color: #7f8c8d;
    border: 1px solid #bdc3c7;
}

.tier-bronze .sponsor-tier-badge {
    background: #fffbf7;
    color: #a0522d;
    border: 1px solid #d2b48c;
}