/* ============================================================
   study-abroad.css — Trip Designer Study Abroad Listing Page
   ============================================================ */

/* Hero — shared B2C pattern */
.sa-hero {
    position: relative;
    background: url('../../images/hero-beach.jpg') center/cover no-repeat, #0e1f5c;
    padding: 36px 0 56px;
    overflow: hidden;
}
.sa-hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(8,17,84,.82) 0%, rgba(30,64,175,.55) 50%, rgba(4,16,124,.82) 100%);
    z-index: 0; pointer-events: none;
}
.sa-hero::after {
    content: ''; position: absolute;
    bottom: -1px; left: 0; right: 0; height: 40px;
    background: #f4f6fb;
    clip-path: ellipse(70% 100% at 50% 100%);
    z-index: 1; pointer-events: none;
}
.sa-hero-dots {
    position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 40px 40px;
}
.sa-hero-inner { position: relative; z-index: 3; text-align: center; }
.sa-hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(251,191,36,.15); border: 1px solid rgba(251,191,36,.4);
    color: #fcd34d; font-size: 11px; font-weight: 800;
    letter-spacing: 1.4px; text-transform: uppercase;
    padding: 5px 14px; border-radius: 5px; margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(251,191,36,.18);
}
.sa-hero h1 {
    font-size: 2.1rem; font-weight: 900; color: #fff;
    line-height: 1.25; margin: 0 0 8px;
    letter-spacing: -0.3px;
    text-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.sa-hero h1 span { color: #fbbf24; }
.sa-hero-sub {
    color: rgba(255,255,255,.88); font-size: .95rem; margin-bottom: 18px;
    font-weight: 500; text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* Hero search (shared B2C pattern) */
.sa-hero-search {
    display: flex;
    background: #fff;
    border: 2px solid rgba(255,255,255,.4);
    border-radius: 5px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    position: relative;
    z-index: 10;
}
.sa-search-field { flex: 1; position: relative; min-width: 0; }
.sa-hero-search input {
    width: 100%;
    border: none; outline: none;
    background: transparent;
    padding: 11px 18px;
    font-size: .9rem;
    color: #1e293b;
}
.sa-hero-search input::placeholder { color: #94a3b8; }
.sa-hero-search button {
    padding: 0 26px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--tp, #04107C);
    border: none;
    font-size: .9rem; font-weight: 800;
    cursor: pointer;
    display: flex; align-items: center; gap: 7px;
    transition: all .2s;
}
.sa-hero-search button:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateX(2px);
}

.sa-ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px); left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 5px;
    box-shadow: 0 12px 40px rgba(0,0,0,.16);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    text-align: left;
}
.sa-ac-dropdown.open { display: block; }
.sa-ac-item {
    display: flex;
    align-items: center; gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
    text-decoration: none;
    color: #1e293b;
}
.sa-ac-item:last-child { border-bottom: none; }
.sa-ac-item:hover {
    background: #eef2ff;
    color: var(--tp, #04107C);
    text-decoration: none;
}
.sa-ac-flag {
    width: 28px; height: 20px;
    border-radius: 3px; object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.sa-ac-flag-ph {
    width: 28px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f1f5f9; border-radius: 3px;
    font-size: 14px; flex-shrink: 0;
}
.sa-ac-name { font-size: 13px; font-weight: 600; }

/* Ensure dropdown isn't clipped by hero overflow */
.sa-hero { overflow: visible !important; }
.sa-hero-inner { position: relative; z-index: 3; }

/* Body */
.sa-body { background: #f4f6fb; padding: 32px 0 60px; }
.sa-section-head { font-size: 15px; font-weight: 800; color: #1e293b; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.sa-section-head i { color: var(--tp, #04107C); }

/* Grid */
.sa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 991px) { .sa-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .sa-grid { grid-template-columns: 1fr; } }

/* Card */
.sa-card {
    background: #fff; border-radius: 5px; overflow: hidden;
    border: 1.5px solid #e8eaf0; box-shadow: 0 2px 12px rgba(0,0,0,.05);
    transition: all .2s; display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
.sa-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(4,16,124,.12); border-color: #c7d2fe; text-decoration: none; color: inherit; }
.sa-card-img { position: relative; height: 160px; overflow: hidden; background: linear-gradient(135deg,#1e3a5f,var(--tp, #04107C)); }
.sa-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.sa-card:hover .sa-card-img img { transform: scale(1.05); }
.sa-card-flag {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--tp, #04107C);
    font-size: 11px; font-weight: 800;
    padding: 5px 12px; border-radius: 5px;
    letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(251,191,36,.4);
}
.sa-card-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sa-card-ph i { font-size: 48px; color: rgba(255,255,255,.35); }
.sa-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.sa-card-title { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.sa-card-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sa-card-stat {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; color: var(--tp, #04107C);
    background: #e0e7ff; padding: 3px 9px; border-radius: 5px;
}
.sa-card-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f3fb; }
.sa-card-btn {
    display: block; width: 100%; padding: 10px; text-align: center;
    background: var(--tp, #04107C); color: #fff; font-size: 13px; font-weight: 700;
    border-radius: 5px; text-decoration: none; transition: background .2s;
}
.sa-card-btn:hover { background: #1a2fa8; color: #fff; text-decoration: none; }
