/* ─── MODAL SYSTEM ─── */
.cfo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cfo-modal-overlay.is-active {
    display: flex;
    opacity: 1;
}

.cfo-modal-box {
    background: #050505;
    background-image: radial-gradient(circle at 50% 0%, rgba(207, 170, 67, 0.15) 0%, transparent 70%);
    border: 1px solid rgba(207, 170, 67, 0.3);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 40px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(207, 170, 67, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    color: #fff;
    box-sizing: border-box;
}

.cfo-modal-box *, .cfo-modal-box *::before, .cfo-modal-box *::after {
    box-sizing: border-box;
}

.cfo-modal-overlay.is-active .cfo-modal-box {
    transform: translateY(0);
}

.cfo-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    z-index: 10;
}

.cfo-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--gold);
}

.cfo-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.cfo-modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.cfo-modal-header p {
    color: #7a7a88;
    font-size: 0.9rem;
}

/* ─── SPLIT LAYOUT ─── */
.cfo-modal-split {
    display: flex;
    gap: 0;
    max-width: 960px !important;
    padding: 0 !important;
    overflow: hidden;
}

.cfo-modal-highlights {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    padding: 40px;
    border-right: 1px solid rgba(207, 170, 67, 0.1);
}

.cfo-modal-form-side {
    flex: 1.2;
    padding: 40px;
}

.highlights-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 25px;
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.85rem;
    color: #f0f0f0;
    margin-bottom: 15px;
    line-height: 1.4;
}

.highlights-list li span.check {
    color: #4CAF50;
    font-weight: 700;
}

.highlights-note {
    font-size: 0.7rem;
    color: #7a7a88;
    line-height: 1.6;
    padding: 15px;
    background: rgba(184, 148, 63, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(184, 148, 63, 0.1);
}

/* Form Styling */
.cfo-form-group {
    margin-bottom: 20px;
}

.cfo-form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 8px;
    font-weight: 700;
}

.cfo-form-input {
    width: 100%;
    height: 46px; /* Explicit height to prevent overlap */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 16px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: block;
}

select.cfo-form-input {
    padding: 0 35px 0 16px;
}

.cfo-form-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(207, 170, 67, 0.15);
}

.cfo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cfo-submit-btn {
    width: 100%;
    background: var(--gold);
    color: #000;
    border: none;
    height: 50px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfo-submit-btn:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 148, 63, 0.4);
}

.cfo-modal-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.85rem;
    color: #7a7a88;
}

.cfo-modal-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.cfo-modal-footer a:hover {
    text-decoration: underline;
}

/* Specific Adjustments */
.cfo-role-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23CFAA43' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.cfo-form-input option {
    background-color: #111 !important;
    color: #fff !important;
}

@media (max-width: 768px) {
    .cfo-modal-split {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }
    .cfo-modal-highlights {
        display: none; /* Hide highlights on mobile to save space */
    }
}

/* ─── SEARCH OVERLAY ─── */
.nav-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.2s;
    margin-right: 15px;
}

.nav-search-btn:hover {
    color: var(--gold);
}

.cfo-modal-overlay.search-overlay {
    align-items: flex-start; /* y = top */
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
}

.search-modal-box {
    width: 100% !important;
    max-width: none !important;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(30px);
    border: none;
    border-bottom: 1px solid rgba(207, 170, 67, 0.3);
    border-radius: 0; /* Full width edge to edge */
    padding: 80px 4rem !important;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    justify-content: center;
}

.cfo-modal-overlay.search-overlay.is-active .search-modal-box {
    transform: translateY(0);
}

.search-container {
    max-width: 1000px;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(207, 170, 67, 0.3);
    transition: border-color 0.3s;
}

.search-input-wrapper:focus-within {
    border-color: var(--gold);
}

.cfo-search-field {
    width: 100%;
    background: transparent;
    border: none;
    padding: 15px 0;
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: #fff;
    outline: none;
}

.cfo-search-field::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.cfo-search-submit {
    background: transparent;
    border: none;
    color: var(--gold);
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.cfo-search-submit:hover {
    transform: scale(1.1);
}

.search-hints {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-hints span {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-hints a {
    font-size: 0.9rem;
    color: #999;
    text-decoration: none;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: all 0.2s;
}

.search-hints a:hover {
    color: var(--gold);
    background: rgba(184, 148, 63, 0.1);
}

@media (max-width: 768px) {
    .cfo-search-field {
        font-size: 1.4rem;
    }
    .search-modal-box {
        padding: 60px 1.5rem !important;
        margin: 0;
    }
    .search-hints {
        gap: 8px;
    }
    .search-hints a {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
}
