/* ========================================
   RESET Y ESTILOS GLOBALES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1e40af;
  --secondary-color: #3b82f6;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   NAVEGACIÓN
   ======================================== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.2),
              0 4px 8px -2px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.nav-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  background-size: 200% auto;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.nav-logo h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.nav-logo .subtitle {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-logo:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.2),
              0 6px 12px -2px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.nav-logo:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 1200px) {
  .nav-logo h2 {
    font-size: 1.4rem;
  }
  .nav-logo .subtitle {
    font-size: 0.65rem;
  }
}

@media (max-width: 992px) {
  .nav-logo {
    padding: 10px 16px;
    margin-right: auto;
    margin-left: 15px;
    border-radius: 12px;
  }
  
  .nav-logo h2 {
    font-size: 1.3rem;
  }
  
  .nav-logo .subtitle {
    font-size: 0.6rem;
  }
}

@media (max-width: 768px) {
  .nav-logo {
    padding: 8px 14px;
    margin-left: 0;
    border-radius: 10px;
  }
  
  .nav-logo h2 {
    font-size: 1.2rem;
  }
  
  .nav-logo .subtitle {
    font-size: 0.55rem;
  }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.btn-admin-nav {
  background: var(--primary-color);
  color: var(--white) !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 8px;
  border: none !important;
}

.btn-admin-nav:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  height: 600px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 1s ease;
}

.hero-btn {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  animation: fadeInUp 1.2s ease;
}

.hero-btn:hover {
  background: #d97706;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
  padding: 4rem 0 2rem;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   CAREERS SECTION
   ======================================== */
.careers-section {
  padding: 3rem 0 5rem;
  background: var(--bg-light);
}

.careers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.career-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid transparent;
}

.career-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.career-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.career-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.career-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.career-highlights {
  list-style: none;
  margin-bottom: 1.5rem;
}

.career-highlights li {
  color: var(--text-dark);
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.career-btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
  text-align: center;
}

.career-btn:hover {
  background: var(--secondary-color);
  transform: translateX(5px);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.cta-section .container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
}

.cta-text {
  font-size: 1.25rem;
  margin: 0 auto 2.5rem;
  opacity: 0.95;
  line-height: 1.6;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.95);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
  background: #d97706;
}

.cta-btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
  box-shadow: none;
}

.cta-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .cta-title {
    font-size: 2rem;
  }
  
  .cta-text {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0 1rem;
  }
  
  .cta-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
  }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: #1f2937;
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section p {
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #d1d5db;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
}

/* ========================================
   PÁGINAS DE CARRERAS
   ======================================== */
.career-page {
  padding: 2rem 0;
}

.page-header {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.2rem;
  opacity: 0.95;
}

.back-btn {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #1e3a8a;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  min-width: 120px;
  text-align: center;
}

.back-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e3a8a;
  transform: translateY(calc(-50% - 2px));
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.back-btn:active {
  transform: translateY(calc(-50% + 1px));
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.course {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.course h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.trimester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.trimester-card {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.trimester-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.trimester-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.trimester-card ul {
  list-style: none;
}

.trimester-card ul li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-dark);
}

.trimester-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* ========================================
   GALERÍA DE MEDIOS
   ======================================== */
.galeria {
  padding: 3rem 0;
  background: var(--bg-light);
}

.galeria h2 {
  text-align: center;
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 2rem;
}

.media-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--primary-color);
  color: var(--white);
}

.media-container {
  column-count: 3;
  column-gap: 1rem;
}

.media-card {
  background: var(--white);
  border-radius: 12px;
  padding: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  break-inside: avoid;
  transition: var(--transition);
}

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

.media-card img,
.media-card video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  cursor: pointer;
}

.media-caption {
  padding: 0.7rem;
}

.media-caption h4 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  color: var(--primary-color);
}

.media-caption p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ========================================
   ADMIN STYLES
   ======================================== */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--white);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.admin-thumb {
  width: 140px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.admin-info {
  flex: 1;
}

.admin-info h4 {
  margin: 0 0 0.3rem 0;
  color: var(--primary-color);
}

.admin-info p {
  margin: 0 0 0.3rem 0;
  color: var(--text-dark);
}

.admin-info small {
  color: var(--text-light);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-delete {
  background: #ef4444;
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-delete:hover {
  background: #dc2626;
}

/* ========================================
   MODAL LIGHTBOX
   ======================================== */
.media-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.media-modal-inner {
  max-width: 1100px;
  width: 100%;
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.media-modal-content {
  max-width: 65%;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.modal-info {
  flex: 1;
  color: var(--text-dark);
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: #ef4444;
  transform: rotate(90deg);
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1000px) {
  .media-container {
    column-count: 2;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .careers-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-lg);
    padding: 2rem 0;
    gap: 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    margin: 1rem 0;
  }
  
  .nav-link {
    display: block;
    padding: 1rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .careers-grid {
    grid-template-columns: 1fr;
  }
  
  .back-btn {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: inline-flex;
    margin: 0 0 1.5rem 0;
    width: auto;
  }
  
  .back-btn:hover {
    transform: translateY(-2px);
  }
  
  .back-btn:active {
    transform: translateY(1px);
  }
  
  .trimester-grid {
    grid-template-columns: 1fr;
  }
  
  .media-modal-inner {
    flex-direction: column;
  }
  
  .media-modal-content {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .media-container {
    column-count: 1;
  }
  
  .hero {
    height: 400px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   BOTONES
   ======================================== */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.2);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transition: all 0.4s ease;
  z-index: -1;
  border-radius: 50px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover::before {
  width: 100%;
}

/* Ajuste para los botones dentro de las tarjetas */
.career-card .btn-primary {
  margin-top: 1rem;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Flecha para el hover */
.career-card .btn-primary::after {
  content: '→';
  display: inline-block;
  transition: transform 0.3s ease;
  opacity: 0.9;
}

.career-card .btn-primary:hover::after {
  transform: translateX(5px);
}

/* ========================================
   UTILIDADES
   ======================================== */
.muted {
  color: var(--text-light);
  font-style: italic;
}

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