/* ============================================================
   AdmissionEU — Main Stylesheet
   Design: Academic-editorial with European refinement
   Fonts: Playfair Display (display) + DM Sans (body)
   Colors: Deep navy + warm amber accent
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    /* Primary palette */
    --navy:        #1B4F72;
    --navy-dark:   #0E2F44;
    --navy-light:  #2E86C1;
    --amber:       #F39C12;
    --amber-dark:  #D68910;
    --amber-light: #F7C948;
    --gold:        #D4A017;

    /* Neutrals */
    --white:       #FFFFFF;
    --off-white:   #F8F6F0;
    --cream:       #FAF8F2;
    --gray-100:    #F0EDE6;
    --gray-200:    #E2DFD5;
    --gray-300:    #C4C0B4;
    --gray-400:    #9B9687;
    --gray-500:    #706C61;
    --gray-600:    #4A473F;
    --gray-700:    #2D2B26;
    --black:       #1A1915;

    /* Semantic */
    --success:     #27AE60;
    --success-bg:  #EBF9F1;
    --danger:      #C0392B;
    --danger-bg:   #FCEAE8;
    --warning:     #E67E22;
    --warning-bg:  #FEF3E2;
    --info:        #2E86C1;
    --info-bg:     #E8F4FD;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container:   1200px;
    --gap:         1.5rem;
    --radius:      10px;
    --radius-sm:   6px;
    --radius-lg:   16px;
    --radius-xl:   24px;

    /* Shadows */
    --shadow-sm:   0 1px 3px rgba(27,79,114,0.06);
    --shadow-md:   0 4px 16px rgba(27,79,114,0.08);
    --shadow-lg:   0 8px 32px rgba(27,79,114,0.12);
    --shadow-xl:   0 16px 48px rgba(27,79,114,0.16);

    /* Transitions */
    --ease:        cubic-bezier(0.4, 0, 0.2, 1);
    --duration:    0.25s;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--gray-700);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--navy-dark); line-height: 1.25; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; color: var(--gray-700); }

a { color: var(--navy); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--amber-dark); }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    padding: 0.45rem 0;
    letter-spacing: 0.02em;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 1.25rem; }
.top-bar a { color: rgba(255,255,255,0.85); }
.top-bar a:hover { color: var(--amber-light); }
.top-bar i { font-size: 0.9rem; vertical-align: -1px; }

