/* ═══════════════════════════════════════════════════
   FACULTY PAGE — faculty.css
   M.P. Shah English High School
   ═══════════════════════════════════════════════════ */

/* ─── PAGE HERO ─────────────────────────────────── */
.page-hero {
    position: relative;
    background: linear-gradient(135deg, #06173a 0%, #0f3272 60%, #1a4b8c 100%);
    padding: 80px 0 70px;
    overflow: hidden;
}
.faculty-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 80% 30%, rgba(231,130,36,0.12) 0%, transparent 55%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M50 50c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zM10 10c0-5.5-4.5-10-10-10S-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.page-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(6,23,58,0.6) 0%, transparent 100%);
}
.page-hero-content {
    position: relative; z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}
.page-hero-text { max-width: 560px; }
.light-tag {
    color: var(--accent-lt, #f5b942) !important;
    padding-left: 22px;
}
.light-tag::before {
    background: var(--accent-lt, #f5b942) !important;
}
.page-hero-text h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.page-hero-text h1 span { color: var(--accent-lt, #f5b942); }
.page-hero-text p {
    font-size: 1rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.8;
    max-width: 480px;
}

/* Hero stats cluster */
.page-hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 22px 32px;
    flex-shrink: 0;
}
.ph-stat { text-align: center; padding: 0 24px; }
.ph-stat-num {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-lt, #f5b942);
    line-height: 1;
}
.ph-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    display: block;
}
.ph-stat-divider {
    width: 1px;
    height: 44px;
    background: rgba(255,255,255,0.14);
    flex-shrink: 0;
}

/* Breadcrumb bar */
.breadcrumb-bar {
    position: relative; z-index: 2;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 36px;
    padding-top: 16px;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: rgba(255,255,255,0.55);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.breadcrumb a:hover { color: var(--accent-lt, #f5b942); }
.bc-sep { color: rgba(255,255,255,0.25); font-size: 10px; }
.bc-current {
    font-size: 12.5px;
    color: var(--accent-lt, #f5b942);
    font-weight: 700;
}

/* ─── TAB NAVIGATION ─────────────────────────────── */
.faculty-tabs-section {
    background: #ffffff;
    border-bottom: 1px solid #e8edf5;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(10,40,100,0.07);
}
.faculty-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.faculty-tabs::-webkit-scrollbar { display: none; }

.faculty-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 26px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
}
.faculty-tab:hover {
    background: rgba(26,75,140,0.04);
    border-bottom-color: rgba(26,75,140,0.2);
}
.faculty-tab.active {
    background: rgba(231,130,36,0.05);
    border-bottom-color: var(--accent, #e78224);
}
.tab-icon {
    font-size: 1.1rem;
    color: #9ab0cc;
    transition: color 0.3s, transform 0.3s;
    flex-shrink: 0;
}
.faculty-tab.active .tab-icon,
.faculty-tab:hover .tab-icon {
    color: var(--accent, #e78224);
    transform: scale(1.1);
}
.tab-text { display: flex; flex-direction: column; align-items: flex-start; }
.tab-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #4a5568;
    line-height: 1.2;
    transition: color 0.3s;
}
.faculty-tab.active .tab-label { color: var(--primary-dk, #0a1f50); }
.tab-sub {
    font-size: 10.5px;
    color: #9ab0cc;
    font-weight: 500;
    margin-top: 2px;
}
.tab-count {
    background: #edf2f7;
    color: #6b7a99;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.faculty-tab.active .tab-count {
    background: var(--accent, #e78224);
    color: #ffffff;
}

/* ─── PANEL HEADER ───────────────────────────────── */
.faculty-panel { display: none; }
.faculty-panel.active { display: block; animation: panelIn 0.4s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8edf5;
    flex-wrap: wrap;
}
.panel-header-left { display: flex; align-items: center; gap: 18px; }
.panel-icon-wrap {
    width: 54px; height: 54px;
    background: linear-gradient(135deg, var(--primary, #1a4b8c) 0%, #0a1f50 100%);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(10,40,100,0.2);
}
.panel-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dk, #0a1f50);
    margin: 0 0 4px;
}
.panel-sub { font-size: 12.5px; color: #8a9ab5; margin: 0; font-weight: 500; }

/* Search Input */
.panel-search-wrap {
    position: relative;
    flex-shrink: 0;
}
.search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9ab0cc;
    pointer-events: none;
}
.faculty-search {
    width: 240px;
    padding: 11px 16px 11px 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    color: #2d3748;
    background: #f8fafc;
    transition: all 0.3s ease;
    outline: none;
}
.faculty-search:focus {
    border-color: var(--accent, #e78224);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(231,130,36,0.10);
    width: 280px;
}

/* ─── FACULTY GRID ───────────────────────────────── */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

/* ─── FACULTY CARD ───────────────────────────────── */
.faculty-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 4px 16px rgba(10,40,100,0.06);
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
    cursor: default;
    position: relative;
}
.faculty-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent, #e78224), #f5b942);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 3;
}
.faculty-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(10,40,100,0.14);
    border-color: rgba(231,130,36,0.25);
}
.faculty-card:hover::before { transform: scaleX(1); }

/* Card image area — default for individual portraits */
.fc-img-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #dce8f5, #eaf0f8);
}
.fc-img-wrap img {
    width: 100%;
    aspect-ratio: 3 / 3.5;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.faculty-card:hover .fc-img-wrap img { transform: scale(1.07); }

/* ── Admin / Staff panel: all 3 in one row, full photo no cropping ── */
#panel-admin .faculty-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
#panel-admin .fc-img-wrap img {
    aspect-ratio: unset;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    background: #f0f4f8;
}

/* Hover overlay */
.fc-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,31,80,0.85) 0%, rgba(10,31,80,0.3) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.faculty-card:hover .fc-overlay { opacity: 1; }
.fc-overlay-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 7px 14px;
    border-radius: 30px;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}
.fc-overlay-content i { color: var(--accent-lt, #f5b942); font-size: 13px; }

/* Qualification badge (corner) */
.fc-qual-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(231,130,36,0.90);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Card body */
.fc-body {
    padding: 16px 18px 18px;
    border-top: 1px solid #f0f4fa;
}
.fc-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dk, #0a1f50);
    margin: 0 0 5px;
    line-height: 1.3;
}
.fc-designation {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--accent, #e78224);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.fc-designation::before {
    content: '';
    width: 12px; height: 2px;
    background: var(--accent, #e78224);
    border-radius: 1px;
    flex-shrink: 0;
}

/* No results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: #9ab0cc;
    text-align: center;
}
.no-results i { font-size: 2.5rem; opacity: 0.4; }
.no-results p { font-size: 15px; font-weight: 500; margin: 0; }

/* ─── JOIN US CTA ─────────────────────────────────── */
.faculty-cta-section {
    background: linear-gradient(135deg, #06173a 0%, #1a4b8c 100%);
    position: relative;
    overflow: hidden;
}
.faculty-cta-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 60%, rgba(231,130,36,0.10) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.faculty-cta-inner {
    position: relative; z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.fci-left { max-width: 560px; }
.fci-left h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 14px;
}
.fci-left p { color: rgba(255,255,255,0.65); font-size: 15px; line-height: 1.8; margin: 0; }
.fci-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
}
.fci-right .btn-primary,
.fci-right .btn-outline.dark {
    min-width: 220px;
    justify-content: center;
}
.fci-right .btn-outline.dark {
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.85);
}
.fci-right .btn-outline.dark:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.65);
    color: #ffffff;
}

/* ─── SHARED: section-tag on dark bg ─────────────── */
.accent-tag {
    color: var(--accent-lt, #f5b942) !important;
}
.accent-tag::before {
    background: var(--accent-lt, #f5b942) !important;
}

/* ─── SHARED BUTTONS (fallback if not in style.css) ─ */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #1a4b8c 0%, #0a1f50 100%);
    color: #ffffff;
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 700; font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(10,40,100,0.2);
    border: none; cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(10,40,100,0.28);
}
.btn-outline.dark {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent;
    border: 2px solid #1a4b8c;
    color: #1a4b8c;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 700; font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-outline.dark:hover {
    background: #1a4b8c;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ─── RESPONSIVE: TABLET (≤ 1024px) ──────────────── */
@media (max-width: 1024px) {
    .faculty-grid { grid-template-columns: repeat(3, 1fr); }
    #panel-admin .faculty-grid { grid-template-columns: repeat(3, 1fr); }
    .page-hero-stats { padding: 18px 20px; }
    .ph-stat { padding: 0 16px; }
    .panel-search-wrap { width: 100%; }
    .faculty-search { width: 100%; box-sizing: border-box; }
    .faculty-search:focus { width: 100%; }
}

/* ─── RESPONSIVE: MOBILE (≤ 768px) ───────────────── */
@media (max-width: 768px) {
    .page-hero       { padding: 60px 0 50px; }
    .page-hero-content { flex-direction: column; align-items: flex-start; gap: 28px; }
    .page-hero-stats  { width: 100%; justify-content: center; padding: 16px 12px; }
    .ph-stat          { padding: 0 14px; }
    .ph-stat-num      { font-size: 1.6rem; }

    .faculty-tabs     { gap: 0; }
    .faculty-tab      { padding: 14px 16px; gap: 10px; }
    .tab-icon         { font-size: 1rem; }
    .tab-sub          { display: none; }
    .tab-count        { display: none; }

    .panel-header      { flex-direction: column; align-items: flex-start; gap: 16px; }
    .panel-search-wrap { width: 100%; }
    .faculty-search    { width: 100%; box-sizing: border-box; }
    .faculty-search:focus { width: 100%; }

    .faculty-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    #panel-admin .faculty-grid { grid-template-columns: repeat(1, 1fr); }
    #panel-admin .fc-img-wrap img { aspect-ratio: unset; height: auto; }

    .faculty-cta-inner { flex-direction: column; text-align: center; }
    .fci-right          { width: 100%; align-items: center; }
    .fci-right .btn-primary,
    .fci-right .btn-outline.dark { width: 100%; max-width: 320px; }
}

/* ─── RESPONSIVE: SMALL MOBILE (≤ 480px) ─────────── */
@media (max-width: 480px) {
    .page-hero-stats { flex-direction: column; gap: 16px; }
    .ph-stat-divider { width: 60px; height: 1px; }

    .faculty-tab { padding: 12px 12px; gap: 8px; }
    .tab-label   { font-size: 12px; }

    .faculty-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    #panel-admin .faculty-grid { grid-template-columns: repeat(1, 1fr); }
    .fc-body { padding: 12px 14px 14px; }
    .fc-name { font-size: 0.88rem; }
}