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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 20px;
  z-index: 1000;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Menu links */
.nav-menu {
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
}

.nav-link:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

/* === Menu Icon === */
.menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 65px;
    right: 10px;
    width: 90%;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #0b0b0b 0%, #111133 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 20px 0;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-link {
    font-size: 16px;
    padding: 12px;
    width: 100%;
    text-align: center;
    border-radius: 8px;
  }

  .menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  .menu-icon.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
}
/* === Login Modal === */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(15px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-content {
  background: linear-gradient(135deg, rgba(15,15,25,0.95) 0%, rgba(20,10,40,0.95) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  padding: 40px 30px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
  position: relative;
  text-align: center;
}

.close-login {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}

.close-login:hover {
  color: #667eea;
  transform: scale(1.1);
}

.login-content h2 {
  margin-bottom: 25px;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-group {
  text-align: left;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  display: block;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(102,126,234,0.3);
  background: rgba(0,0,0,0.4);
  color: #fff;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus {
  border-color: #667eea;
  background: rgba(0,0,0,0.6);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102,126,234,0.4);
}

.register-text {
  margin-top: 15px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.register-text a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.register-text a:hover {
  color: #764ba2;
}

/* === Hero Section === */
.hero {
  margin-top: 20px;
  padding: 10px 10px;
  text-align: center;
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}


/* Gallery Section */
.gallery-section {
  padding: 20px 20px;
  margin-bottom: 60px;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  margin-bottom: 40px;
  text-align: center;
}

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

/* === NUEVO: Card Wrapper - Contenedor expandible === */
.card-wrapper {
  position: relative;
  transition: all 0.5s ease;
}

.card-wrapper.expanded {
  margin-bottom: 200px;
}

/* Gallery Item - Contenedor Padre */
.gallery-item {
  border: 5px outset #754fa7;
  position: relative;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.6) 0%, rgba(15, 15, 25, 0.7) 100%);
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-position: bottom;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.6) 0%, rgba(15, 15, 25, 0.7) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

/* === NUEVO: Conexión Visual - Box Shadow === */
.connection-line {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #764ba2 0%, rgba(118, 75, 162, 0.3) 100%);
  transform: translateX(-50%);
  opacity: 0;
  transition: all 0.5s ease;
  box-shadow: 0 0 20px rgba(118, 75, 162, 0.8);
}

.card-wrapper.expanded .connection-line {
  height: 40px;
  opacity: 1;
}

/* === NUEVO: Contenedores Hijos === */
.children-container {
  position: absolute;
  top: calc(100% + 40px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s ease 0.2s;
}

.card-wrapper.expanded .children-container {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.child-card {
  height: 150px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
  border: 3px outset #754fa7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 15px;
  text-align: center;
  box-shadow: 0px -22px 1660px 5px rgba(118, 75, 162, 0.504);  
}

.child-card:hover {
  transform: translateY(-5px) scale(1.05);
  background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
}

.child-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.child-card p {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* === NUEVO: Responsive para cards hijos === */
@media (max-width: 768px) {
  .children-container {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .card-wrapper.expanded {
    margin-bottom: 390px;
  }

  .child-card {
    height: 100px;
  }
}

/*VIDEO OCULTO */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.video-modal iframe {
  width: 100%;
  height: 100%;
  max-width: 544px;
  max-height: 960px;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  z-index: 2100;
}

/* === Modal Artículo === */
.article-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(15px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.article-content {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.2) 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  color: #fff;
  padding: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 25px rgba(102, 126, 234, 0.3);
  animation: fadeIn 0.3s ease;
}

.article-content img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 15px;
}

.article-content h2 {
  font-size: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.article-content p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.close-article {
  height: 56px;
  width: 45px;
  padding: 8px;
  border-radius: 5px;
  background-color: black;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: #ff3333;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
}

.close-article:hover {
  color: #ff5555;
  transform: scale(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === FOOTER === */
.footer {
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 100%);
  border-top: 2px solid rgba(102, 126, 234, 0.3);
  padding: 60px 20px 30px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #667eea;
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  border: 2px solid rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-bottom a:hover {
  color: #764ba2;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

/* === AD BLOCKS TIPO BANNER GRANDE === */
.ad-block {
  padding: 30px 20px;
  position: relative;
}

.ad-block-top {
  margin-top: 80px;
  background: transparent;
}

.ad-block-bottom {
  margin-top: 60px;
  margin-bottom: 40px;
  background: transparent;
}

.ad-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.ad-label {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 1px;
  z-index: 10;
}

.ad-content {
  border: 1px solid #101219;
  position: relative;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
  cursor: pointer;
}

.ad-content:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.5);
}

.ad-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: brightness(0.7);
}

.ad-content:hover .ad-image {
  transform: scale(1.1);
  filter: brightness(0.5);
}

.ad-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 60px;
  z-index: 5;
}

.ad-text h3 {
  font-size: 3.5rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease;
}

.ad-text p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 35px;
  line-height: 1.5;
  max-width: 700px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease;
}

.ad-button {
  display: inline-block;
  padding: 18px 50px;
  background: white;
  color: #764ba2;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: fadeInUp 1.2s ease;
}

.ad-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
  .ad-content {
    height: 350px;
  }

  .ad-text {
    padding: 40px 30px;
  }

  .ad-text h3 {
    font-size: 2.5rem;
  }

  .ad-text p {
    font-size: 1.2rem;
  }

  .ad-button {
    padding: 15px 40px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .ad-block-top {
    margin-top: 70px;
    padding: 20px 15px;
  }

  .ad-block-bottom {
    padding: 20px 15px;
  }

  .ad-content {
    height: 300px;
    border-radius: 15px;
  }

  .ad-text {
    padding: 30px 20px;
  }

  .ad-text h3 {
    font-size: 2rem;
  }

  .ad-text p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .ad-button {
    padding: 14px 35px;
    font-size: 0.95rem;
  }
}