:root {
  --primary: #0a57ff;
  --secondary: #0053b3;
  --text: #333;
  --bg: #f9fafc;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;

  --brand:#3b82f6;
  --brand2:#319609;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background-color: #f8fafc; /* color base suave */
  background-image:
    radial-gradient(1200px 800px at 10% -10%, rgba(59,130,246,0.12), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, rgba(245,158,11,0.12), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}


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

header.navbar {
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 52px;
  height: 52px;
}

.brand strong {
  font-size: 1.1rem;
  color: var(--secondary);
}

.brand span {
  display: block;
  font-size: 0.85rem;
  color: #666;
}

nav a {
  margin-left: 18px;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

.container {
  width: 80%;
  max-width: none;
  padding: 40px 6%;
  margin: auto;
}


.section-title {
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 24px;
  border-left: 5px solid var(--primary);
  padding-left: 10px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  margin-right: 10px;
  transition: var(--transition);
  font-weight: 500;
  text-decoration: none;
}

.btn.primary {
  background-color: var(--primary);
  color: white;
}

.btn.primary:hover {
  background-color: var(--secondary);
}

.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#ffffff;font-weight:700}

.btn:hover {
  opacity: 0.9;
}

.grid {
  display: grid;
  gap: 20px;
}

.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: white;
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h4 {
  color: var(--secondary);
  margin-bottom: 8px;
}

.card p.meta {
  color: #666;
  font-size: 0.9rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.gallery img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.gallery img:hover {
  transform: scale(1.03);
}

footer {
  flex-shrink: 0;
  width: 100%;
  background: #f1f3f6;
  color: #333;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
  z-index: 5;
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 10px;
  }

  nav a {
    margin: 0 10px;
    display: inline-block;
  }

  .hero {
    text-align: center;
  }

  .hero-image {
    max-width: 100%;
  }
}

.view {
  display: none;
  width: 100%;
}
.view.active {
  display: block;
}

#noticiasWrap .card img,
#eventosWrap .card img {
  width: 100%;
  height: 180px;
  object-fit: cover; 
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

#noticiasWrap .card h4,
#eventosWrap .card h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--secondary);
}

#noticiasWrap .card p,
#eventosWrap .card p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 6px;
}

#noticiasWrap .card p.meta,
#eventosWrap .card p.meta {
  color: #777;
  font-size: 0.85rem;
}

#noticiasWrap .card img,
#eventosWrap .card img {
  width: 100%;
  height: 160px;
  object-fit: contain; 
  background-color: #f3f4f6; 
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main.container {
  flex: 1;
  display: block;
  padding-bottom: 60px; /* respiro visual antes del footer */
}

.hero-image {
  width: 100%;
  max-height: 480px;           
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.hero {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: 12px;
  overflow: hidden;
  margin: 100px auto 50px auto; 
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slider img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slider img.active {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(0, 64, 128, 0.25),
    rgba(0, 64, 128, 0.25)
  );
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 40px; 
  left: 60px;
  z-index: 2;
  color: #002b5b;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 25px 35px;
  max-width: 600px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .hero {
    height: 320px;
    margin-top: 80px;
  }
  .hero-content {
    position: relative;
    bottom: auto;
    left: auto;
    margin: 15px;
    text-align: center;
  }
}

.mapa {
    margin-top: 20px;
}

.grid.cols-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}

.grid.cols-2 .card {
  background: #fff;
  border-radius: 10px;
  padding: 25px 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  line-height: 1.6;
  color: #333;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #004aad;
  border-left: 6px solid #004aad;
  padding-left: 10px;
  margin-bottom: 25px;
}

aside.card h4 {
  font-size: 1.2rem;
  color: #004aad;
  margin-bottom: 10px;
}

aside.card ul.meta {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
}

aside.card ul.meta li {
  margin-bottom: 5px;
}

.accordion-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.acc-head {
  background: #f4f6fb;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #004aad;
  transition: background 0.3s ease;
}

.acc-head:hover {
  background: #e8eefb;
}

.acc-body {
  padding: 10px 14px;
  display: none;
  color: #333;
  background: #fff;
  line-height: 1.5;
}

.accordion-item.active .acc-body {
  display: block;
}

@media (max-width: 768px) {
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

.more-text { 
    line-height: 3;
}

#detalle-noticia {
  margin-top: 40px;
}

.detalle-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.detalle-card h2 {
  color: #004aad;
  margin-bottom: 15px;
}

.detalle-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.detalle-card p {
  line-height: 1.7;
  color: #333;
}

.volver-btn {
  background: none;
  border: none;
  color: #004aad;
  font-weight: bold;
  margin-bottom: 15px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.volver-btn:hover {
  color: #002b5b;
}

.noticia {
    cursor: pointer;
}

.cta {
    margin-top: 20px;
}

.home-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}

.home-main {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.home-aside {
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.home-aside h3 {
  margin-bottom: 15px;
  border-bottom: 1px solid #319609;
  padding-bottom: 8px;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.event-list li {
  margin-bottom: 12px;
  padding: 10px;
  /* border-radius: 8px; */
  border-bottom: 1px solid rgba(173, 173, 173, 0.664);
  transition: background 0.3s ease;
}

.event-list li:hover {
  background: rgba(255,255,255,0.2);
}

.event-list span {
  font-size: 0.9rem;
  opacity: 0.9;
}

.btn-small {
  display: inline-block;
  padding: 8px 14px;
  /* background: #fff; */
  /* color: #004aad; */
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#ffffff;font-weight:700
}


/* Responsive */
@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-aside {
    margin-top: 20px;
  }
}


.event-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.event-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.event-info {
  flex: 1;
}

.event-info h4 {
  margin: 0 0 4px;
  color: #0a49a7;
  font-weight: 600;
}

.event-info .meta {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 6px;
}