/* ==================================================
   FECOD THEME - Rebrand 2026
   ==================================================
   COLORES PRINCIPALES
   - Negro:       RGB(0, 23, 41)    #001729
   - Blanco:      RGB(255,255,255)  #FFFFFF  
   - Azul:        RGB(30, 90, 154)   #1E5A9A
   
   COLORES AUXILIARES
   - Azul oscuro: RGB(0, 33, 53)    #002135
   - Azul medio:  RGB(25, 60, 109)  #193C6D
   
   FUENTES
   - Títulos: Bakbak One
   - Texto:   Inter (clean, moderna)
   ================================================== */

/* ==========================
   IMPORTS - FUENTES
   ========================== */
@font-face {
  font-family: 'Bakbak One';
  src: url('/static/fonts/bakbak/BakbakOne-Regular.otf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

/* ==========================
   VARIABLES CSS
   ========================== */
:root {
  /* COLORES PRINCIPALES */
  --fecod-black: #001729;
  --fecod-white: #FFFFFF;
  --fecod-red: #1E5A9A;

  /* COLORES AUXILIARES */
  --fecod-blue-dark: #002135;
  --fecod-blue-medium: #193C6D;

  /* DERIVADOS */
  --fecod-red-light: #c93a39;
  --fecod-red-dark: #8a1b1a;
  --fecod-blue-light: #2a5a9e;
  
  /* BACKGROUNDS */
  --bg-main: var(--fecod-black);
  --bg-card: var(--fecod-blue-dark);
  --bg-card-hover: var(--fecod-blue-medium);
  --bg-input: rgba(0, 33, 53, 0.6);
  --bg-overlay: rgba(0, 23, 41, 0.95);

  /* TEXTO */
  --text-main: var(--fecod-white);
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-dim: rgba(255, 255, 255, 0.4);

  /* BORDES */
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-accent: var(--fecod-red);

  /* SOMBRAS */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-red: 0 4px 20px rgba(30, 90, 154, 0.3);

  /* GRADIENTES */
  --gradient-main: linear-gradient(180deg, var(--fecod-black) 0%, var(--fecod-blue-dark) 100%);
  --gradient-card: linear-gradient(145deg, var(--fecod-blue-dark) 0%, var(--fecod-black) 100%);
  --gradient-red: linear-gradient(135deg, var(--fecod-red) 0%, var(--fecod-red-dark) 100%);
  --gradient-hero: radial-gradient(ellipse at 30% 0%, rgba(30, 90, 154, 0.15) 0%, transparent 50%),
                   radial-gradient(ellipse at 70% 100%, rgba(25, 60, 109, 0.2) 0%, transparent 50%),
                   var(--gradient-main);

  /* TRANSICIONES */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* FUENTES */
  --font-display: 'Bakbak One', 'Impact', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* RADIUS */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ==========================
   RESET & BASE
   ========================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--gradient-hero);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================
   TIPOGRAFÍA
   ========================== */
h1, h2, h3, h4, h5, h6,
.title, .heading {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-main);
}

h1, .h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2, .h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3, .h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4, .h4 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h5, .h5 { font-size: 1.1rem; }
h6, .h6 { font-size: 1rem; }

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

a {
  color: var(--fecod-red);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--fecod-red-light);
}

strong, b {
  font-weight: 600;
}

small {
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* ==========================
   HEADER / NAVBAR
   ========================== */
header, .navbar, nav {
  background: rgba(0, 23, 41, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: all var(--transition-normal);
}

header.is-scrolled {
  background: rgba(0, 23, 41, 0.95);
  box-shadow: var(--shadow-md);
}

header.is-top {
  background: transparent;
  backdrop-filter: none;
}

.nav-link, header a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.nav-link:hover, header a:hover {
  color: var(--fecod-red);
}

.nav-link.active {
  color: var(--fecod-red);
}

/* Logo glow on hover */
.logo-h-img {
  transition: filter var(--transition-normal);
}

header a:hover .logo-h-img {
  filter: drop-shadow(0 0 8px rgba(30, 90, 154, 0.6));
}

/* ==========================
   BOTONES
   ========================== */
.btn, button, [type="submit"] {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary, .btn-red {
  background: var(--gradient-red);
  color: var(--fecod-white);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover, .btn-red:hover {
  background: var(--fecod-red-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(30, 90, 154, 0.4);
}

.btn-secondary, .btn-outline {
  background: transparent;
  color: var(--fecod-white);
  border: 2px solid var(--border-medium);
}

.btn-secondary:hover, .btn-outline:hover {
  border-color: var(--fecod-red);
  color: var(--fecod-red);
  background: rgba(30, 90, 154, 0.1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* ==========================
   CARDS
   ========================== */
.card, .panel, .box {
  background: var(--gradient-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--fecod-red);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header, .panel-header {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-soft);
}

.card-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  margin: 0 0 10px;
}

/* ==========================
   FORMULARIOS
   ========================== */
input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  width: 100%;
  transition: all var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--fecod-red);
  box-shadow: 0 0 0 3px rgba(30, 90, 154, 0.2);
}

input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  display: block;
}

/* ==========================
   TABLAS
   ========================== */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
}

th {
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 15px;
  background: var(--fecod-blue-dark);
  border-bottom: 2px solid var(--fecod-red);
  color: var(--text-main);
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}

tr:hover td {
  background: rgba(25, 60, 109, 0.2);
}

/* ==========================
   BADGES & TAGS
   ========================== */
.badge, .tag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.badge-red, .tag-red {
  background: var(--fecod-red);
  color: var(--fecod-white);
}

.badge-blue, .tag-blue {
  background: var(--fecod-blue-medium);
  color: var(--fecod-white);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
}

/* ==========================
   SECCIONES & CONTENEDORES
   ========================== */
.section {
  padding: 60px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--fecod-red);
  margin: 15px auto 0;
  border-radius: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================
   HERO
   ========================== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(30, 90, 154, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--fecod-red);
}

/* ==========================
   FOOTER
   ========================== */
footer {
  background: var(--fecod-black);
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 20px;
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--fecod-red);
}

/* ==========================
   SCROLLBAR
   ========================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--fecod-black);
}

::-webkit-scrollbar-thumb {
  background: var(--fecod-blue-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fecod-red);
}

/* ==========================
   SELECTION
   ========================== */
::selection {
  background: var(--fecod-red);
  color: var(--fecod-white);
}

/* ==========================
   UTILITIES
   ========================== */
.text-red { color: var(--fecod-red) !important; }
.text-white { color: var(--fecod-white) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-black { background: var(--fecod-black) !important; }
.bg-dark { background: var(--fecod-blue-dark) !important; }
.bg-red { background: var(--fecod-red) !important; }

.font-display { font-family: var(--font-display) !important; }
.font-body { font-family: var(--font-body) !important; }

.uppercase { text-transform: uppercase !important; }
.tracking-wide { letter-spacing: 0.05em !important; }

/* ==========================
   ANIMACIONES
   ========================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 90, 154, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(30, 90, 154, 0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-pulse-red {
  animation: pulse-red 2s infinite;
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 768px) {
  .section {
    padding: 40px 0;
  }
  
  .card, .panel {
    padding: 15px;
  }
  
  th, td {
    padding: 10px;
    font-size: 0.9rem;
  }
}
