/* =========================
   SIDEBAR
========================= */

.sidebar {
  background-color: #305466;
  color: #ddba81;
}

/* =========================
   LOGO / ISOLOGO
========================= */

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.logo a {
  display: block;
}

.logo img {
  height: auto;
  display: block;
}

/* LOGOTIPO (expandido) */
.logo-full {
  width: 160px;
}

/* ISOLOGO (colapsado) */
.logo-iso {
  display: none;
  width: 40px;
}

/* Estados */
.sidebar.collapsed .logo-full {
  display: none;
}

.sidebar.collapsed .logo-iso {
  display: block;
}

/* =========================
   BOTÓN TOGGLE (ISOLOGO)
========================= */

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
}

/* El botón usa el isologo */
.sidebar-toggle img {
  width: 32px;
  height: auto;
  display: none;
}

/* Mostrar isologo SOLO al colapsar */
.sidebar.collapsed .sidebar-toggle img {
  display: block;
}

/* =========================
   NAVEGACIÓN
========================= */

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  padding: 0;
}

nav a {
  font-size: 0.9rem;
  color: #ddba81;
  text-decoration: none;
  display: block;
  padding: 12px 16px;
  white-space: nowrap;
  transition: opacity 0.25s ease, color 0.25s ease;
}

nav a:hover,
nav a.active {
  color: #ffffff;
}

/* Ocultar texto al colapsar */
.sidebar.collapsed nav a {
  opacity: 0;
  pointer-events: none;
}

/* =========================
   FOOTER
========================= */

footer {
  padding: var(--space-lg);
  background: #f7f7f7;
}

.footer-info {
  font-size: 0.85rem;
  color: var(--color-text);
}

/* =========================
   HERO TEXTO
========================= */

.hero-text h1 {
  font-size: 3.2rem;
  color: #ddba81;
}

.hero-text p {
  font-size: 1.1rem;
  margin-top: 12px;
  color: #305466;
}

/* =========================
   HERO IMAGEN
========================= */

.hero-image {
  display: flex;
  align-items: flex-end;
}

.hero-image img {
  height: 85vh;
  /* controla el tamaño real */
  max-height: 900px;
  /* evita que se vuelva exagerada */
  width: auto;
  object-fit: contain;
}


/* =========================
   ANIMACIÓN HERO
========================= */

.hero-text,
.hero-image {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.9s ease forwards;
}

