/* Paleta de colores: Horizonte Común */
:root {
  --azul-solidario: #1976d2;         /* Confianza, colaboración */
  --verde-comunitario: #90BE6D;      /* Comunidad, sostenibilidad */
  --terracota-suave: #E76F51;        /* Trabajo, cercanía */
  --gris-fondo: #F1FAEE;             /* Claridad, base neutra */
  --gris-texto: #343a40;             /* Texto principal */
  --gris-suave: #e5e5e5;             /* Líneas, bordes suaves */
  --grafito: #264653;                /* Contraste, estructura */
}

/* Estilos generales y reset */
body {
  background-color: var(--gris-fondo);
  color: var(--gris-texto);
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Componentes reutilizables */
.card {
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: none;
  background: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-header {
  background-color: var(--grafito);
  color: white;
  padding: 1rem;
  border-radius: 10px 10px 0 0;
}

.card-body {
  padding: 1.5rem;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--azul-solidario);
  color: white;
}

.btn-accent {
  background-color: var(--terracota-suave);
  color: white;
}

.btn-success {
  background-color: var(--verde-comunitario);
  color: var(--gris-texto);
}

/* Navbar */
.navbar {
  background-color: var(--azul-solidario) !important;
}

/* Imágenes */
.img-adaptable {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.integrante-photo {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.integrante-photo:hover {
  transform: scale(1.05);
}

.noticia-imagen {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}

.noticia-imagen-expandida {
  height: 300px;
}

/* Formularios */
.form-control {
  border-radius: 8px;
  padding: 10px 15px;
  border: 1px solid var(--gris-suave);
  width: 100%;
  margin-bottom: 1rem;
}

/* Alertas */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: var(--verde-comunitario);
  color: white;
}

.alert-info {
  background-color: var(--azul-solidario);
  color: white;
}

.alert-warning {
  background-color: var(--terracota-suave);
  color: white;
}

/* Footer */
footer {
  background-color: var(--azul-solidario) !important;
  color: white !important;
  padding: 2rem 0;
}

/* Página Noticias */
.noticia-contenedor-imagen {
  overflow: hidden;
  position: relative;
}

.noticia-badge {
  background-color: var(--terracota-suave);
  font-size: 0.8rem;
  font-weight: normal;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.noticia-titulo {
  color: var(--azul-solidario);
  transition: color 0.3s;
  cursor: pointer;
}

.noticia-titulo:hover {
  color: var(--terracota-suave);
  text-decoration: none;
}

/* Panel de administración */
.admin-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--grafito);
  color: white;
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: #bdc3c7;
  text-decoration: none;
  border-radius: 5px;
  margin-bottom: 5px;
  transition: all 0.3s;
}

.admin-menu li a:hover,
.admin-menu li.active a {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-main {
  padding: 30px;
  background: #f5f7fa;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 992px) {
  .admin-container {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .noticia-imagen {
    height: 150px;
  }

  .noticia-contenedor-imagen {
    max-height: 150px;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .card {
    margin-bottom: 1rem;
  }
}

/* Enlaces activos y navbar */
.navbar-dark .navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  position: relative;
  font-weight: bold;
}

.navbar-dark .navbar-nav .nav-link.active:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10%;
  width: 80%;
  height: 3px;
  background-color: var(--terracota-suave);
  border-radius: 3px;
}

.navbar-dark .navbar-nav .nav-link:hover {
  opacity: 0.9;
}

.proyecto-card .card-body {
    padding: 1.25rem;
}

.proyecto-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--gris-suave);
}

.equipo-card {
    transition: all 0.3s ease;
    border: 1px solid var(--gris-suave);
}

.equipo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .integrante-photo {
        width: 120px !important;
        height: 120px !important;
    }
    
    .proyecto-card {
        margin-bottom: 1.5rem;
    }
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}