/* ==========================================================================
   SISTEMA DE DISEÑO MODERNIZADO Y ACTUAL - F.S.A. PAZ
   Estilo Premium: Esmeralda, Oro Cobre, Vidrio Templado y Tipografía de Alta Gama
   ========================================================================== */

:root {
    /* Paleta Principal Moderna (Menta/Esmeralda y Oro Cobre) */
    --bg: #faf9f6;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #4b5563;
    --primary: #0f766e;
    --primary-rgb: 15, 118, 110;
    --primary-2: #14b8a6;
    --accent: #d92424;
    --accent-rgb: 180, 83, 9;
    --accent-light: #fef3c7;
    --cream: #fdfaf2;
    --beige: #f5f0e1;
    --warm-gray: #78716c;
    --line: rgba(15, 24, 40, 0.06);
    --line-focus: rgba(15, 118, 110, 0.2);
    
    /* Efectos & Sombras */
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
    --shadow: 0 20px 48px rgba(15, 24, 40, 0.05), 0 4px 12px rgba(15, 24, 40, 0.02);
    
    /* Tipografía */
    --serif: 'Cormorant Garamond', Georgia, "Times New Roman", serif;
    --sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

[data-theme="dark"] {
    --bg: #090d10;
    --surface: #10161d;
    --ink: #f3f4f6;
    --muted: #9ca3af;
    --primary: #0d9488;
    --primary-rgb: 13, 148, 136;
    --primary-2: #2dd4bf;
    --accent: #d97706;
    --accent-rgb: 217, 119, 6;
    --accent-light: #3e260e;
    --cream: #141612;
    --beige: #24221b;
    --warm-gray: #a8a29e;
    --line: rgba(255, 255, 255, 0.08);
    --line-focus: rgba(13, 148, 136, 0.4);
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   RESETEOS Y ELEMENTOS CORE
   ========================================================================== */

* {
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grilla decorativa abstracta moderna */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(var(--primary-rgb), 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(var(--accent-rgb), 0.03) 0%, transparent 40%);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

img, video {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-sm);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.muted {
    color: var(--muted);
}

/* Loader Premium */
.loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-mark {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(var(--primary-rgb), 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   BOTONES E INTERACCIONES
   ========================================================================== */

.btn {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--ink);
    border: 1px solid var(--ink);
    color: var(--bg);
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.15);
}

.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.25);
}

.btn-light {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.btn-light:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.1);
}

.btn-dark {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #ffffff;
}

