/* ================================================
   GSSS Jethantri - Modern School Website
   Professional & Clean Design
   ================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #dbeafe;
    --primary-50: #eff6ff;

    /* Accent Colors */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fef3c7;

    /* Success/Green */
    --success: #059669;
    --success-light: #d1fae5;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    --gradient-dark: linear-gradient(135deg, #1f2937 0%, #111827 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-card: 0 0 0 1px rgb(0 0 0 / 0.05), 0 4px 16px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

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

/* Protect main site elements from embedded styles */
body.site-body,
body:not(.embedded) {
    background-color: var(--gray-50) !important;
}

header, nav, footer, .top-bar, .page-header, .hero {
    background: revert;
}

section.bg-gray {
    background: var(--gray-50) !important;
}

.content-page {
    background: var(--white) !important;
}

article.content-page > .container,
section > .container:not(.post-content .container) {
    max-width: 1280px !important;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
}

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================
   TOP BAR
   ================================================ */
.top-bar {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
}

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

.top-bar a {
    color: var(--accent);
    font-weight: 600;
}

.top-bar a:hover {
    color: var(--accent-light);
}

/* ================================================
   HEADER
   ================================================ */
header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo img {
    height: 64px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
}

.logo .logo-horizontal {
    display: inline-block;
}

.logo .logo-circle {
    display: none;
}

/* Quote display — school name already in horizontal logo */
.logo-text {
    display: block;
}

.logo-text h1 {
    display: none;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-style: italic;
    font-weight: 400;
    max-width: 340px;
    line-height: 1.5;
    border-left: 3px solid var(--primary-light);
    padding-left: 12px;
}

/* ================================================
   NAVIGATION
   ================================================ */
nav {
    background: var(--gradient-primary);
    position: relative;
}

.nav-toggle {
    display: none;
    color: var(--white);
    font-size: 24px;
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.nav-menu > li > a.active {
    background: rgba(0, 0, 0, 0.2);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--white);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: 100;
    overflow: hidden;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--gray-700);
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--primary-50);
    color: var(--primary);
    padding-left: 24px;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    background: var(--gradient-hero);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%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");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    font-weight: 400;
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--gray-900);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Outline button on dark backgrounds */
.hero .btn-outline,
.page-header .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

.hero .btn-outline:hover,
.page-header .btn-outline:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--primary);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-ghost:hover {
    background: var(--primary);
    color: var(--white);
}

/* ================================================
   SECTIONS
   ================================================ */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-header h2, .section-title h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-header p, .section-title p {
    font-size: 1.125rem;
    color: var(--gray-500);
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

/* ================================================
   CARDS
   ================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
    border: 1px solid var(--gray-100);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.card-body {
    padding: 24px;
}

.card-badge, .category-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color var(--transition);
}

.card:hover .card-title {
    color: var(--primary);
}

.card-text {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* ================================================
   FEATURE BOXES
   ================================================ */
.features {
    background: var(--white);
}

.feature-box {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-slow);
}

.feature-box:hover {
    background: var(--white);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.feature-box h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.feature-box p {
    font-size: 0.9375rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ================================================
   STATS SECTION
   ================================================ */
.stats {
    background: var(--gradient-dark);
    padding: 64px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    text-align: center;
}

.stat-item {
    padding: 24px;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 0.9375rem;
    color: var(--gray-300);
    font-weight: 500;
}

/* ================================================
   ABOUT SECTION
   ================================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
}

.about-text h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.about-text p {
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.7;
}

/* ================================================
   QUICK LINKS
   ================================================ */
.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-slow);
}

.quick-link-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.quick-link-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
    transition: all var(--transition);
}

.quick-link-card:hover .quick-link-icon {
    background: var(--gradient-primary);
    transform: scale(1.1);
}

.quick-link-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.quick-link-card p {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

/* ================================================
   PAGE HEADER
   ================================================ */
.page-header {
    background: var(--gradient-hero);
    padding: 60px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%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");
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    position: relative;
}

.page-header p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    position: relative;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--white);
}

/* ================================================
   CONTENT PAGE
   ================================================ */
.content-page {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin: -48px auto 64px;
    position: relative;
    z-index: 1;
}

/* Wider content for posts */
.content-page.wide {
    max-width: 80%;
    width: 80%;
}

.content-page h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 40px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.content-page h2:first-child {
    margin-top: 0;
}

.content-page h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 32px 0 12px;
}

.content-page p {
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.8;
}

.content-page ul, .content-page ol {
    margin: 16px 0;
    padding-left: 24px;
    list-style: disc;
}

.content-page ol {
    list-style: decimal;
}

.content-page li {
    color: var(--gray-600);
    margin-bottom: 8px;
    line-height: 1.6;
}

.content-page a {
    color: var(--primary);
    font-weight: 500;
}

.content-page a:hover {
    text-decoration: underline;
}

.content-page img {
    border-radius: var(--radius-lg);
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}

/* ================================================
   POSTS SECTIONS
   ================================================ */
.posts-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 48px 0 24px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.posts-section-title:first-of-type {
    margin-top: 0;
}

/* ================================================
   MAP CONTAINER
   ================================================ */
.map-container {
    margin-top: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.map-container iframe {
    width: 100%;
    height: 350px;
    border: none;
    display: block;
}

/* ================================================
   FOOTER
   ================================================ */
footer {
    background: var(--gradient-dark);
    color: var(--gray-300);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
}

.footer-col p {
    color: var(--gray-400);
    margin-bottom: 12px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--gray-400);
    font-size: 0.9375rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-col a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 4px 0;
}

