/* ==========================================================================
   Apply Project Page Styles - Complete File
   ========================================================================== */

/* Base Page Layout */
html, body {
    min-height: 100vh;
    background-color: #0b0f19;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}
/* 1. Prevent Safari white gaps by matching background color */
html, body {
    background-color: #0b0c10 !important; /* Replace with your dark background color hex */
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Safari mobile viewport height fix */
}

/* 2. Extend dark background into mobile Safari header & bottom notches */
:root {
    color-scheme: dark; /* Signals Safari to render native UI bars in dark mode */
}
main.hero-container {
    min-height: 100vh;
    height: auto;
    background: radial-gradient(circle at center, #111827 0%, #0b0f19 100%) !important;
    padding-top: 130px; 
    padding-bottom: 3rem;
}

/* Glassmorphism Card Styling (Desktop Base) */
.apply-card {
    background: linear-gradient(135deg, rgba(13, 29, 133, 0.85), rgba(15, 23, 42, 0.95)) !important;
    border: 2px solid #a9993f !important;
    border-radius: 20px !important;
    padding: 2.5rem !important;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5), 0px 0px 15px rgba(169, 153, 63, 0.2) !important;
    backdrop-filter: blur(10px);
}

.apply-title {
    color: #a9993f;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.apply-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Form Labels */
.custom-label {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.custom-label i {
    color: #a9993f;
    font-size: 1.1rem;
}

/* Custom Radio Group Styling */
.radio-group-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.8);
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(169, 153, 63, 0.5);
    border-radius: 10px;
}

.custom-radio .form-check-input {
    background-color: rgba(15, 23, 42, 0.9);
    border: 1.5px solid rgba(169, 153, 63, 0.6);
    cursor: pointer;
}

.custom-radio .form-check-input:checked {
    background-color: #a9993f;
    border-color: #a9993f;
    box-shadow: 0 0 8px rgba(169, 153, 63, 0.5);
}

.custom-radio .form-check-label {
    color: #ffffff;
    cursor: pointer;
    font-weight: 500;
}

/* Form Inputs & Base Select Elements */
.custom-field,
.form-control.custom-field,
.form-select.custom-field {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1.5px solid rgba(169, 153, 63, 0.5) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    appearance: none;
}

.custom-field:focus {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: #a9993f !important;
    box-shadow: 0 0 12px rgba(169, 153, 63, 0.4) !important;
    outline: none !important;
}

.custom-field::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

select.custom-field {
    cursor: pointer;
}

select.custom-field option {
    background-color: #0f172a;
    color: #ffffff;
}

/* Submit Button Styling */
.apply-btn {
    background: linear-gradient(110deg, #0d1d85, #4274D9, #0d1d85);
    background-size: 200% auto;
    color: #ffffff;
    border: 2px solid #a9993f;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.apply-btn:hover {
    background-position: right center;
    box-shadow: 0 0 15px rgba(169, 153, 63, 0.6);
    transform: translateY(-2px);
    color: #a9993f;
}

.apply-btn i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.apply-btn:hover i {
    transform: translateX(5px);
}

/* Base Fixed Navbar Container */
.NavBartwo {
    position: fixed !important;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    z-index: 1050 !important;
}


/* ==========================================================================
   MOBILE-ONLY OVERRIDES (MAX-WIDTH: 768px)
   ========================================================================== */
/* ==========================================================================
   EXACT CENTER NAVBAR POSITIONING
   ========================================================================== */
@media (max-width: 768px) {

    /* Outer Fixed Container Centering */
    html body .NavBartwo {
        position: fixed !important;
        top: 12px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 420px !important;
        margin: 0 auto !important;
        padding: 6px 14px !important;
        border-radius: 20px !important;
        box-sizing: border-box !important;
        z-index: 9999 !important;
    }

    /* Inner Flex Spacing */
    html body .NavBartwo .container-fluid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Pinned Brand Container (RTL & LTR Safe) */
    html body .navbar-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: 1 1 auto !important;           /* Allows container to occupy available space */
        min-width: 0 !important;             /* CRITICAL for text truncation in flexbox */
    }

    /* Profile Avatar Image */
    html body .navbar-brand img,
    html body .navbar-brand .profile-thumb,
    html body .NavBartwo a:first-child img {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        flex-shrink: 0 !important;
    }

    /* Typography & Arabic/English Text Truncation */
    html body .Nav-Text,
    html body .navbar-brand span,
    html body .navbar-brand {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #a9993f !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1 !important;
    }

    /* Hamburger Toggler Button (RTL-Proofed) */
    html body .navbar-toggler {
        margin: 0 !important;
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
}