/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background-color: #ffffff;
  color: #333333;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Contenedor general */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2em 0;
}

/* HEADER + NAVIGATION */
.header {
  position: sticky;
  top: 0;
  background: #004080;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 0;
}

.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav {
  /* oculto por defecto en móviles */
}

.nav ul {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav ul li {
  margin-left: 1.5em;
}

.nav ul li a, .nav ul li button {
  color: white;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Toggle (hamburguesa) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: white;
  height: 3px;
  width: 25px;
  border-radius: 3px;
  position: relative;
}

.nav-toggle-label span::before {
  content: "";
  position: absolute;
  top: -8px;
}

.nav-toggle-label span::after {
  content: "";
  position: absolute;
  top: 8px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .nav-toggle-label {
    display: block;
  }

  .nav {
    position: absolute;
    width: 100%;
    left: 0;
    top: 100%;
    background: #004080;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
  }

  .nav ul {
    flex-direction: column;
    padding: 1em;
  }

  .nav ul li {
    margin: 0.8em 0;
  }

  .nav-toggle:checked ~ .nav {
    max-height: 300px;
  }
}

/* HERO */
.hero {
  background: url('https://via.placeholder.com/1920x800') center/cover no-repeat;
  min-height: 60vh;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1em;
}

.btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.btn-primary {
  background: #0066cc;
  color: white;
}

.btn-primary:hover {
  background: #0055aa;
}

/* SECCIONES */
.section {
  padding: 4em 0;
}

.bg-light {
  background-color: #f9f9f9;
}

/* Oferta Académica */
.academica-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
}

.card {
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 2em;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* Noticias */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2em;
}

.noticia-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.noticia-card .card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.noticia-card .card-content {
  padding: 1.5em;
  background: white;
  flex-grow: 1;
}

.noticia-card .card-content h3 {
  margin-bottom: 0.5em;
}

.noticia-card .card-content a {
  color: #0066cc;
  font-weight: bold;
  margin-top: 1em;
  display: inline-block;
}

/* Galería */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1em;
}

.galeria-item {
  overflow: hidden;
  border-radius: 8px;
}

.galeria-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

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

/* Formulario de contacto */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5em;
}

.form-group label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

.contact-form .btn {
  margin-top: 1em;
}

/* FOOTER */
.footer {
  color: white;
  padding: 2em 0;
  text-align: center;
}

.footer-links {
  margin-top: 1em;
}

.footer-links a {
  margin: 0 0.5em;
  color: #cccccc;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}
