* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

:root{
  --bg:#1b1b1b;
  --surface:#2a2a2a;
  --text:#f5f5f5;
  --text-secondary:#cfcfcf;
  --border:#444;
  --nav:rgba(25,25,25,.85);
  --hover:#333;
}

body.light{
  --bg:#f5f3ef;
  --surface:#ffffff;
  --text:#222;
  --text-secondary:#666;
  --border:#ddd;
  --nav:rgba(255,255,255,.85);
  --hover:#f2f2f2;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Arial,sans-serif;
  transition:.3s;
}

/* 🔥 CRÍTICO */
.hidden {
  display: none !important;
}

/* NAV */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  z-index: 100;
}

nav {
  background:var(--nav);
  backdrop-filter: blur(15px);
  border-radius: 35px;
  padding: 18px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav a {
  text-decoration: none;
  color:var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* HERO */
.hero {
  height: 100vh;
  background:
    linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
    url("../images/cover.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0 0 70px 70px;
}

.hero h1 {
  color: white;
  font-size: 70px;
}

.btn {
  display: inline-block;
  margin-top: 30px;
  padding: 15px 45px;
  border-radius: 50px;
  border: 1px solid white;
  color: white;
  text-decoration: none;
}

/* SECTION */
section {
  max-width: 1200px;
  margin: auto;
  padding: 100px 20px;
}

section h2 {
  text-align: center;
  font-size: 42px;
  margin-bottom: 60px;
}

/* CARDS */
.events-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 30px;
}

.gallery-card {
  background:var(--surface);
  border-radius: 30px;
  overflow: hidden;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

.gallery-card:hover {
  transform: translateY(-10px) scale(1.03);
}



.gallery-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}


@media(max-width:768px){
  .gallery-card img {
    height: 300px;
  }
}

@media(max-width:500px){
  .gallery-card img {
    height: 220px;
  }
}



.card-info {
  padding: 20px;
  text-align: center;
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background:var(--bg);
  width: 90%;
  max-width: 1200px;
  height: 90%;
  border-radius: 30px;
  padding: 30px;
  overflow-y: auto;
  color:var(--text);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.close-btn {
  font-size: 28px;
  cursor: pointer;
}

/* 🎯 MASONRY */
.masonry {
  column-count: 3;
  column-gap: 15px;
}

.masonry img {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 15px;
  cursor: pointer;
  transition: .3s;
}

.masonry img:hover {
  transform: scale(1.03);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: white;
  cursor: pointer;
  padding: 20px;
}

.prev { left: 20px; }
.next { right: 20px; }

/* EVENTS */
.event-card {
  min-height: 400px;
  border-radius: 40px;
  background:
    linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
    url("../images/photo.avif");
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.event-content {
  color: white;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 50px;
  color:var(--text-secondary);
}

/* RESPONSIVE */
@media(max-width:900px){
  .hero h1 { font-size: 40px; }
  .masonry { column-count: 2; }
}

@media(max-width:500px){
  .masonry { column-count: 1; }
}

.event-btn { display: inline-block; background: white; color: #222; padding: 15px 40px; border-radius: 50px; text-decoration: none; }

/* DROPDOWN */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 15px;
  padding: 10px 0;
  display: none;
  flex-direction: column;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

.dropdown-menu li {
  padding: 10px 20px;
}

.dropdown-menu li a {
  display: block;
  color: #222;
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

/* ABOUT */
.about-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
}

.about-text p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.about-img img {
  width: 100%;
  border-radius: 30px;
  object-fit: cover;
}

/* Responsive */
@media(max-width:900px){
  .about-container {
    grid-template-columns: 1fr;
  }
}

.calendar-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
  height: 100%;
}

.calendar-panel {
  background: white;
  border-radius: 20px;
  padding: 20px;
}

.images-panel {
  overflow-y: auto;
}

/* CALENDAR */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.calendar-day {
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
}

.calendar-day:hover {
  background: #eee;
}

.has-event {
  background: #222;
  color: white;
  font-weight: bold;
}

.selected-day {
  background: #ff5c5c;
  color: white;
}

/* RESPONSIVE */
@media(max-width:900px){
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* MOBILE NAV */
@media(max-width:768px){
  nav ul {
    position: absolute;
    top: 80px;
    right: 0;
    background: white;
    flex-direction: column;
    width: 200px;
    padding: 20px;
    border-radius: 15px;
    display: none;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}


@media(max-width:768px){
  nav ul {
    position: absolute;
    top: 80px;
    right: 0;
    background: white;
    flex-direction: column;
    width: 200px;
    padding: 20px;
    border-radius: 15px;
    display: none;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ================= HERO ================= */
@media(max-width:768px){
  .hero h1 {
    font-size: 32px;
  }
}

/* ================= SECTIONS ================= */
@media(max-width:768px){
  section {
    padding: 60px 15px;
  }

  section h2 {
    font-size: 28px;
  }
}


@media(max-width:500px){
  .gallery-card img {
    height: 220px;
  }
}

/* ================= MODAL ================= */
@media(max-width:768px){
  .modal-content {
    width: 95%;
    height: 95%;
    padding: 15px;
  }
}

/* ================= ANIMACIONES ================= */
.hidden-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= SCROLL BLOQUEADO ================= */
.modal-open {
  overflow: hidden;
}

nav ul li {
  width: 100%;
}

nav ul li a {
  display: block;
  width: 100%;
  padding: 12px 15px;
}


@media(max-width:768px){
  .dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
  }

  .dropdown.open .dropdown-menu {
    display: flex;
  }
}

nav ul li:hover {
  border-radius: 10px;
  background:var(--hover);
}

.social-section {
  text-align: center;
  padding: 120px 20px;
}

.social-container {
  max-width: 600px;
  margin: auto;
}

/* Título */
.social-section h2 {
  font-size: 40px;
  margin-bottom: 40px;
}

/* Botones */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.social-btn {
  padding: 12px 30px;
  border-radius: 50px;
  border:1px solid var(--text);
  text-decoration: none;
  color:var(--text);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .3s ease;
}

.social-btn:hover {
  background:var(--text);
  color:var(--bg);
  transform: translateY(-3px);
}

/* Contacto */
.contact p {
  margin-bottom: 8px;
  font-size: 14px;
  color: #777;
  color:var(--text-secondary);
}

.contact a {
  font-size: 16px;
  text-decoration: none;
  color:var(--text);
  font-weight: bold;
  transition: .3s;
}

.contact a:hover {
  opacity: 0.6;
}

.theme-toggle{
    background:none;
    border:none;
    color:var(--text);
    font-size:24px;
    cursor:pointer;
    margin-left:20px;
    transition:.3s;
}

.theme-toggle:hover{
    transform:rotate(20deg) scale(1.1);
}

@media(max-width:768px){

    nav{
        position:relative;
    }

    .theme-toggle{
        margin-left:auto;
        margin-right:15px;
    }

}

.page-content{
    max-width:900px;
    margin:150px auto 80px;
    padding:0 20px;
}

.page-header{
    margin-bottom:40px;
}

.page-title{
    text-align:center;
    font-size:48px;
    margin-bottom:20px;
}

.page-body{
    line-height:1.8;
    font-size:18px;
}

.page-body img{
    max-width:100%;
    height:auto;
    border-radius:20px;
}