/* ==================== Institution Profile Pages (CollegeVista Style) ==================== */

/* ==================== Institution Hero (Unified Component) ====================

   Used by: universities.php, universities/profile.php, colleges/profile.php,
   universities/courses.php

   Design tokens reuse existing variables: --ink, --blue, --gold, --primary,
   --border, --surface, --text, --text-secondary, --text-muted, --shadow-*.

   Banner support: add class `hero-has-banner` + data-hero-banner URL attribute
   instead of inline styles.
================================================== */

/* Hero Section */
.institution-hero {
    background: linear-gradient(135deg, var(--ink) 0%, #00264d 100%);
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 0;
}

.institution-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px 400px at 100% 0%, rgba(201, 162, 39, 0.15), transparent 60%);
    pointer-events: none;
}

.institution-hero .container {
    position: relative;
    z-index: 2;
    padding: 28px 24px 40px;
}

/* Breadcrumbs */
.institution-hero .breadcrumb-list {
    gap: 10px;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.institution-hero .breadcrumb-item a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.55);
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.institution-hero .breadcrumb-item a:hover {
    color: #f6d775;
    text-decoration-color: currentColor;
}

.institution-hero .breadcrumb-item a:focus-visible {
    border-radius: 2px;
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.institution-hero .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.72);
}

.institution-hero .breadcrumb-item.active span {
    color: #fff;
    font-weight: 700;
}

/* Hero Content Grid */
.hero-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: start;
    padding: 24px 0;
}

.hero-logo {
    flex-shrink: 0;
}

