/* ==========================================
   Colegio Reina Norte - Main CSS Stylesheet
   ========================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Brand Color Palette */
  --color-brand-blue: #0b2545;
  --color-brand-cyan: #134074;
  --color-brand-gold: #c5a880;
  --color-brand-gold-dark: #9a7b1c;
  --color-brand-cream: #f4f6f9;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Custom Utilities */
.font-sans { font-family: var(--font-sans); }
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }

.bg-brand-blue { background-color: var(--color-brand-blue); }
.text-brand-blue { color: var(--color-brand-blue); }
.border-brand-blue { border-color: var(--color-brand-blue); }

.bg-brand-gold { background-color: var(--color-brand-gold); }
.text-brand-gold { color: var(--color-brand-gold); }
.text-brand-gold-dark { color: var(--color-brand-gold-dark); }
.border-brand-gold { border-color: var(--color-brand-gold); }

/* Custom Scrollbars */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.scrollbar-thin {
  scrollbar-width: thin;
}
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(197, 168, 128, 0.3);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 168, 128, 0.6);
}

/* Transitions and Animations */
.transition-all-custom {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Keyframes for Pulse & Ping */
@keyframes haloPing {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.animate-halo-ping {
  animation: haloPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Preserving 3D perspective */
.perspective-1000 {
  perspective: 1000px;
}

.transform-style-3d {
  transform-style: preserve-3d;
}

/* Modal Open Body Lock */
body.modal-open {
  overflow: hidden !important;
}

/* Fade animation classes */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

p {
  text-align: justify;
}

/* =========================================================
   Ajustes Exclusivos para Vista Móvil (@media max-width: 768px)
   La versión de escritorio se mantiene 100% intacta.
   ========================================================= */
@media (max-width: 768px) {
  /* 1. Tipografía General y Legibilidad en Móvil */
  p {
    text-align: left;
  }

  .text-center,
  .text-center p,
  p.text-center {
    text-align: center !important;
  }

  h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Ajuste responsivo del título del banner en sección Equipo */
  #equipo h1 {
    font-size: clamp(1.25rem, 5.8vw, 2.25rem) !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* 2. Ajustes para la pantalla pie.html (Título y Subtítulo en móvil) */
  #pie h1 {
    font-size: clamp(1.2rem, 5.5vw, 2.25rem) !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    text-align: center !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  #pie .relative.z-20 p {
    text-align: center !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  #pie h2, #pie h3, #pie h4 {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* 3. Sección "Nuestro Equipo" / Organigrama en Móvil */
  .organigrama-scroll-container {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    padding-bottom: 2rem !important;
    display: block !important;
  }

  .organigrama-tree {
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-width: max-content !important;
    width: max-content !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* 3. Sección "Pie de Página" (Footer) en Móvil */
  footer {
    padding-top: 2.5rem !important;
  }

  footer .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Spacing y distribución de columnas en el footer móvil */
  footer .grid {
    gap: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Identidad institucional: Logo, Título y Subtítulo en el Footer */
  footer a.group {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    gap: 0.75rem !important;
  }

  footer a.group .flex-col {
    min-width: 0 !important;
  }

  footer a.group span.font-extrabold {
    font-size: 1.05rem !important;
    line-height: 1.25 !important;
    letter-spacing: 0.05em !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  footer a.group span.font-mono {
    font-size: 0.65rem !important;
    letter-spacing: 0.12em !important;
    margin-top: 0.2rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Títulos de las columnas del footer */
  footer h4 {
    font-size: 0.85rem !important;
    letter-spacing: 0.06em !important;
    margin-bottom: 0.75rem !important;
    word-break: break-word !important;
  }

  /* Textos, enlaces y listas en footer móvil */
  footer a,
  footer p,
  footer span,
  footer li {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Barra inferior / Copyright y enlaces legales */
  footer .py-8 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    gap: 1.25rem !important;
    text-align: center !important;
  }
}