/* ── Main Header ───────────────────────────────────────────── */
.main-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration) var(--ease);
}
.main-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-icon svg { display: block; }
.logo-text { font-family: var(--font-body); font-size: 1.35rem; color: var(--navy-dark); letter-spacing: -0.02em; }
.logo-text strong { font-weight: 700; }
.logo-accent { color: var(--amber); font-weight: 700; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.nav-link:hover { color: var(--navy); background: var(--gray-100); }
.nav-link i { font-size: 1.1rem; }

/* Apply button */
.btn-apply {
    background: var(--amber) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    padding: 0.5rem 1.15rem !important;
    border-radius: 50px !important;
    margin-left: 0.5rem;
}
.btn-apply:hover { background: var(--amber-dark) !important; transform: translateY(-1px); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--duration) var(--ease);
    z-index: 100;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.dropdown-menu a:hover { background: var(--cream); color: var(--navy); }
.dropdown-menu a i { font-size: 1.15rem; color: var(--amber); }

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--gray-600);
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Flash Messages ────────────────────────────────────────── */
.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s var(--ease);
}
.flash-success { background: var(--success-bg); color: #1B7A3D; border-left: 4px solid var(--success); }
.flash-error   { background: var(--danger-bg);  color: #922B21; border-left: 4px solid var(--danger); }
.flash-warning { background: var(--warning-bg); color: #935116; border-left: 4px solid var(--warning); }
.flash-info    { background: var(--info-bg);    color: #1A5276; border-left: 4px solid var(--info); }
.flash-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: inherit; opacity: 0.6; line-height: 1; }
.flash-close:hover { opacity: 1; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-amber { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: var(--amber-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #1A6B9C 100%);
    color: var(--white);
    padding: 5rem 0 6rem;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(243,156,18,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(46,134,193,0.15) 0%, transparent 50%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--off-white), transparent);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--amber-light);
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.2rem;
    line-height: 1.15;
}
.hero h1 .highlight {
    color: var(--amber-light);
    position: relative;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 520px;
}

/* Hero Search */
.hero-search {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    display: flex;
    box-shadow: var(--shadow-xl);
    max-width: 560px;
}
.hero-search input {
    flex: 1;
    border: none;
    padding: 0.85rem 1.15rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gray-700);
    background: transparent;
    outline: none;
}
.hero-search input::placeholder { color: var(--gray-400); }
.hero-search button {
    background: var(--amber);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 0.85rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--duration) var(--ease);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.hero-search button:hover { background: var(--amber-dark); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.hero-tags a {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.08);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}
.hero-tags a:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.stat-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.15rem;
    transition: all 0.3s var(--ease);
}
.stat-card:hover { background: rgba(255,255,255,0.12); transform: translateX(6px); }
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.amber { background: rgba(243,156,18,0.2); color: var(--amber-light); }
.stat-icon.blue  { background: rgba(46,134,193,0.2); color: #85C1E9; }
.stat-icon.green { background: rgba(39,174,96,0.2); color: #82E0AA; }
.stat-icon.pink  { background: rgba(203,67,89,0.2); color: #F1948A; }
.stat-number { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 0.1rem; }

/* ── Section Styles ────────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--white); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.6rem; }
.section-header p { color: var(--gray-500); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--amber-dark);
    margin-bottom: 0.6rem;
}

/* ── Country Cards ─────────────────────────────────────────── */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
.country-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    display: block;
}
.country-card:hover {
    border-color: var(--amber);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.country-flag { font-size: 2.5rem; margin-bottom: 0.6rem; }
.country-card h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.3rem; }
.country-card .uni-count { font-size: 0.82rem; color: var(--gray-400); }
.country-card .tuition-tag {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: var(--success-bg);
    color: #1B7A3D;
}

/* ── University Cards ──────────────────────────────────────── */
.uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.uni-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    display: block;
}
.uni-card:hover { border-color: var(--navy-light); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.uni-card-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.uni-logo {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
}
.uni-card-header h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--white); line-height: 1.35; }
.uni-card-header .uni-location { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-top: 0.15rem; }
.uni-card-body { padding: 1.25rem 1.5rem; }
.uni-card-body p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 1rem; line-height: 1.55; }
.uni-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.uni-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    background: var(--gray-100);
    color: var(--gray-600);
}
.uni-meta-tag i { font-size: 0.85rem; }
.tuition-free {
    background: var(--success-bg) !important;
    color: #1B7A3D !important;
    font-weight: 600;
}

/* ── Features Section ──────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s var(--ease);
}
.feature-card:hover { border-color: var(--amber); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    margin: 0 auto 1.15rem;
}
.feature-card h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.55; }

/* ── CTA Banner ────────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1A6B9C 100%);
    border-radius: var(--radius-xl);
    padding: 3.5rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin: 0 1.25rem;
}
.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(243,156,18,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.8rem; font-size: 2rem; position: relative; z-index: 1; }
.cta-banner p { color: rgba(255,255,255,0.75); margin-bottom: 1.8rem; font-size: 1.05rem; position: relative; z-index: 1; }
.cta-banner .btn { position: relative; z-index: 1; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.4rem;
}
.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-700);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    outline: none;
}
.form-control:focus { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(46,134,193,0.1); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239B9687' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.8rem; color: var(--gray-400); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.3rem; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.35rem; margin: 2.5rem 0; flex-wrap: wrap; }
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.6rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-decoration: none;
}
.page-link:hover { border-color: var(--navy); color: var(--navy); }
.page-link.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-dots { color: var(--gray-400); padding: 0 0.3rem; }

/* ── Footer ────────────────────────────────────────────────── */
.main-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.7);
    padding-top: 0;
    position: relative;
}
.footer-wave { color: var(--navy-dark); margin-bottom: 3rem; }
.footer-wave svg { display: block; width: 100%; height: 50px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}
.footer-logo { font-family: var(--font-body); font-size: 1.35rem; color: var(--white); display: inline-block; margin-bottom: 1rem; }
.footer-logo strong { font-weight: 700; }
.footer-about { font-size: 0.88rem; line-height: 1.6; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    transition: all 0.2s;
}
.footer-social a:hover { background: var(--amber); color: var(--white); }