.btn-dark:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Icon Buttons */
.icon-btn {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--ink);
    background: rgba(var(--surface), 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   NAVEGACIÓN GLASSMORPHISM
   ========================================================================== */

.glass-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-nav.is-scrolled {
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    padding: 0.6rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.navbar-brand span {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--ink), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.hero-section {
    min-height: 95vh;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: 
        linear-gradient(90deg, rgba(9, 13, 16, 0.88) 0%, rgba(9, 13, 16, 0.6) 50%, rgba(9, 13, 16, 0.25) 100%),
        linear-gradient(180deg, transparent 60%, var(--bg) 100%);
}

.hero-content h1 {
    font-family: var(--serif);
    color: #ffffff;
    font-size: clamp(2.8rem, 6.5vw, 5.8rem);
    line-height: 1.05;
    font-weight: 700;
    max-width: 900px;
    margin-bottom: 1.5rem;
}

.hero-content .lead {
    color: rgba(255, 255, 255, 0.9);
    max-width: 680px;
    font-size: 1.28rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Hero Card (Floating panel) */
.hero-card {
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
}

[data-theme="dark"] .hero-card {
    background: rgba(16, 22, 29, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

.hero-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
    mix-blend-mode: multiply;
}

[data-theme="dark"] .hero-logo {
    mix-blend-mode: normal;
    filter: brightness(1.2);
}

.hero-card h3 {
    font-size: 1.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.hero-card p {
    color: var(--muted);
    font-size: 0.98rem;
}

.hero-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-card-metrics span {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    text-align: center;
}

.hero-card-metrics strong {
    display: block;
    color: var(--primary);
    font-size: 1.75rem;
    font-family: var(--serif);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

/* Page Hero Compact */
.page-hero {
    min-height: 55vh;
    display: flex;
    align-items: flex-end;
    padding: 8rem 0 5rem;
    position: relative;
    isolation: isolate;
    background: var(--hero-image) center/cover;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: 
        linear-gradient(180deg, rgba(9, 13, 16, 0.4) 0%, rgba(9, 13, 16, 0.85) 100%);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 750px;
    font-size: 1.15rem;
}

/* Pills & Eyebrow */
.eyebrow {
    font-family: var(--sans);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.sacred-mark {
    position: absolute;
    right: 5%;
    top: 15%;
    width: 25vw;
    aspect-ratio: 1;
    opacity: 0.08;
    mix-blend-mode: normal;
    z-index: -1;
    animation: slowSpin 60s linear infinite;
}

@keyframes slowSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   TARJETAS Y MÓDULOS DE DISEÑO (Premium Design)
   ========================================================================== */

.section-pad {
    padding: 7.5rem 0;
}

.section-heading {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-heading h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.section-text {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.85;
}

/* Tarjetas Base Magníficas */
.stat-card, .feature-card, .info-card, .teacher-card, .mini-card, .post-card, .resource-card, .class-card, .panel-xl, .contact-form, .map-card, .sticky-box, .auth-card, .gallery-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover, .info-card:hover, .teacher-card:hover, .post-card:hover, .resource-card:hover, .class-card:hover, .mini-card:hover, .gallery-item:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: var(--shadow);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 2.25rem;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    font-family: var(--serif);
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Feature Band (Emerald Banner) */
.feature-band {
    padding: 7rem 0;
    position: relative;
    background: linear-gradient(135deg, #064e3b 0%, #0f766e 60%, #b45309 100%);
    color: #ffffff;
    overflow: hidden;
}

.feature-band::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: radial-gradient(circle at 2px 2px, #fff 1px, transparent 0);
    background-size: 24px 24px;
}

.feature-card {
    height: 100%;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    box-shadow: none;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-8px);
}

.feature-card i, .info-card i, .resource-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: #ffffff;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.98rem;
    margin: 0;
}

/* Event Cards en editorial style */
.event-editorial {
    background: var(--cream);
}

.event-cards {
    display: grid;
    gap: 1.25rem;
}

.event-cards article {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-cards article:hover {
    transform: translateX(6px);
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: var(--shadow);
}

.event-cards time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #ffffff;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.1;
    text-align: center;
    padding: 0.5rem;
}

.event-cards time span {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-family: var(--sans);
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.75);
}

.event-cards h3 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: var(--ink);
}

.event-cards p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Visual Grid (Instagram/Editorial Gallery layout) */
.visual-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 1.25rem;
}

.visual-tile {
    position: relative;
    min-height: 310px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin: 0;
    box-shadow: var(--shadow-soft);
}

.visual-tile:first-child {
    grid-row: span 2;
}

.visual-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(9, 13, 16, 0.75) 100%);
    pointer-events: none;
    z-index: 1;
}

.visual-tile:hover img {
    transform: scale(1.08);
}

.visual-tile figcaption {
    position: absolute;
    left: 1.75rem;
    right: 1.75rem;
    bottom: 1.75rem;
    color: #ffffff;
    z-index: 2;
}

.visual-tile figcaption h3 {
    font-size: 1.45rem;
    font-weight: 600;
    margin: 0.25rem 0 0;
}

.visual-tile figcaption span {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ==========================================================================
   TESTIMONIALS & NEWS
   ========================================================================== */

.panel-xl {
    padding: 3rem;
}

.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(var(--primary-rgb), 0.05) 0%, transparent 60%);
    pointer-events: none;
}

blockquote {
    font-size: 1.5rem;
    font-family: var(--serif);
    line-height: 1.7;
    color: var(--ink);
    border-left: 3px solid var(--accent);
    padding-left: 1.75rem;
    margin: 1.5rem 0 0;
}

blockquote cite {
    display: block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1rem;
    font-style: normal;
}

.news-stack {
    padding: 2rem 2.5rem;
    border-left: 1px solid var(--line);
    height: 100%;
}

.news-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.news-row:last-child {
    border-bottom: none;
}

.news-row span {
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
}

.news-row strong {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}

.news-row:hover strong {
    color: var(--primary);
}

/* ==========================================================================
   ABOUT & INTERIOR PAGES
   ========================================================================== */

.info-card {
    padding: 2.5rem;
    height: 100%;
}

.info-card h3 {
    font-size: 1.55rem;
    margin-bottom: 0.85rem;
}

.value-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
}

