/* =========================
   LAYOUT GENERAL
========================= */

section {
  padding: var(--space-xl);
}

.container {
  max-width: 1100px;
  width: 100%;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
  width: 260px;
  background-color: #305466;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  transition: width 0.35s ease;
  overflow: hidden;
  z-index: 100;
}

/* SIDEBAR COLAPSADA */
.sidebar.collapsed {
  width: 90px;
}

/* =========================
   CONTENIDO PRINCIPAL
========================= */

.content {
  margin-left: 260px;
  transition: margin-left 0.35s ease;
}

/* cuando sidebar se colapsa */
.sidebar.collapsed~.content {
  margin-left: 90px;
}

/* =========================
   HERO
========================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  /* 👈 TODO ABAJO */
  padding: 0 80px 80px;
  overflow: hidden;
}

/* FONDO DEL HERO */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(48, 84, 102, 0.75),
      rgba(48, 84, 102, 0.75)),
    url("../img/JPG/top-view-graphic-designer-with-tablet.jpg") center / cover no-repeat;
  z-index: 1;
}

/* CONTENIDO HERO */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 80px;
  width: 100%;
}

/* TEXTO */
.hero-text {
  max-width: 480px;
}

/* IMAGEN TUYA */
.hero-image {
  align-self: flex-end;
}

.hero-image img {
  height: 75vh;
  object-fit: contain;
}

.about-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}

.about-content p {
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.content {
  margin-left: 260px;
  padding-left: 80px;
  /* 👈 aire visual */
  padding-right: 80px;
  transition: margin-left 0.35s ease, padding 0.35s ease;
}

.sidebar.collapsed~.content {
  margin-left: 90px;
  padding-left: 60px;
}

/* =========================
   RESPONSIVE DESIGN (MOBILE)
========================= */

@media (max-width: 768px) {

  /* SIDEBAR -> TOP HEADER */
  .sidebar {
    width: 100%;
    height: 70px;
    /* Header View (Logo + Toggle) */
    bottom: auto;
    transition: height 0.4s ease;
  }

  /* "Collapsed" state in JS will act as OPEN MENU on mobile */
  .sidebar.collapsed {
    width: 100%;
    height: 100vh;
    /* Full screen menu */
    overflow-y: auto;
  }

  /* CONTENT */
  .content {
    margin-left: 0;
    padding: 100px 24px 60px;
    /* Top padding for fixed header */
    width: 100%;
  }

  /* Override the desktop collapsed margin */
  .sidebar.collapsed~.content {
    margin-left: 0;
    padding-left: 24px;
  }

  /* HERO */
  .hero {
    padding: 0 24px 60px;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: auto;
    padding-top: 120px;
  }

  .hero-content {
    flex-direction: column-reverse;
    /* Image on top, text on bottom */
    align-items: center;
    gap: 40px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-image {
    align-self: center;
    width: 100%;
    justify-content: center;
  }

  .hero-image img {
    height: auto;
    max-height: 50vh;
    width: 100%;
    max-width: 320px;
  }

  /* ABOUT SECTION */
  .about-section {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-content p {
    margin: 0 auto;
  }
}