/* VARIABLES Y ESTILOS BASE */
:root {
  --primary: #0A0838;
  --secondary: #020E8C;
  --accent: #FFCB03;
  --accent-dark: #FBB81A;
  --light: #f8f9fa;
  --dark: #212529;
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --shadow: 0 15px 30px rgba(10, 8, 56, 0.1);
  --shadow-hover: 0 20px 40px rgba(10, 8, 56, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
  background-color: #fff;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* PRELOADER */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.preloader-inner {
  text-align: center;
}

.preloader-icon {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.preloader-icon span {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.preloader-icon span:nth-child(1) {
  left: 8px;
  animation: preloader1 0.6s infinite;
}

.preloader-icon span:nth-child(2) {
  left: 8px;
  animation: preloader2 0.6s infinite;
}

.preloader-icon span:nth-child(3) {
  left: 32px;
  animation: preloader2 0.6s infinite;
}

.preloader-icon span:nth-child(4) {
  left: 56px;
  animation: preloader3 0.6s infinite;
}

.preloader p {
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
}

@keyframes preloader1 {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes preloader3 {
  0% { transform: scale(1); }
  100% { transform: scale(0); }
}

@keyframes preloader2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(24px, 0); }
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: all 0.4s ease;
  background: var(--primary);
}

.header.scrolled {
  background: rgba(10, 8, 56, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 1rem 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  width: 50px;
  height: auto;
  transition: var(--transition);
  cursor: pointer;
}

.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: white;
  margin-left: 0.8rem;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
}

.header.scrolled .logo-text {
  opacity: 1;
  transform: translateX(0);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-link {
  margin: 0 1.2rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-link.active {
  color: var(--accent);
}

.link-icon {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.link-text {
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-link:hover:after,
.nav-link.active:after {
  width: 100%;
}

.nav-link:hover .link-icon {
  transform: translateY(-5px);
}

.nav-link:hover .link-text {
  transform: translateY(5px);
}

.btn-nav {
  padding: 0.8rem 1.8rem;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 2rem;
  text-decoration: none;
}

.btn-nav:hover {
  background: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.hamburger {
  display: none;
  width: 30px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* HERO GALLERY */
.hero-gallery {
  position: relative;
  height: 60vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  margin-top: 80px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../public/img/foto1.png') center/cover no-repeat;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  width: 100%;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.hero-subtitle {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.divider {
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 2px;
}

/* GALLERY SECTION */
.gallery-section {
  padding: 6rem 0;
}

.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.7rem 2rem;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--primary);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.gallery-img-container {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.gallery-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem 1.5rem;
  background: linear-gradient(to top, rgba(10, 8, 56, 0.9), transparent);
  color: white;
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.gallery-overlay p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.view-btn {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 45px;
  height: 45px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
}

.view-btn:hover {
  background: white;
  transform: scale(1.1) rotate(10deg);
}

/* 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: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.5rem;
  backdrop-filter: blur(5px);
}

.nav-btn:hover {
  background: var(--accent);
  color: var(--primary);
}

.prev-btn {
  left: 2rem;
}

.next-btn {
  right: 2rem;
}

/* FOOTER */
.footer {
  background: var(--primary);
  color: white;
  padding: 5rem 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer-col h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent);
}

.footer-logo {
  width: 140px;
  margin-bottom: 1.5rem;
}

.footer-col p {
  margin-bottom: 1.5rem;
  opacity: 0.8;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
  text-decoration: none;
}

.social-link:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-3px);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 1rem;
}

.footer-col a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  opacity: 0.8;
}

.footer-col a:hover {
  color: var(--accent);
  opacity: 1;
  transform: translateX(5px);
}

.footer-col a i {
  margin-right: 0.8rem;
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 992px) {
  .hero-gallery {
    height: 50vh;
    min-height: 400px;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    margin: 1rem 0;
    font-size: 1.1rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .btn-nav {
    margin-left: 0;
    margin-top: 2rem;
  }
  
  .hero-gallery {
    margin-top: 70px;
    height: 40vh;
    min-height: 350px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .gallery-section {
    padding: 4rem 0;
  }
}

@media (max-width: 576px) {
  .hero-gallery {
    height: 35vh;
    min-height: 300px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-img-container {
    height: 240px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}