.hero-image {
  animation-delay: 0.2s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-video {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
}

.about-video iframe {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.timeline-section {
  padding: 120px 0;
}

.timeline {
  position: relative;
  margin-top: 80px;
  padding-left: 72px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: rgba(221, 186, 129, 0.4);
}

.timeline-item {
  position: relative;
  margin-bottom: 64px;
}

.timeline-dot {
  position: absolute;
  left: 18px;
  top: 6px;
  width: 14px;
  height: 14px;
  background-color: #ddba81;
  border-radius: 50%;
}

.timeline-content {
  padding-left: 32px;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #305466;
}

.timeline-content p {
  max-width: 560px;
  line-height: 1.75;
  color: #2b2b2b;
}

/* =========================
   TIMELINE LAYOUT (TEXTO + CV)
========================= */

.timeline-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: stretch;
}

/* Columna texto */
.timeline-text {
  position: relative;
}

/* Columna CV */
.timeline-media {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-media img {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

/* =========================
   BOTÓN CV
========================= */

.cv-button {
  margin-top: 24px;
  padding: 12px 48px;
  border: 1px solid #ddba81;
  color: #ddba81;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.cv-button:hover {
  background-color: #ddba81;
  color: #305466;
}

/* =========================
   LOGOTIPOS – HOME
========================= */

.portfolio-section {
  padding: 120px 0;
}

.portfolio-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

/* TEXTO */
.portfolio-info h2 {
  color: #ddba81;
  margin-bottom: 24px;
}

.portfolio-description {
  color: #2b2b2b;
  line-height: 1.8;
  max-width: 420px;
  margin-bottom: 40px;
}

/* BOTÓN */
.btn-portfolio {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid #305466;
  color: #305466;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-portfolio:hover {
  background: #305466;
  color: #ffffff;
}

/* GALERÍA */
.portfolio-gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.portfolio-gallery img {
  width: 100%;
  display: block;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease;
  cursor: pointer;
  /* Pointer to indicate clickable */
}

/* EFECTO DESACOMODADO - SOLO EN HOME (2 columnas) */
.portfolio-gallery.staggered img:nth-child(1) {
  transform: translateY(-20px);
}

.portfolio-gallery.staggered img:nth-child(2) {
  transform: translateY(10px);
}

.portfolio-gallery.staggered img:nth-child(3) {
  transform: translateY(30px);
}

.portfolio-gallery.staggered img:nth-child(4) {
  transform: translateY(-10px);
}

.portfolio-gallery img:hover {
  transform: translateY(0) scale(1.02);
}

/* =========================
   PORTFOLIO – BRANDING RRSS
========================= */

.portfolio.branding {
  padding: 140px 0;
}

.portfolio.branding h2 {
  color: #ddba81;
  margin-bottom: 32px;
}

/* Layout general */
.portfolio.branding .grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

/* Texto izquierda */
.portfolio.branding .portfolio-text p {
  max-width: 460px;
  line-height: 1.8;
  color: #2b2b2b;
  margin-bottom: 32px;
}

/* Botón */
.portfolio.branding .portfolio-text a {
  display: inline-block;
  padding: 14px 36px;
  border: 1px solid #ddba81;
  color: #ddba81;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
}

.portfolio.branding .portfolio-text a:hover {
  background-color: #ddba81;
  color: #305466;
}

/* Galería derecha */
.portfolio.branding .portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.portfolio.branding .portfolio-gallery img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portfolio.branding .portfolio-gallery img:nth-child(odd) {
  transform: translateY(-20px);
}

.portfolio.branding .portfolio-gallery img:hover {
  transform: scale(1.04);
}

/* =========================
   LIGHTBOX 
========================= */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(48, 84, 102, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

/* =========================
   RESPONSIVE COMPONENTS (MOBILE)
========================= */

@media (max-width: 768px) {

  /* HEADER / TOGGLE */
  .sidebar-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1001;
    /* Above everything */
  }

  .sidebar-toggle img {
    display: block;
    /* Force visible on mobile */
  }

  .logo {
    justify-content: flex-start;
    padding-left: 24px;
  }

  /* LOGO SIZING */
  .logo-full {
    width: 120px;
  }

  /* NAVIGATION */
  nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  /* When "collapsed" (aka OPEN on mobile), show nav */
  .sidebar.collapsed nav {
    opacity: 1;
    pointer-events: auto;
  }

  /* FORCE LINKS VISIBLE */
  .sidebar.collapsed nav a {
    opacity: 1;
    pointer-events: auto;
  }

  nav ul {
    margin-top: 0;
    align-items: center;
    gap: 32px;
  }

  nav a {
    font-size: 1.2rem;
    padding: 16px;
  }

  /* TIMELINE */
  .timeline-layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .timeline {
    padding-left: 0;
    border-left: none;
    margin-top: 40px;
  }

  .timeline::before {
    display: none;
    /* Remove vertical line if desired, or keep it */
  }

  /* Adjusted Timeline Item for mobile */
  .timeline-item {
    padding-left: 20px;
    border-left: 2px solid rgba(221, 186, 129, 0.4);
    margin-left: 10px;
  }

  .timeline-dot {
    left: -8px;
    /* Align dot with new border */
  }

  /* GALLERIES (1 COLUMN) */
  .portfolio-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .portfolio-gallery {
    grid-template-columns: 1fr;
  }

  .portfolio.branding .grid {
    grid-template-columns: 1fr;
  }

  .portfolio.branding .portfolio-gallery {
    grid-template-columns: 1fr;
  }

  /* Stagger effect disable on mobile */
  .portfolio-gallery.staggered img {
    transform: none !important;
  }

  /* TEXT SIZES */
  .hero-text h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}