/* ==============================================================================
   SAHIN PHYSICS - REFINED MODERN THEME STYLESHEET
   Curated for Samsuz Zaman Sir | M.Sc Physics, B.Ed
   Clean, Elegant, Zero-Overlap Design
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
    --bg-dark: #060913;
    --bg-card: rgba(13, 21, 39, 0.82);
    --bg-card-hover: rgba(18, 30, 58, 0.92);
    --bg-glass: rgba(17, 28, 52, 0.7);
    --bg-surface: #0a1122;
    --border-subtle: rgba(56, 189, 248, 0.16);
    --border-glow: rgba(56, 189, 248, 0.45);
    
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.35);
    --primary-dark: #0284c7;
    --accent-blue: #0070f3;
    --accent-gold: #fbbf24;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(2, 132, 199, 0.07) 0%, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #7dd3fc;
}

img {
    max-width: 100%;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Glassmorphic Container Utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 9, 19, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}

/* Round Logo beside only "Sahin Physics" */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-round-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-round-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-title-only {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(120deg, #ffffff 40%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: #050b18;
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
    color: #020712;
}

.btn-outline {
    background: rgba(56, 189, 248, 0.08);
    color: var(--primary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #0f172a;
    font-weight: 700;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

/* User / Admin Nav Pill */
.user-nav-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(17, 28, 52, 0.85);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px 4px 6px;
    border-radius: var(--radius-full);
}

.user-nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #000;
}

.user-nav-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-tag-pill {
    background: rgba(251, 191, 36, 0.18);
    color: var(--accent-gold);
    border: 1px solid rgba(251, 191, 36, 0.4);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

/* Mobile Hamburger */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==============================================================================
   HERO SECTION (Refined for Zero Text Overlap)
   ============================================================================== */
.hero-section {
    position: relative;
    padding: 65px 0 80px;
    overflow: hidden;
}

#physicsParticlesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 600;
    width: fit-content;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.hero-title {
    font-size: 3.1rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 2px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #ffffff 10%, #38bdf8 55%, #0284c7 95%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.teacher-credentials-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.credential-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(13, 21, 39, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.4;
}

.credential-tag svg {
    color: var(--primary);
    flex-shrink: 0;
}

.hero-description {
    font-size: 1.02rem;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

/* Hero Profile Visual Card */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card-wrapper {
    position: relative;
    width: 370px;
    max-width: 100%;
}

.profile-glow-ring {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(2, 132, 199, 0.1), rgba(251, 191, 36, 0.2));
    filter: blur(20px);
    z-index: 0;
    opacity: 0.75;
}

.profile-card {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.profile-image-container {
    width: 100%;
    height: 420px;
    position: relative;
    overflow: hidden;
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}

.profile-card:hover .profile-image-container img {
    transform: scale(1.025);
}

.profile-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 42%;
    background: linear-gradient(to top, rgba(6, 9, 19, 0.95) 0%, transparent 100%);
}

.profile-caption-info {
    position: absolute;
    bottom: 16px;
    left: 20px;
    right: 20px;
}

.profile-caption-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.profile-caption-title {
    font-size: 0.84rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}

/* Floating Badges on Hero Visual */
.floating-badge {
    position: absolute;
    background: rgba(10, 17, 34, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.floating-badge.badge-top-left {
    top: 20px;
    left: 0px;
}

.floating-badge.badge-bottom-right {
    bottom: 20px;
    right: 0px;
}

.floating-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.floating-badge-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.floating-badge-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==============================================================================
   STATS STRIP
   ============================================================================== */
.stats-strip {
    padding: 20px 0 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    padding: 24px 18px;
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.stat-num {
    font-size: 2.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.86rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==============================================================================
   ABOUT SECTION
   ============================================================================== */
.section-padding {
    padding: 75px 0;
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 46px;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.3rem;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: center;
}

.about-text-card {
    padding: 34px;
}

.about-text-card h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #fff;
}

.about-text-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.96rem;
    line-height: 1.68;
}

.feature-check-list {
    list-style: none;
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.feature-check-item svg {
    color: var(--accent-emerald);
    flex-shrink: 0;
    margin-top: 3px;
}

.feature-check-item strong {
    color: #fff;
}

.about-cards-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.mini-highlight-card {
    padding: 22px;
    transition: var(--transition);
}

.mini-highlight-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.mini-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1.2rem;
}

.mini-highlight-card h4 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #fff;
}

.mini-highlight-card p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ==============================================================================
   COMMUNITY FEED & CMS SECTION (Study Notes, Questions, Material, Blogs)
   ============================================================================== */
.feed-section {
    background: rgba(7, 12, 24, 0.55);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.feed-header-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.feed-top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.feed-title-block h3 {
    font-size: 1.7rem;
    margin-bottom: 4px;
}

.feed-title-block p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Category Filter Tabs & Search Bar */
.feed-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: rgba(13, 21, 39, 0.88);
    border: 1px solid var(--border-subtle);
    padding: 10px 16px;
    border-radius: var(--radius-lg);
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.category-tab-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border-color: rgba(56, 189, 248, 0.4);
}

.category-count {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.feed-search-wrap {
    position: relative;
    min-width: 250px;
}

.feed-search-input {
    width: 100%;
    background: rgba(6, 9, 19, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 8px 16px 8px 36px;
    color: #fff;
    font-size: 0.86rem;
    outline: none;
    transition: var(--transition);
}

.feed-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.feed-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    pointer-events: none;
}

/* Post Cards */
.feed-cards-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.feed-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 26px;
    transition: var(--transition);
    position: relative;
}

.feed-post-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.feed-post-card.admin-pinned {
    border-left: 4px solid var(--accent-gold);
}

.post-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.post-author-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #060913;
    font-size: 0.95rem;
    border: 2px solid rgba(56, 189, 248, 0.4);
    flex-shrink: 0;
}

.author-details-text {
    display: flex;
    flex-direction: column;
}

.author-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.96rem;
    color: #fff;
    line-height: 1.3;
}

.author-role-subtext {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.post-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tag-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.category-tag-badge.badge-notes {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}
.category-tag-badge.badge-question {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
}
.category-tag-badge.badge-material {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.category-tag-badge.badge-blog {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.post-title {
    font-size: 1.32rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1.35;
}

.post-content-body {
    color: #cbd5e1;
    font-size: 0.94rem;
    line-height: 1.7;
    margin-bottom: 16px;
    white-space: pre-line;
}

/* Post Media Attachments */
.post-image-preview {
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 420px;
    background: #000;
    border: 1px solid var(--border-subtle);
}

.post-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.post-image-preview img:hover {
    transform: scale(1.015);
}

/* PDF Attachment Card */
.pdf-attachment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(10, 16, 32, 0.85);
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.pdf-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-icon-badge {
    width: 38px;
    height: 38px;
    background: rgba(244, 63, 94, 0.18);
    color: #fb7185;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.pdf-details {
    display: flex;
    flex-direction: column;
}

.pdf-filename {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    word-break: break-all;
    line-height: 1.3;
}

.pdf-filesub {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.pdf-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cloud Document Card (Google Drive / OneDrive) */
.cloud-doc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(217, 119, 6, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.cloud-doc-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cloud-doc-icon {
    width: 38px;
    height: 38px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.cloud-doc-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cloud-doc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cloud-doc-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.cloud-doc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Post Footer Actions */
.post-actions-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-engagement-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.action-btn.liked {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.12);
}

.action-btn.active-comments {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
}

.admin-post-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-admin-action {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-admin-action:hover {
    color: #fff;
    border-color: var(--primary);
}

.btn-admin-action.delete:hover {
    color: #fda4af;
    border-color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.1);
}

/* Comments Drawer */
.post-comments-drawer {
    margin-top: 16px;
    padding: 18px;
    background: rgba(8, 14, 28, 0.92);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-card {
    padding: 12px 14px;
    background: rgba(17, 28, 52, 0.5);
    border-radius: var(--radius-sm);
    border-left: 3px solid rgba(56, 189, 248, 0.25);
    position: relative;
}

.comment-card.admin-reply-card {
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid var(--accent-gold);
}

.comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.comment-user-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
}

.comment-time {
    font-size: 0.72rem;
    color: var(--text-subtle);
}

.comment-body {
    font-size: 0.87rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.comment-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-subtle);
    font-size: 0.72rem;
    cursor: pointer;
    margin-left: 8px;
}

.comment-delete-btn:hover {
    color: var(--accent-rose);
}

/* Add Comment Form */
.add-comment-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-inputs-flex {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-name-input {
    background: rgba(6, 9, 19, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    color: #fff;
    font-size: 0.84rem;
    outline: none;
    max-width: 260px;
}

.comment-input-row {
    display: flex;
    gap: 10px;
}

.comment-textarea {
    flex-grow: 1;
    background: rgba(6, 9, 19, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: 0.88rem;
    resize: vertical;
    min-height: 48px;
    outline: none;
}

.comment-textarea:focus {
    border-color: var(--primary);
}

/* ==============================================================================
   STUDENTS SAY / TESTIMONIALS (Exact 2 Students Requested)
   ============================================================================== */
.testimonials-section {
    padding: 75px 0;
}

.testimonials-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.testimonial-card-refined {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-subtle);
}

.testimonial-card-refined:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.testimonial-quote-text {
    font-size: 0.98rem;
    color: #e2e8f0;
    line-height: 1.75;
    margin-bottom: 24px;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary);
}

.testimonial-author-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* High quality round student avatar */
.student-avatar-round {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
    background: #000;
    flex-shrink: 0;
}

.student-avatar-round img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-details-box h5 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 3px;
    line-height: 1.2;
}

.student-details-box span {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
}

/* ==============================================================================
   CONTACT SECTION
   ============================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
}

.contact-info-card {
    padding: 34px;
}

.contact-detail-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 22px;
}

.contact-item-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.contact-item-row h5 {
    font-size: 0.98rem;
    margin-bottom: 2px;
    color: #fff;
    line-height: 1.3;
}

.contact-item-row p {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.contact-form-card {
    padding: 34px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: rgba(6, 9, 19, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* ==============================================================================
   MODALS
   ============================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 16, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.modal-card {
    background: #0b1326;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h4 {
    font-size: 1.25rem;
    color: #fff;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 22px 24px;
}

/* Modern Non-Overlapping Upload Drop Areas (Fixed) */
.upload-zones-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .upload-zones-grid {
        grid-template-columns: 1fr;
    }
}

.upload-drop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 14px;
    background: rgba(8, 14, 28, 0.75);
    border: 2px dashed rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    min-height: 120px;
    width: 100%;
    box-sizing: border-box;
}

.upload-drop-card:hover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.upload-drop-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 1.2rem;
}

.upload-drop-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.upload-drop-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.file-preview-strip {
    display: none;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: #34d399;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

.file-preview-strip.active {
    display: flex;
}

.btn-remove-preview {
    background: transparent;
    border: none;
    color: var(--accent-rose);
    cursor: pointer;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.btn-remove-preview:hover {
    background: rgba(244, 63, 94, 0.2);
}

/* File Upload Drop Area Legacy Fallback */
.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    background: rgba(6, 9, 19, 0.5);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.file-drop-area:hover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
}

.file-drop-area svg {
    color: var(--primary);
    margin-bottom: 6px;
}

.file-drop-area p {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 12px 18px;
    background: #0f172a;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.88rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.toast-success {
    border-color: var(--accent-emerald);
}

.toast.toast-error {
    border-color: var(--accent-rose);
}

/* FOOTER */
.site-footer {
    background: #040711;
    border-top: 1px solid var(--border-subtle);
    padding: 55px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 36px;
    margin-bottom: 40px;
}

.footer-col h5 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 16px;
}

.footer-col p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.footer-links-list a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom-bar {
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--text-subtle);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-pill-badge, .teacher-credentials-box, .hero-cta-group {
        justify-content: center;
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .testimonials-grid-2 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-links.active-mobile {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: rgba(6, 9, 19, 0.98);
        border-bottom: 1px solid var(--border-subtle);
        padding: 20px 24px;
        gap: 16px;
        backdrop-filter: blur(16px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
        z-index: 99;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .floating-badge {
        display: none;
    }
    .feed-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .feed-search-wrap {
        width: 100%;
    }
}

/* ==============================================================================
   ADMIN PORTAL DASHBOARD STYLES
   ============================================================================== */
.admin-portal-card {
    max-width: 960px !important;
    width: 95% !important;
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.portal-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(7, 12, 26, 0.85);
    border-bottom: 1px solid var(--border-subtle);
}

.portal-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: #cbd5e1;
}

.portal-stat-pill strong {
    color: var(--primary);
    font-weight: 700;
}

.portal-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(5, 8, 18, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.portal-tab-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.portal-tab-btn:hover {
    color: #fff;
    background: rgba(56, 189, 248, 0.08);
}

.portal-tab-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(2, 132, 199, 0.3) 100%);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.25);
}

.portal-tab-badge {
    background: var(--accent-gold);
    color: #0b1120;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 9999px;
    line-height: 1;
}

.portal-tab-pane {
    display: none;
    padding: 22px 24px;
    overflow-y: auto;
    max-height: calc(88vh - 165px);
}

.portal-tab-pane.active {
    display: block;
}

/* Messages List */
.messages-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message-card {
    background: rgba(13, 21, 39, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.message-card.unread {
    border-left: 4px solid var(--accent-gold);
    background: rgba(17, 28, 52, 0.9);
}

.message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.message-sender-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.98rem;
}

.message-sender-phone {
    font-size: 0.84rem;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
}

.message-time {
    font-size: 0.78rem;
    color: var(--text-subtle);
}

.message-subject {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.88rem;
}

.message-text {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
    background: rgba(6, 9, 19, 0.6);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* Manage Posts in Portal */
.portal-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-post-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(13, 21, 39, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.portal-post-item:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.portal-post-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.portal-post-title {
    font-size: 0.94rem;
    font-weight: 600;
    color: #fff;
}

.portal-post-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Comments Manager in Portal */
.portal-comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.portal-comment-card {
    background: rgba(13, 21, 39, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-comment-postlink {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
}

.portal-comment-reply-box {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
}

.portal-comment-reply-input {
    flex-grow: 1;
    background: rgba(6, 9, 19, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    color: #fff;
    font-size: 0.84rem;
    outline: none;
}

.portal-comment-reply-input:focus {
    border-color: var(--primary);
}

/* ==============================================================================
   COMPREHENSIVE RESPONSIVE DESIGN & MOBILE OVERHAUL (Zero Overlap & Full Adaptability)
   ============================================================================== */

/* Base horizontal overflow prevention on all screens */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
}

/* Tablets and Handhelds (<= 992px) */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-pill-badge, .teacher-credentials-box, .hero-cta-group {
        justify-content: center;
    }
    .about-grid, .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
    .testimonials-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
}

/* Medium Tablets & Mobile Phones (<= 768px) */
@media (max-width: 768px) {
    /* Header & Navigation */
    .nav-wrap {
        height: 64px !important;
    }
    .brand-round-logo-wrap {
        width: 38px !important;
        height: 38px !important;
    }
    .brand-title-only {
        font-size: 1.2rem !important;
    }
    .nav-links {
        display: none !important;
    }
    .nav-links.active-mobile {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 64px !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(6, 9, 19, 0.98) !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        padding: 20px 24px !important;
        gap: 16px !important;
        backdrop-filter: blur(16px) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
        z-index: 99 !important;
    }
    .mobile-nav-toggle {
        display: block !important;
    }

    /* Container padding */
    .container {
        padding: 0 18px !important;
    }

    /* Hero Section */
    .hero-section {
        padding: 24px 0 45px !important;
    }
    .hero-title {
        font-size: 1.95rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.015em !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }
    .hero-description {
        font-size: 0.94rem !important;
        line-height: 1.65 !important;
        margin: 0 auto !important;
    }
    .teacher-credentials-box {
        gap: 8px !important;
    }
    .credential-tag {
        font-size: 0.82rem !important;
        padding: 6px 12px !important;
        white-space: normal !important;
        word-break: break-word !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }
    .profile-card-wrapper {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }
    .profile-image-container {
        height: 340px !important;
    }
    .floating-badge {
        display: none !important;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .stat-item {
        padding: 16px 10px !important;
    }
    .stat-num {
        font-size: 1.85rem !important;
        line-height: 1.2 !important;
    }
    .stat-label {
        font-size: 0.78rem !important;
        line-height: 1.3 !important;
    }

    /* About Section */
    .section-padding {
        padding: 48px 0 !important;
    }
    .section-head {
        margin-bottom: 30px !important;
    }
    .section-title {
        font-size: 1.85rem !important;
    }
    .about-text-card {
        padding: 22px 18px !important;
    }
    .about-cards-column {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .mini-highlight-card {
        padding: 18px 16px !important;
    }

    /* Feed Filters & Search */
    .feed-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 12px 14px !important;
    }
    .category-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 4px !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .category-tabs::-webkit-scrollbar {
        display: none !important;
    }
    .category-tab-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 7px 12px !important;
        font-size: 0.82rem !important;
    }
    .feed-search-wrap {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Feed Post Cards */
    .feed-cards-container {
        gap: 16px !important;
    }
    .feed-post-card {
        padding: 20px 16px !important;
    }
    .post-title {
        font-size: 1.18rem !important;
        line-height: 1.35 !important;
    }
    .post-content-body {
        font-size: 0.9rem !important;
        line-height: 1.65 !important;
    }
    .pdf-attachment-card, .cloud-doc-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 12px 14px !important;
    }
    .pdf-actions, .cloud-doc-actions {
        width: 100% !important;
        justify-content: stretch !important;
        gap: 8px !important;
    }
    .pdf-actions .btn, .cloud-doc-actions .btn {
        flex: 1 !important;
        justify-content: center !important;
    }

    /* Testimonials & Contact */
    .testimonials-section {
        padding: 48px 0 !important;
    }
    .testimonial-card-refined {
        padding: 22px 18px !important;
    }
    .testimonial-quote-text {
        font-size: 0.92rem !important;
        line-height: 1.65 !important;
        margin-bottom: 18px !important;
    }
    .contact-info-card {
        padding: 22px 18px !important;
    }

    /* Modals & Dialogs */
    .modal-overlay {
        padding: 10px !important;
    }
    .modal-card {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 94vh !important;
        border-radius: var(--radius-lg) !important;
    }
    .modal-header {
        padding: 14px 18px !important;
    }
    .modal-body {
        padding: 16px 18px !important;
    }
    .admin-portal-card {
        max-width: 100% !important;
        width: 100% !important;
        height: 94vh !important;
        max-height: 94vh !important;
        border-radius: 14px !important;
    }
    .portal-top-bar {
        padding: 12px 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .portal-stats-row {
        justify-content: space-between !important;
        gap: 6px !important;
    }
    .portal-stat-pill {
        padding: 4px 8px !important;
        font-size: 0.74rem !important;
    }
    .portal-tabs-nav {
        padding: 8px 12px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
    }
    .portal-tab-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        flex-shrink: 0 !important;
    }
    .portal-tab-pane {
        padding: 16px 14px !important;
        max-height: calc(94vh - 160px) !important;
    }
    .portal-post-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .portal-post-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }
}

/* Phones & Small Handhelds (<= 560px) */
@media (max-width: 560px) {
    .container {
        padding: 0 14px !important;
    }

    /* Nav Actions Compact Header */
    .nav-actions {
        gap: 6px !important;
    }
    .user-nav-chip .user-nav-name,
    .user-nav-chip .admin-tag-pill {
        display: none !important;
    }
    .user-nav-chip {
        padding: 3px 6px !important;
        gap: 4px !important;
    }
    #btnOpenAdminPortalNav {
        padding: 6px 10px !important;
        font-size: 0.78rem !important;
    }
    .brand-title-only {
        font-size: 1.12rem !important;
    }
    .brand-round-logo-wrap {
        width: 34px !important;
        height: 34px !important;
    }

    /* Hero */
    .hero-title {
        font-size: 1.65rem !important;
        line-height: 1.25 !important;
    }
    .hero-pill-badge {
        font-size: 0.76rem !important;
        padding: 4px 12px !important;
    }
    .hero-cta-group {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .hero-cta-group .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .teacher-credentials-box {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }
    .credential-tag {
        justify-content: center !important;
        font-size: 0.78rem !important;
    }
    .profile-card-wrapper {
        max-width: 290px !important;
    }
    .profile-image-container {
        height: 310px !important;
    }

    /* Posts */
    .feed-post-card {
        padding: 16px 12px !important;
    }
    .post-title {
        font-size: 1.08rem !important;
    }
    .post-actions-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .post-engagement-left {
        justify-content: space-between !important;
        width: 100% !important;
    }
    .action-btn {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
    .admin-post-controls {
        width: 100% !important;
        justify-content: flex-end !important;
    }
    .comment-input-row {
        flex-direction: column !important;
    }
    .comment-input-row .btn {
        width: 100% !important;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .stat-item {
        padding: 12px 8px !important;
    }
    .stat-num {
        font-size: 1.55rem !important;
        margin-bottom: 2px !important;
    }
    .stat-label {
        font-size: 0.72rem !important;
    }

    /* Cards & Contact */
    .about-text-card, .contact-info-card, .testimonial-card-refined {
        padding: 18px 14px !important;
    }
    .contact-item-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .footer-bottom-bar {
        flex-direction: column !important;
        text-align: center !important;
        gap: 8px !important;
    }
}

/* Smallest Devices (<= 380px) */
@media (max-width: 380px) {
    .container {
        padding: 0 10px !important;
    }
    .brand-title-only {
        font-size: 1.02rem !important;
    }
    #btnOpenAdminPortalNav {
        padding: 5px 6px !important;
        font-size: 0.72rem !important;
    }
    .hero-title {
        font-size: 1.45rem !important;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .stat-num {
        font-size: 1.4rem !important;
    }
}