.entity-logo-lg {
    width: 100px;
    height: 100px;
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.entity-logo-lg.empty {
    display: grid;
    place-items: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entity-logo-lg img,
.entity-logo-lg .institution-logo-image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: contain;
}

.hero-info {
    min-width: 0;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-info h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 14px;
    display: block;
}

.hero-summary {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0 0 16px;
    max-width: 72ch;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.meta-item {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all var(--transition-fast);
}

.badge:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.badge-gold {
    background: var(--gold);
    color: #00264d;
    border-color: var(--gold);
}

.badge-gold:hover {
    background: var(--gold-dark);
    color: #fff;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 8px;
    flex-direction: column-reverse;
}



.hero-actions .btn {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
}

/* Hero Background Image (optional, via class + data attr) */
.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 45%;
    right: 0;
    top: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

.institution-hero.hero-has-banner .hero-bg-image {
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .institution-hero .container {
        padding: 24px 20px 32px;
    }

    .hero-content {
        grid-template-columns: auto 1fr;
        gap: 1.5rem;
        padding: 20px 0;
    }

    .hero-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: stretch;
    }

    .hero-actions .btn {
        flex: 1 1 48%;
        min-width: unset;
    }

    .hero-actions .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .entity-logo-lg {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .hero-bg-image {
        width: 40%;
        opacity: 0.25;
    }
}

@media (max-width: 768px) {
    .institution-hero .container {
        padding: 20px 16px 28px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 16px 0;
    }

    .hero-logo {
        grid-column: 1;
        display: flex;
        justify-content: center;
    }

    .entity-logo-lg {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .hero-info h1 {
        font-size: 1.5rem;
    }

    .hero-summary {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .hero-meta {
        gap: 8px;
        font-size: 0.85rem;
    }

    .hero-badges {
        gap: 6px;
        margin-bottom: 16px;
    }

    .badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
        flex: unset;
        min-width: unset;
        justify-content: center;
    }

    .hero-bg-image {
        display: none;
    }
}

@media (max-width: 480px) {
    .institution-hero .container {
        padding: 16px 16px 24px;
    }

    .hero-content {
        gap: 1rem;
    }

    .hero-info h1 {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 10px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .hero-badges {
        justify-content: flex-start;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .institution-hero::before,
    .badge,
    .hero-actions .btn {
        transition: none !important;
        animation: none !important;
    }
}

/* Print */
@media print {
    .institution-hero {
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .institution-hero::before {
        display: none;
    }

    .institution-hero h1,
    .institution-hero .hero-subtitle,
    .institution-hero .meta-item,
    .institution-hero .badge,
    .institution-hero .hero-summary {
        color: #000 !important;
    }

    .hero-bg-image {
        display: none;
    }

    .hero-actions {
        display: none;
    }
}
    background-size: cover;
    z-index: 1;
}

/* Stats Section */
.institution-stats-section {
    background: white;
    border-bottom: 1px solid #e3e9f0;
    padding: 24px 0;
    position: relative;
    z-index: 3;
    margin-top: -30px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 10px;
    border: 1px solid #e3e9f0;
}

.stat-icon {
    font-size: 2rem;
    line-height: 1;
}

.stat-text {
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #003C71;
    line-height: 1.2;
}

/* Two Column Layout */
.content-layout-2col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.content-main {
    min-width: 0;
}

.content-sidebar {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 20px;
}

/* Quick Answer Box */
.quick-answer-box {
    background: linear-gradient(135deg, var(--border-light) 0%, var(--paper) 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.qa-header h2 {
    font-size: 1.15rem;
    color: #003C71;
    margin-bottom: 12px;
}

.qa-body p {
    color: #55677c;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.qa-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-link-btn {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1px solid #c9d9ec;
    color: #003C71;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-link-btn:hover {
    background: #003C71;
    color: white;
    border-color: #003C71;
}

/* Latest Updates Section */
.latest-updates-section {
    margin-bottom: 32px;
}

.latest-updates-section h2 {
    font-size: 1.3rem;
    color: #003C71;
    margin-bottom: 16px;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.update-card {
    background: white;
    border: 1px solid #e3e9f0;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.update-card:hover {
    border-color: #003C71;
    background: #f0f5fa;
    transform: translateY(-2px);
}

.update-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.update-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #003C71;
    margin-bottom: 4px;
}

.update-date {
    font-size: 0.75rem;
    color: #475569;
}

/* Sticky Navigation Tabs */
.sticky-nav-tabs {
    position: sticky;
    top: 76px;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: white;
    border-bottom: 2px solid #e3e9f0;
    padding: 0;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav-tab {
    padding: 14px 18px;
    color: #55677c;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: #003C71;
    background: #f0f5fa;
}

.nav-tab.active {
    color: var(--ink);
    border-bottom-color: var(--primary);
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.3rem;
    color: #003C71;
    margin: 0;
}

.view-all {
    color: #003C71;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.view-all:hover {
    color: var(--gold-dark);
}

.content-section h2 {
    font-size: 1.3rem;
    color: #003C71;
    margin-bottom: 16px;
}

.content-section h3 {
    font-size: 1.1rem;
    color: #003C71;
    margin-top: 20px;
    margin-bottom: 12px;
}

.prose p {
    color: #55677c;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

/* Placements Grid */
.placements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.placement-stat {
    background: white;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.placement-label {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.placement-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1.2;
}

/* Facilities Grid */
.facilities-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.facility-card-large {
    background: white;
    border: 1px solid #e3e9f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.facility-card-large:hover {
    border-color: #003C71;
    box-shadow: 0 4px 12px rgba(0, 60, 113, 0.1);
    transform: translateY(-2px);
}

.facility-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    line-height: 1;
}

.facility-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #003C71;
    margin-bottom: 6px;
}

.facility-desc {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    border: 1px solid #e3e9f0;
    border-radius: 12px;
    padding: 16px;
}

.sidebar-widget h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #003C71;
    margin: 0 0 12px;
}

.sidebar-widget p {
    font-size: 0.85rem;
    color: #55677c;
    line-height: 1.5;
    margin-bottom: 12px;
}

.sidebar-widget p:last-child {
    margin-bottom: 0;
}

/* Quick Facts List */
.quick-facts-list {
    display: grid;
    gap: 10px;
}

.fact-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.85rem;
}

.fact-label {
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
}

.fact-value {
    color: #003C71;
    font-weight: 600;
}

.fact-link {
    color: #003C71;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.fact-link:hover {
    color: var(--gold-dark);
}

/* CTA Widget */
.widget-cta {
    background: linear-gradient(135deg, var(--border-light) 0%, var(--paper) 100%);
    border-left: 4px solid var(--primary);
}

.widget-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.widget-cta h3 {
    margin-bottom: 8px;
}

.course-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.course-link:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* Button Variants */
.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.85rem;
}

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

.btn-gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-layout-2col {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        position: static;
    }

    .hero-content {
        grid-template-columns: auto 1fr;
        gap: 1.5rem;
    }

    .hero-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: stretch;
    }

    .hero-actions .btn {
        flex: 1 1 45%;
        min-width: unset;
    }

    .hero-actions .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .institution-hero .container {
        padding: 16px 24px 32px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .entity-logo-lg {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .hero-info h1 {
        font-size: 1.6rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card-mini {
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }

    .sticky-nav-tabs {
        top: 62px;
    }

    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .placements-grid {
        grid-template-columns: 1fr;
    }

    .facilities-grid-large {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .quick-facts-list {
        gap: 8px;
    }

    .fact-item {
        grid-template-columns: 100px 1fr;
    }
}

@media (max-width: 480px) {
    .institution-hero .container {
        padding: 12px 16px 24px;
    }

    .hero-info h1 {
        font-size: 1.4rem;
    }

    .entity-logo-lg {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .stat-card-mini {
        flex-direction: row;
        text-align: left;
    }

    .updates-grid {
        grid-template-columns: 1fr;
    }

    .sticky-nav-tabs {
        gap: 0;
        padding: 0 8px;
        overflow-x: auto;
    }

    .nav-tab {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    .facilities-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-link-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
}