.footer-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.6rem;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--amber);
    border-radius: 2px;
}
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    transition: all 0.2s;
}
.footer-col ul a:hover { color: var(--amber-light); padding-left: 4px; }
.footer-contact li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.footer-contact i { color: var(--amber); font-size: 1rem; }

.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    padding: 0.5rem 1.15rem;
    background: var(--amber);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.footer-cta:hover { background: var(--amber-dark); color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(255,255,255,0.5); }
.footer-links a:hover { color: var(--amber-light); }

/* ── Utility Classes ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-amber  { color: var(--amber); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--gray-400); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.hidden { display: none !important; }

/* ── Loading Spinner ───────────────────────────────────────── */
.spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scroll Reveal Animation ───────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   PHASE 2 — Directory, Profile, Country, Programs
   ============================================================ */

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--white);
    padding: 2.5rem 0;
    text-align: center;
}
.page-header h1 { color: var(--white); font-size: 2.2rem; margin-bottom: 0.4rem; }
.page-header p { color: rgba(255,255,255,0.7); font-size: 1.05rem; }

/* ── Breadcrumbs ───────────────────────────────────────────── */
.breadcrumb-bar {
    background: var(--cream);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-400);
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .current { color: var(--gray-700); font-weight: 500; }
.breadcrumb span { color: var(--gray-300); }

/* ── Directory Layout (Sidebar + Results) ──────────────────── */
.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Filter Sidebar ────────────────────────────────────────── */
.filter-sidebar {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 85px;
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}
.filter-header h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.filter-clear {
    font-size: 0.8rem;
    color: var(--danger);
}
.filter-group { margin-bottom: 1rem; }
.filter-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}
.filter-group .form-control {
    font-size: 0.88rem;
    padding: 0.55rem 0.85rem;
}

/* ── Sort Bar ──────────────────────────────────────────────── */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1.15rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.sort-info { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.result-count { font-size: 0.9rem; font-weight: 600; color: var(--gray-700); }
.search-tag {
    font-size: 0.8rem;
    background: var(--info-bg);
    color: #1A5276;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}
.search-tag a { color: #1A5276; margin-left: 0.3rem; font-weight: 700; }
.sort-options { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--gray-500); }
.btn-filter-mobile {
    display: none;
    align-items: center;
    gap: 0.3rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    color: var(--gray-600);
}

/* ── University List Cards ─────────────────────────────────── */
.uni-list { display: flex; flex-direction: column; gap: 1rem; }
.uni-list-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s var(--ease);
}
.uni-list-card:hover {
    border-color: var(--navy-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}
.uni-list-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.uni-list-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius); }
.uni-list-initials { font-family: var(--font-body); font-size: 1.2rem; font-weight: 700; color: var(--white); }
.uni-list-info { flex: 1; min-width: 0; }
.uni-list-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.uni-list-top h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; color: var(--navy-dark); line-height: 1.3; }
.featured-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--amber);
    color: var(--white);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}
.uni-list-location {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.uni-type-badge {
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
}
.uni-list-desc { font-size: 0.88rem; color: var(--gray-500); line-height: 1.55; margin-bottom: 0.75rem; }
.uni-list-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.uni-list-arrow {
    display: flex;
    align-items: center;
    color: var(--gray-300);
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: color 0.2s;
}
.uni-list-card:hover .uni-list-arrow { color: var(--navy); }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}
.empty-state i { font-size: 3rem; color: var(--gray-300); margin-bottom: 1rem; display: block; }
.empty-state h3 { font-family: var(--font-body); margin-bottom: 0.5rem; }
.empty-state p { color: var(--gray-500); margin-bottom: 1.5rem; }

/* ── University Profile ────────────────────────────────────── */
.uni-profile-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--white);
    padding: 2.5rem 0;
}
.uni-profile-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.uni-profile-logo {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
}
.uni-profile-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-lg); }
.uni-profile-title { flex: 1; }
.uni-profile-title h1 { color: var(--white); font-size: 2rem; margin-bottom: 0.3rem; }
.uni-profile-location {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.uni-profile-location .uni-type-badge { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }
.uni-profile-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Quick Stats */
.uni-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.quick-stat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.quick-stat-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--amber-light); }
.quick-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 0.2rem; }