.value-cloud span {
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    transition: all 0.3s ease;
}

.value-cloud span:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.avatar.lg {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
}

.avatar.xl {
    width: 120px;
    height: 120px;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    border: 3px solid var(--surface);
    box-shadow: var(--shadow);
}

.teacher-card {
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.teacher-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.teacher-card strong {
    font-family: var(--sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.teacher-card p {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0;
}

/* ==========================================================================
   PROGRAMAS & MALLA CURRICULAR
   ========================================================================== */

.objective-list {
    display: grid;
    gap: 1.25rem;
}

.objective-list div {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.objective-list i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0.2rem;
}

.objective-list span {
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.5;
}

.sticky-box {
    padding: 2.5rem;
    position: sticky;
    top: 110px;
    border-radius: var(--radius-md);
}

.sticky-box h3 {
    font-size: 1.55rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.sticky-box p {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 1.02rem;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.sticky-box p i {
    color: var(--primary);
    font-size: 1.2rem;
}

.timeline {
    display: grid;
    gap: 1.25rem;
}

.timeline article {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    padding: 2.25rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    align-items: center;
    transition: all 0.3s ease;
}

.timeline article:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.timeline span {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 3rem;
    color: rgba(var(--accent-rgb), 0.3);
    line-height: 1;
    text-align: center;
}

.timeline h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline p {
    color: var(--muted);
    margin: 0;
    font-size: 0.98rem;
}

.mini-card {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-weight: 600;
    color: var(--ink);
}

.mini-card i {
    color: var(--primary);
    font-size: 1.5rem;
}

/* ==========================================================================
   GALERÍA VIVA & FILTRADOS
   ========================================================================== */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.filter-bar button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: 9999px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-bar button:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.filter-bar button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.2);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    min-height: 290px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-item div {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.gallery-item span {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
}

.gallery-item h3 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--ink);
}

/* ==========================================================================
   ACTUALIDAD & EVENTOS
   ========================================================================== */

.post-card {
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.post-card span {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.post-card h2 {
    font-size: 1.95rem;
    margin-bottom: 0.85rem;
}

.post-card p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.post-card a {
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.map-card {
    height: 380px;
}

.map-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.contact-strip a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.contact-strip a i {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-strip a:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Float WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 2rem;
    background: #25d366;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */

.footer-band {
    background: #0b0f14;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-band a {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    margin: 0.6rem 0;
    font-size: 0.95rem;
}

.footer-band a:hover {
    color: var(--primary-2);
    transform: translateX(4px);
}

.footer-band h6 {
    font-family: var(--serif);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
    font-weight: 600;
}

.footer-logo {
    width: 50px;
    height: 50px;
}

.footer-band p.muted {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* ==========================================================================
   AUTENTICACIÓN (LOGIN & REGISTER)
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    background: 
        linear-gradient(rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.85)),
        url('/assets/media/gallery/cuencos-tibetanos-1.jpeg') center/cover;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-card {
    width: min(100%, 460px);
    padding: 3rem 2.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    animation: panelIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="dark"] .auth-card {
    background: rgba(16, 22, 29, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-card.wide {
    width: min(100%, 780px);
}

.auth-card h1 {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.auth-card p {
    text-align: center;
    color: var(--muted);
    font-size: 0.98rem;
    margin-bottom: 2rem;
}

.auth-card .form-control {
    background: rgba(var(--bg), 0.5);
    border-radius: var(--radius-sm);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.auth-links a:hover {
    color: var(--accent);
}

.auth-logo {
    width: auto;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   CAMPUS VIRTUAL & SIDEBAR (DASHBOARD)
   ========================================================================== */

.app-body {
    min-height: 100vh;
    background: var(--bg);
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.75rem 1.25rem;
    background: linear-gradient(180deg, #090d10 0%, #062f36 100%);
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar .brand-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.sidebar .brand-line strong {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
}

.sidebar a:not(.brand-line) {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.sidebar a:not(.brand-line):hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar a.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.2);
}

.sidebar a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Workspace panel */
.workspace {
    min-width: 0;
    padding: 2.5rem;
}

.workspace-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.5rem;
}

.workspace-top h1 {
    font-size: 2.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.smart-progress {
    height: 12px;
    border-radius: 9999px;
    background: rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
    margin-top: 1.25rem;
}

.smart-progress .progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 9999px;
    font-size: 0;
}

.resource-card, .class-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2.25rem;
}

.resource-card span, .class-card span {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.resource-card h3, .class-card h3 {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.resource-card p, .class-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.resource-card .btn, .class-card .btn {
    margin-top: auto;
}

/* Foros & Comentarios */
.forum-post {
    display: block;
    margin-top: 1.5rem;
}

.forum-thread {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
}

.forum-thread small {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.25rem;
}

.forum-thread strong {
    font-size: 1.45rem;
    font-family: var(--serif);
    color: var(--ink);
    display: block;
    margin-bottom: 0.5rem;
}

.comment-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.comment-item {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--cream);
    border: 1px solid var(--line);
}

.comment-item span {
    display: block;
    font-weight: 700;
    color: var(--ink);
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}

.comment-item p {
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.comment-item small {
    color: var(--warm-gray);
    font-size: 0.78rem;
}

.certificate-icon {
    font-size: 5.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    animation: pulseAward 3s ease-in-out infinite;
}

@keyframes pulseAward {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==========================================================================
   BACKEND ADMINISTRATIVO
   ========================================================================== */

.admin-link {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.98rem;
}

.admin-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.admin-link i {
    color: var(--muted);
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
}

.admin-kpi {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.admin-kpi:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.admin-kpi span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-kpi strong {
    display: block;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 2.6rem;
    line-height: 1.1;
    margin-top: 0.5rem;
}

.admin-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-search {
    position: relative;
    min-width: 260px;
}

.admin-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.admin-search input {
    padding-left: 2.65rem;
    border-radius: 9999px;
    background: var(--bg);
}

.admin-form-card .form-label {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.9rem;
}

.admin-table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    border-bottom: 2px solid var(--line);
    padding: 1rem;
}

.admin-table tbody td {
    vertical-align: middle;
    padding: 1rem;
    font-size: 0.95rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.admin-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.02);
}

/* Modales */
.search-modal {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
    padding: 1rem;
}

.search-results {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.25rem;
    max-height: 400px;
    overflow: auto;
}

.search-results a {
    display: grid;
    gap: 0.25rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-results a:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.search-results span {
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.search-results strong {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--ink);
}

.search-results small {
    color: var(--muted);
    font-size: 0.88rem;
}

/* ==========================================================================
   ANIMACIONES Y RESPONSIVE
   ========================================================================== */

@keyframes panelIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 992px) {
    .stats-grid, .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .admin-toolbar {
        grid-template-columns: 1fr;
    }
    .visual-grid {
        grid-template-columns: 1fr;
    }
    .visual-tile:first-child {
        grid-row: auto;
    }
    .app-body {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
}

@media (max-width: 768px) {
    .section-pad {
        padding: 5rem 0;
    }
    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 80vh;
        padding-top: 8rem;
    }
    .stats-grid, .gallery-grid, .contact-strip, .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
    .timeline article {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    .workspace {
        padding: 1.5rem;
    }
    .workspace-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