/* ================================================
   POST CONTENT (for blog posts)
   ================================================ */
.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 700;
}

.post-header .card-meta {
    color: var(--gray-500);
}

.post-content {
    max-width: 100%;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    box-shadow: var(--shadow-md);
}

/* Table wrapper for scroll on overflow */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.875rem;
    table-layout: auto;
}

.post-content th, .post-content td {
    border: 1px solid var(--gray-200);
    padding: 10px 12px;
    text-align: left;
    word-wrap: break-word;
    max-width: 300px;
}

.post-content th {
    background: var(--primary);
    font-weight: 600;
    color: var(--white);
    border-color: var(--primary-dark);
    white-space: nowrap;
}

.post-content tr:nth-child(even) {
    background: var(--gray-50);
}

.post-content tr:hover {
    background: var(--primary-light);
}

.post-content h2 {
    color: var(--gray-900);
    margin-top: 40px;
    font-size: 1.5rem;
}

.post-content h3 {
    color: var(--gray-800);
    margin-top: 32px;
    font-size: 1.25rem;
}

.post-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.post-content ul, .post-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--gray-600);
}

.post-content a {
    color: var(--primary);
}

.post-content a:hover {
    text-decoration: underline;
}

/* Prevent content overflow */
.post-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    contain: layout style;
    isolation: isolate;
}

.post-content pre,
.post-content code {
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.875rem;
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.post-content pre {
    padding: 16px;
    margin: 16px 0;
}

/* Figure and iframe containment */
.post-content figure {
    margin: 24px 0;
    max-width: 100%;
}

.post-content iframe {
    max-width: 100%;
    border-radius: var(--radius);
}

/* WordPress specific content fixes */
.post-content .wp-block-table {
    overflow-x: auto;
    margin: 20px 0;
}

.post-content figure.wp-block-table {
    overflow-x: auto;
}

.post-content .has-fixed-layout {
    table-layout: fixed;
}

/* Additional WordPress figure/table fixes */
.post-content figcaption {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: 8px;
}

/* ================================================
   EMBEDDED CONTENT CONTAINMENT (Model Papers, etc.)
   ================================================ */
.post-content html,
.post-content body {
    all: unset;
    display: block;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
}

.post-content head,
.post-content meta,
.post-content title,
.post-content style {
    display: none !important;
}

.post-content .container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.post-content section {
    padding: 20px 0 !important;
    background: transparent !important;
}

/* Fix colors - ensure readable text */
.post-content,
.post-content * {
    color: inherit;
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    color: var(--gray-900) !important;
}

.post-content p, .post-content li, .post-content td, .post-content th {
    color: var(--gray-700) !important;
}

/* Fix embedded tables */
.post-content table {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    display: block;
}

/* Preserve styled cards/boxes within posts */
.post-content [class*="card"],
.post-content [class*="box"],
.post-content [class*="header"] {
    background: var(--white) !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-lg) !important;
    padding: 20px !important;
    margin: 16px 0 !important;
}

.post-content [class*="gradient"],
.post-content [style*="gradient"] {
    background: var(--gradient-primary) !important;
    color: white !important;
}

.post-content [class*="gradient"] *,
.post-content [style*="gradient"] * {
    color: white !important;
}

/* Model Paper specific overrides */
.post-content .author-header,
.post-content .paper-header,
.post-content .questions-card,
.post-content .section-header,
.post-content .answer-section {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.post-content .questions-card-header,
.post-content .section-title,
.post-content [class*="header"] {
    color: white !important;
}

.post-content .question-text,
.post-content .answer-text,
.post-content .option-item {
    color: var(--gray-700) !important;
}

/* Ensure proper stacking */
.post-content > * {
    position: relative;
    z-index: 1;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        display: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu > li > a {
        padding: 16px 24px;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
        display: none;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        color: rgba(255, 255, 255, 0.8);
        border-bottom-color: rgba(255, 255, 255, 0.1);
        padding-left: 40px;
    }

    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }

    .hero {
        padding: 60px 0 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle, .hero p {
        font-size: 1rem;
    }

    header {
        position: relative;
        top: auto;
    }

    .header-main {
        flex-direction: row;
        text-align: left;
        gap: 10px;
        padding: 10px 0;
    }

    .logo {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .logo .logo-horizontal {
        display: none;
    }

    .logo .logo-circle {
        display: inline-block;
    }

    .logo img {
        height: 44px;
        width: 44px;
        max-width: none;
    }

    .logo-text {
        display: block;
    }

    .logo-text h1 {
        display: block;
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .logo-text p {
        display: none;
    }

    section {
        padding: 60px 0;
    }

    .section-header h2, .section-title h2 {
        font-size: 1.75rem;
    }

    .content-page {
        padding: 32px 24px;
        margin: -32px 16px 48px;
        border-radius: var(--radius-lg);
    }

    .content-page.wide {
        max-width: calc(100% - 32px);
        width: calc(100% - 32px);
    }

    .post-content th, .post-content td {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .top-bar .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .stat-item h3 {
        font-size: 2.25rem;
    }

    .content-page {
        padding: 24px 16px;
    }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--gray-500); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.bg-white { background: var(--white); }
.bg-gray { background: var(--gray-50); }

/* Print Styles */
@media print {
    header, nav, footer, .hero-buttons, .top-bar {
        display: none !important;
    }

    .content-page {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .page-header {
        background: none;
        color: var(--gray-900);
        padding: 20px 0;
    }

    .page-header h1 {
        color: var(--gray-900);
    }
}