/* Profile Layout (Main + Sidebar) */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}
.profile-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}
.profile-card h2 {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}
.profile-card h2 i { color: var(--amber); font-size: 1.3rem; }
.profile-text { font-size: 0.95rem; line-height: 1.7; color: var(--gray-600); }
.profile-detail-row { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 0.35rem; }
.profile-detail-row strong { color: var(--gray-700); }

/* Sidebar Cards */
.sidebar-card { padding: 1.25rem; }
.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.sidebar-card h3 i { color: var(--amber); }
.sidebar-city { font-size: 0.82rem; color: var(--gray-400); margin-bottom: 0.75rem; }
.sidebar-cta { background: var(--cream); border-color: var(--gray-200); }
.sidebar-cta p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 1rem; }

/* Cost Breakdown */
.cost-breakdown { display: flex; flex-direction: column; gap: 0.4rem; }
.cost-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--gray-100);
    color: var(--gray-600);
}
.cost-row span:last-child { font-weight: 600; color: var(--gray-700); }
.cost-total { border-bottom: none; border-top: 2px solid var(--gray-200); padding-top: 0.6rem; margin-top: 0.3rem; }
.cost-total span { font-weight: 700; color: var(--navy); font-size: 0.95rem; }

/* Key Facts */
.key-facts { display: flex; flex-direction: column; gap: 0.35rem; }
.fact-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--gray-100);
}
.fact-label { color: var(--gray-400); }
.fact-row span:last-child { font-weight: 500; color: var(--gray-700); }

/* ── Programs Table ────────────────────────────────────────── */
.programs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.programs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.programs-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.programs-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
    vertical-align: top;
}
.programs-table tbody tr:hover { background: var(--cream); }
.programs-table td strong { color: var(--gray-700); display: block; margin-bottom: 0.15rem; }
.prog-field { font-size: 0.78rem; color: var(--gray-400); }
.prog-uni-link { display: block; color: var(--navy); font-weight: 500; }
.prog-uni-link span { display: block; font-size: 0.78rem; color: var(--gray-400); font-weight: 400; }
.prog-uni-link:hover { color: var(--amber-dark); }

