/* ==========================
   🔹 RESET GENERAL
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', Arial, sans-serif;
}

/* ==========================
   🔹 BODY
========================== */
body {
  background-color: #111;
  color: #eee;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================
   🔹 NAVBAR
========================== */
.navbar {
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 15px 40px;
  top: 0;
  position: sticky; /* para mantenerlo fijo al scroll */
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(0,0,0,0.95);
  box-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

.navbar__logo img {
  width: 100px;
  max-width: 80px;
}

.navbar ul {
  list-style: none;
  display: flex;
  margin-left: auto;
  gap: 25px;
}

.navbar a {
  text-decoration: none;
  color: #fff;
  transition: 0.3s;
  font-weight: 500;
}

.navbar a:hover,
.navbar a.active {
  color: #888;
}

/* --- Toggle menú móvil --- */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.navbar__toggle .bar {
  width: 25px;
  height: 3px;
  background-color: #fff;
  border-radius: 3px;
  transition: 0.3s;
}

.navbar__toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}
.navbar__toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.navbar__toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* ==========================
   🔹 HERO / INDEX
========================== */
.hero {
  text-align: center;
  padding: 120px 20px;
  background: linear-gradient(to bottom, #000, #111);
}

.hero h2 {
  font-size: 2.4rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================
   🔹 PORTAFOLIO / GALERÍA
========================== */
.portafolio-page {
  flex: 1;
  text-align: center;
  padding: 70px 20px;
}

.portafolio-page h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #b9b9b9;
}

.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.galeria img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
  filter: brightness(0.95);
}

.galeria img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.7);
  filter: brightness(1.05) saturate(1.1);
}

/* ==========================
   🔹 FOOTER
========================== */
footer {
  background: linear-gradient(145deg, #111, #1a1a1a);
  color: #ccc;
  padding: 50px 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  gap: 30px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h4 {
  margin-bottom: 15px;
  font-size: 20px;
  color: #fff;
  border-bottom: 2px solid #555;
  padding-bottom: 5px;
}

.footer-section p, 
.footer-section a {
  font-size: 14px;
  color: #bbb;
  line-height: 1.6;
  text-decoration: none;
}

.footer-section a:hover {
  color: #00b894;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  color: #888;
  border-top: 1px solid #333;
  padding-top: 15px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-icons a {
  display: inline-block;
  transition: transform 0.3s, filter 0.3s;
}

.social-icons img {
  width: 35px;
  height: 35px;
  filter: grayscale(20%);
  border-radius: 50%;
}

.social-icons a:hover img {
  transform: scale(1.2);
  filter: grayscale(0%);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  animation: fadeIn 0.4s ease;
}

.lightbox .close, 
.lightbox .prev, 
.lightbox .next {
  position: absolute;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

.lightbox .close { top: 20px; right: 30px; }
.lightbox .prev { left: 30px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 30px; top: 50%; transform: translateY(-50%); }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================
   🔹 RESPONSIVE
========================== */
@media (max-width: 900px) {
  .navbar {
    padding: 15px 25px;
  }
  .navbar ul { gap: 15px; }
}

@media (max-width: 768px) {
  .navbar ul {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #222;
  }

  .navbar ul.active { display: flex; }

  .navbar__toggle { display: flex; }

  .hero { padding: 80px 20px; }
  .hero h2 { font-size: 1.8rem; }
  .portafolio-page h2 { font-size: 1.6rem; }
}