/* ========== VARIABLES CSS ========== */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --dark-bg: #212529;
  --light-bg: #f8f9fa;
  --font-primary: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

/* ========== ESTILOS GLOBALES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: #ffffff;
  color: #212529;
  line-height: 1.6;
  padding-top: 70px;
}

/* ========== TIPOGRAFÍA ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-title.text-start::after {
  left: 0;
  transform: none;
}

/* ========== HERO BANNER ========== */
.hero-section {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -70px;
}

.hero-section h1 {
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========== BARRA DE NAVEGACIÓN ========== */
.navbar {
  box-shadow: var(--shadow-md);
  padding: 0.8rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  transform: translateY(-2px);
}

/* ========== TARJETAS (CARDS) ========== */
.card {
  border: none;
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
}

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

.card-body {
  padding: 1.5rem;
}

/* ========== GALERÍA ========== */
.galeria-item {
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

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

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

.galeria-item figcaption {
  margin-top: 10px;
  font-weight: 500;
  color: var(--secondary-color);
}

/* ========== TABLA ========== */
.table {
  margin-bottom: 0;
}

.table thead th {
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.table tbody td,
.table tbody th {
  padding: 1rem;
  vertical-align: middle;
}

.table tfoot td {
  padding: 1rem;
  text-align: center;
}

/* ========== FORMULARIO ========== */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.is-invalid:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ========== FOOTER ========== */
footer {
  margin-top: auto;
}

footer a {
  transition: var(--transition);
}

footer a:hover {
  color: white !important;
  transform: translateX(3px);
}

/* ========== RESPONSIVE DESIGN ========== */
/* Tablets y dispositivos medianos */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  .hero-section {
    min-height: 300px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 1.2rem;
  }

  .table thead th,
  .table tbody td,
  .table tbody th {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .galeria-item img {
    height: 200px;
  }
}

/* Móviles pequeños */
@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .table {
    font-size: 0.75rem;
  }

  .table thead th,
  .table tbody td,
  .table tbody th {
    padding: 0.5rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .hero-section {
    min-height: 500px;
  }

  .hero-section h1 {
    font-size: 3.5rem;
  }
}

/* ========== UTILIDADES ========== */
.text-primary-custom {
  color: var(--primary-color);
}

.bg-primary-custom {
  background-color: var(--primary-color);
}

.cursor-pointer {
  cursor: pointer;
}

.rounded-12 {
  border-radius: 12px;
}

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

.card,
.galeria-item,
.hero-section {
  animation: fadeIn 0.6s ease-out;
}
