/* =====================
   VARIABLES
===================== */
:root {
  --bg:   #f7f7f5;   /* blanco roto */
  --text: #111;
  --muted: #888;
}

/* =====================
   RESET
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =====================
   BASE
===================== */
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Barlow, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

h1, h2 {
  font-weight: 600;
}

/* =====================
   HEADER
===================== */
.header {
  text-align: center;
  padding: 10px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header h1 {
  font-size: 2.2rem;
  letter-spacing: 0.12em;
}

.header span {
  font-size: 1.4rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* =====================
   SIDEBAR
===================== */
.sidebar {
  position: fixed;
  top: 100px;
  left: 0;
  width: 200px;
  height: 100vh;
  padding: 40px 20px;
  background: var(--bg);
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
}

/* =====================
   MAIN BASE
===================== */
.main-content {
  margin-left: 160px;
  width: calc(100% - 160px);
}

.content {
  padding: 20px;
  background: #f7f7f5;   /* blanco roto */
  color: Black;
}

/* =====================
   FULLSCREEN
===================== */
:fullscreen {
  background: #0f0f0f;
}

/* =====================
   RESPONSIVE
===================== */

/* Tablet */
@media (max-width: 1024px) {
  body {
    font-size: 17px;
  }

  .header h1 {
    font-size: 2rem;
  }
}

/* Móvil */
@media (max-width: 768px) {

  .layout {
    display: block;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .sidebar {
    left: -220px;
    top: 0;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 2000;
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    margin: 0;
    width: 100%;
  }
}

/* Móvil horizontal */
@media (max-width: 768px) and (orientation: landscape) {

  .layout {
    display: grid;
    grid-template-columns: 120px 1fr;
  }

  .sidebar {
    position: relative;
    left: 0;
    height: auto;
  }

  .main-content {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}