/* Level Badges */
.level-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    white-space: nowrap;
}
.level-bachelor { background: #E8F4FD; color: #1A5276; }
.level-master   { background: #EEEDFE; color: #3C3489; }
.level-phd      { background: #EBF9F1; color: #1B7A3D; }
.level-diploma  { background: #FEF3E2; color: #935116; }

/* ── Scholarships ──────────────────────────────────────────── */
.scholarship-item {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.scholarship-item:last-child { border-bottom: none; }
.scholarship-item h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.scholarship-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}
.scholarship-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.scholarship-meta i { color: var(--amber); font-size: 0.95rem; }
.scholarship-item p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 0.6rem; }

/* ── Country Hero ──────────────────────────────────────────── */
.country-hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--white);
    padding: 2rem 0 2.5rem;
}
.country-hero-content { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.country-hero-flag { font-size: 3.5rem; }
.country-hero h1 { color: var(--white); font-size: 2.2rem; margin-bottom: 0.2rem; }
.country-hero-sub { font-size: 0.95rem; color: rgba(255,255,255,0.65); }
.country-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.cstat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.cstat-val { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--amber-light); }
.cstat-lbl { font-size: 0.75rem; color: rgba(255,255,255,0.55); margin-top: 0.15rem; }

/* ── Program Filters (Inline) ──────────────────────────────── */
.program-filters .pf-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.program-filters .form-control { flex: 1; min-width: 140px; font-size: 0.88rem; padding: 0.55rem 0.85rem; }
.program-filters .btn { white-space: nowrap; }

/* ── Responsive (Phase 2) ──────────────────────────────────── */
@media (max-width: 992px) {
    .directory-layout { grid-template-columns: 1fr; }
    .filter-sidebar {
        position: fixed;
        top: 0; left: -100%;
        width: 300px;
        height: 100vh;
        z-index: 999;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.35s var(--ease);
        box-shadow: var(--shadow-xl);
    }
    .filter-sidebar.open { left: 0; }
    .btn-filter-mobile { display: inline-flex; }
    .profile-layout { grid-template-columns: 1fr; }
    .uni-profile-top { flex-direction: column; align-items: flex-start; }
    .uni-profile-title h1 { font-size: 1.6rem; }
}
@media (max-width: 768px) {
    .uni-list-card { flex-direction: column; gap: 1rem; }
    .uni-list-logo { width: 52px; height: 52px; }
    .uni-list-arrow { display: none; }
    .uni-quick-stats { grid-template-columns: repeat(2, 1fr); }
    .country-stats { grid-template-columns: repeat(2, 1fr); }
    .programs-table { font-size: 0.82rem; }
    .programs-table th, .programs-table td { padding: 0.6rem 0.7rem; }
    .program-filters .pf-row { flex-direction: column; }
    .program-filters .form-control { min-width: 100%; }
}

/* ============================================================
   UNIVERSITY TABLE DIRECTORY (Country Page)
   ============================================================ */

/* Title Bar */
.dir-title-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.75rem 0;
}
.dir-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.dir-title {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--navy-dark);
}
.dir-result-count {
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--navy-dark);
    color: var(--white);
    padding: 0.45rem 1.15rem;
    border-radius: 50px;
}
.dir-result-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.dir-badge-filter {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
}
.dir-badge-all {
    background: var(--gray-100);
    color: var(--gray-600);
}
.dir-badge-all.active, .dir-badge-all:hover {
    background: var(--navy-dark);
    color: var(--white);
}
.dir-badge-public {
    background: #E8F4FD;
    color: #1A5276;
}
.dir-badge-public.active, .dir-badge-public:hover {
    background: #1A5276;
    color: #fff;
    border-color: #1A5276;
}
.dir-badge-private {
    background: #FCEAE8;
    color: #922B21;
}
.dir-badge-private.active, .dir-badge-private:hover {
    background: #922B21;
    color: #fff;
    border-color: #922B21;
}

