/* ==========================================================================
   Escuela N°3 Manuel Belgrano - Rediseño Minimalista Escolar Moderno
   ========================================================================== */

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

:root {
  /* Paleta de Colores Institucional Renovada */
  --primary: #0284c7;           /* Celeste / Azul Institucional limpio */
  --primary-hover: #0369a1;     /* Azul primario más oscuro para hover */
  --primary-light: #e0f2fe;     /* Azul pastel sutil para badges/fondos */
  --primary-glow: rgba(2, 132, 199, 0.15);
  
  --secondary: #1e3a8a;         /* Azul Marino institucional */
  --dark: #0f172a;              /* Texto principal casi negro */
  --muted: #64748b;             /* Texto secundario / gris */
  --light: #f8fafc;             /* Fondo off-white minimalista */
  --white: #ffffff;             /* Blanco puro */
  --border: #e2e8f0;            /* Bordes suaves */
  
  /* Sombras Modernas */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.12);

  /* Radios de Borde */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Fuentes */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  transition: all 0.25s ease;
}

/* ==========================================================================
   1. TOP BAR (Cabecera Superior)
   ========================================================================== */
.top-bar {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 0.875rem;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
}

.top-bar-item i {
  color: var(--primary);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--light);
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
}

.social-icon:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.fecha-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-light);
  color: var(--secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.825rem;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   2. NAVBAR PRINCIPAL
   ========================================================================== */
.main-header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.brand-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-logo:hover img {
  transform: scale(1.03);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title .title-main {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--secondary);
  line-height: 1.2;
}

.brand-title .title-sub {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navigation Links */
.navbar-nav .nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  padding: 12px 18px !important;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* Dropdown Customization */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  margin-top: 10px !important;
}

.dropdown-item {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--dark);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateX(4px);
}

.navbar-toggler {
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--light);
  outline: none !important;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================================================
   3. HERO SECTION & SUBPAGE HEADERS
   ========================================================================== */
.hero-wrapper {
  padding: 24px 0 40px;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--dark);
}

.subpage-header-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
  margin-top: 24px;
  margin-bottom: 40px;
}

.subpage-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 40px 20px;
}

.subpage-header-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.subpage-breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.subpage-breadcrumbs a {
  color: var(--white);
  font-weight: 600;
}

.subpage-breadcrumbs a:hover {
  color: var(--primary-light);
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 8s ease;
}

.hero-card:hover .hero-bg-img {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.75) 100%);
  backdrop-filter: blur(1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 40px 24px;
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-hero-location {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 20px var(--primary-glow);
  transition: all 0.3s ease;
  border: none;
}

.btn-hero-location:hover {
  background-color: var(--primary-hover);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   4. TARJETAS Y CONTENIDOS SUBPÁGINAS
   ========================================================================== */
.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.clean-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: all 0.3s ease;
  height: 100%;
}

.clean-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* Subpage Article & Content styling */
.post-header-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background-color: var(--white);
  transition: all 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Custom Forms (Carga & Contact) */
.custom-form-group {
  margin-bottom: 20px;
}

.custom-form-group label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 8px;
  display: block;
}

.custom-input {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark);
  transition: all 0.25s ease;
  outline: none;
}

.custom-input:focus {
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

/* Custom News Card layout */
.team-carousel {
  padding-bottom: 20px;
}

.team-item {
  background-color: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.team-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.team-item h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  padding: 20px 20px 8px;
}

.team-item p {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 20px 16px;
  margin: 0;
}

.team-img {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.team-img img {
  transition: transform 0.5s ease;
}

.team-item:hover .team-img img {
  transform: scale(1.06);
}

.team-social {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-item:hover .team-social {
  opacity: 1;
}

.team-social .btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  border: none;
  transition: transform 0.25s ease;
}

.team-social .btn:hover {
  transform: scale(1.15);
  background-color: var(--primary);
  color: var(--white);
}

/* Carousel Owl custom nav buttons */
.owl-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.owl-nav button.owl-prev,
.owl-nav button.owl-next {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full) !important;
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  color: var(--dark) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease !important;
}

.owl-nav button.owl-prev:hover,
.owl-nav button.owl-next:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 6px 16px var(--primary-glow);
}

/* ==========================================================================
   5. REDES SOCIALES E IFRAME / VIDEO
   ========================================================================== */
.content-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 28px;
  transition: box-shadow 0.3s ease;
}

.content-card:hover {
  box-shadow: var(--shadow-lg);
}

.video-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: #000;
  width: 100%;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   6. HISTORIA Y POEMA (140 Años Enseñando)
   ========================================================================== */
.history-section {
  padding: 60px 0;
}

.history-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  width: 100%;
  height: 100%;
  max-height: 520px;
}

.poem-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: transform 0.3s ease;
}

.poem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.poem-text {
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.7;
  margin: 0;
}

.author-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-top: 28px;
  width: fit-content;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.author-info {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
  font-style: italic;
}

/* ==========================================================================
   7. FOOTER & BACK TO TOP
   ========================================================================== */
.footer-main {
  background-color: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  padding-top: 70px;
  margin-top: 80px;
}

.footer-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.footer-card h5 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 4px;
}

.footer-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin: 0;
}

.footer-brand-title {
  color: var(--primary);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.925rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  margin-top: 40px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: var(--white);
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--primary-glow);
  z-index: 999;
  transition: all 0.3s ease;
  border: none;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.active,
.back-to-top:not([style*="display: none"]) {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary);
  color: var(--white);
  transform: translateY(-4px);
}

/* ==========================================================================
   8. MODAL DE ACCESO DOCENTE
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content h2 {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 20px;
}

.modal-content input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  margin-bottom: 16px;
  transition: all 0.25s ease;
  background-color: var(--light);
}

.modal-content input[type="password"]:focus {
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.modal-content button {
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.modal-content button:first-of-type {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.modal-content button:first-of-type:hover {
  background-color: var(--primary-hover);
}

.modal-content button:last-of-type {
  background-color: transparent;
  color: var(--muted);
  margin-top: 8px !important;
}

.modal-content button:last-of-type:hover {
  color: var(--dark);
}

#errorMsg {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.875rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .top-bar-info {
    justify-content: center;
    margin-bottom: 8px;
  }
  
  .hero-card {
    min-height: 440px;
  }

  .brand-logo {
    padding: 6px 0;
  }
}