/* Table Wrapper */
.uni-table-wrap {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Table */
.uni-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.uni-table thead th {
    text-align: left;
    padding: 0.9rem 1rem;
    background: var(--gray-100);
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 2px solid var(--gray-200);
    user-select: none;
}
.uni-table thead th i { font-size: 0.75rem; opacity: 0.5; vertical-align: -1px; margin-left: 2px; }

/* Column widths */
.col-num    { width: 45px; text-align: center; }
.col-uni    { min-width: 240px; }
.col-city   { min-width: 120px; }
.col-rank   { width: 80px; text-align: center; }
.col-status { width: 90px; text-align: center; }
.col-enroll { width: 110px; text-align: center; }
.col-eng    { width: 75px; text-align: center; }
.col-web    { width: 90px; text-align: center; }

/* Website link button */
.web-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    background: var(--gray-100);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.web-link:hover {
    background: var(--navy);
    color: var(--white);
}
.web-link i { font-size: 0.9rem; }

/* University name as clickable link in table */
a.uni-name-link {
    text-decoration: none;
    display: block;
}
a.uni-name-link:hover { text-decoration: underline; }

/* Status badges (Public / Private) */
.status-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.22rem 0.7rem;
    border-radius: 50px;
    white-space: nowrap;
}
.status-public  { background: #E8F4FD; color: #1A5276; }
.status-private { background: #FCEAE8; color: #922B21; }

/* University Name in table */
.uni-name-link {
    font-weight: 600;
    color: var(--navy-dark);
    font-size: 0.92rem;
    line-height: 1.35;
    transition: color 0.2s;
}
.uni-row:hover .uni-name-link { color: var(--navy-light); }

/* City column */
.uni-row .col-city {
    font-size: 0.88rem;
    color: var(--gray-500);
}

/* Country Group Row */
.country-group-row td {
    padding: 0.85rem 1rem;
    background: var(--cream);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem;
    color: var(--gray-700);
}
.country-group-flag { font-size: 1.2rem; margin-right: 0.5rem; vertical-align: -2px; }
.country-group-count { color: var(--gray-400); font-weight: 400; margin-left: 0.3rem; font-size: 0.85rem; }

/* University Row */
.uni-row {
    cursor: pointer;
    transition: background 0.15s;
}
.uni-row:hover { background: var(--cream); }
.uni-row td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
    color: var(--gray-600);
}
.uni-row:last-child td { border-bottom: none; }

/* Num column */
.uni-row .col-num {
    font-weight: 500;
    color: var(--gray-400);
    text-align: center;
}

/* University Name Cell */
.uni-name-cell strong {
    display: block;
    font-weight: 600;
    color: var(--navy-dark);
    font-size: 0.92rem;
    line-height: 1.35;
    transition: color 0.2s;
}
.uni-row:hover .uni-name-cell strong { color: var(--navy-light); }
.uni-name-cell span {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 0.1rem;
}

/* Rank Badge */
.rank-badge {
    display: inline-block;
    background: #FFF5E0;
    color: #B8860B;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
}
.rank-na { color: var(--gray-300); }

/* Type Badge */
.type-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}
.type-public  { background: #E8F4FD; color: #1A5276; }
.type-private { background: #FCEAE8; color: #922B21; }

/* Enrollment */
.uni-row .col-enroll { font-weight: 500; text-align: center; }

/* Field Tags */
.field-tag {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    margin: 0.1rem 0.15rem;
    white-space: nowrap;
}
.field-more {
    background: var(--cream);
    color: var(--gray-400);
}

/* English Indicator */
.eng-yes { color: var(--success); font-size: 1.2rem; }
.eng-no  { color: var(--gray-300); }

/* Country Info Grid */
.country-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-100);
}
.ci-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.ci-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ci-item span:last-child {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Responsive Table */
@media (max-width: 992px) {
    .uni-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .uni-table { min-width: 900px; }
    .dir-title { font-size: 1.4rem; }
}
@media (max-width: 768px) {
    .dir-title-row { flex-direction: column; align-items: flex-start; }
    .country-info-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Show More Button ──────────────────────────────────────── */
.uni-row.uni-hidden { display: none; }

.show-more-wrap {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: -1px;
}
.btn-show-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    background: var(--navy);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}
.btn-show-more:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-show-more i {
    font-size: 1.1rem;
    transition: transform 0.2s;
}
.btn-show-more:hover i {
    transform: translateY(2px);
}
#remainingCount {
    font-weight: 400;
    opacity: 0.75;
    font-size: 0.85rem;
}

/* ============================================================
   TOOLS SHOWCASE — Homepage Icon Grid
   ============================================================ */
.tools-showcase {
    background: linear-gradient(135deg, #0E2F44 0%, #1B4F72 40%, #0E2F44 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.tools-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0C13.4 0 0 13.4 0 30s13.4 30 30 30 30-13.4 30-30S46.6 0 30 0zm0 55C16.2 55 5 43.8 5 30S16.2 5 30 5s25 11.2 25 25-11.2 25-25 25z' fill='rgba(255,255,255,0.02)'/%3E%3C/svg%3E");
    opacity: 0.5;
}
.tools-icon-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}
.tool-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    width: 95px;
    transition: all 0.25s ease;
}
.tool-icon-card:hover {
    transform: translateY(-6px);
}
.tool-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.12);
    background: var(--tb, rgba(255,255,255,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--tc, #fff);
    transition: all 0.25s ease;
}
.tool-icon-card:hover .tool-icon-circle {
    border-color: var(--tc, #fff);
    background: var(--tb, rgba(255,255,255,0.1));
    box-shadow: 0 0 20px rgba(255,255,255,0.08), 0 0 40px var(--tb, rgba(255,255,255,0.05));
    transform: scale(1.08);
}
.tool-icon-card span {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    text-align: center;
    transition: color 0.2s;
}
.tool-icon-card:hover span {
    color: #fff;
}

@media (max-width: 768px) {
    .tools-icon-grid {
        gap: 1rem;
    }
    .tool-icon-card {
        width: 80px;
    }
    .tool-icon-circle {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
    .tool-icon-card span {
        font-size: 0.72rem;
    }
}

/* Popup is now created by JS with inline styles — no CSS needed */
