/* Elena Marín — single-page portfolio inspired by Flying (portfolio-project-2), standalone */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Raleway:wght@300;400;500;600;700&display=swap");

:root {
  --gwt-nav-h: var(--gwt-site-navbar-offset, calc(0.8rem + 0.8rem + 2.25rem + 2px));
  --emar-rail-w: 300px;
  --emar-ham-w: 48px;
  --emar-accent: #c17f4a;
  --emar-accent-hover: #a86b3d;
  --emar-slate: #243038;
  --emar-slate-deep: #1a252c;
  --emar-slate-bar: #2c3d47;
  --emar-text: #919191;
  --emar-heading: #353535;
  --emar-banner-bg: #f0f2f4;
  --emar-line: #e8e8e8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body.emar-page {
  margin: 0;
  min-height: 100vh;
  font-family: Raleway, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--emar-text);
  background: #fff;
  padding-top: var(--gwt-nav-h);
  overflow-x: hidden;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-family: Raleway, sans-serif;
  color: var(--emar-heading);
  font-weight: 600;
}

a {
  color: inherit;
}

/* ——— Fixed sidebar (Flying left navigation) ——— */
.emar-sidebar {
  position: fixed;
  top: var(--gwt-nav-h);
  left: 0;
  z-index: 1020;
  width: var(--emar-rail-w);
  height: calc(100vh - var(--gwt-nav-h));
  background: var(--emar-slate);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(0);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Desktop: colapsar deja visible solo la columna tipo “hamburguesa” */
.emar-sidebar.is-collapsed {
  transform: translateX(calc(-1 * (var(--emar-rail-w) - var(--emar-ham-w))));
  box-shadow: none;
}

/* Carril derecho del panel: permanece en el borde con el contenido al colapsar */
.emar-sidebar__accent-bar {
  flex: 0 0 var(--emar-ham-w);
  position: relative;
  z-index: 3;
  align-self: stretch;
  min-height: 100%;
  background: var(--emar-slate-bar);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.emar-sidebar__accent-bar:hover,
.emar-sidebar__accent-bar:focus-visible {
  background: #354c5a;
  outline: none;
}

.emar-sidebar__accent-bar:focus-visible {
  box-shadow: inset 0 0 0 2px var(--emar-accent);
}

.emar-sidebar__bar-line {
  display: block;
  width: 18px;
  height: 3px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Icono en escritorio: X cuando el panel está desplegado (acción = cerrar) */
@media (min-width: 768px) {
  .emar-sidebar:not(.is-collapsed) .emar-sidebar__accent-bar .emar-sidebar__bar-line:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .emar-sidebar:not(.is-collapsed) .emar-sidebar__accent-bar .emar-sidebar__bar-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
}

.emar-sidebar__inner {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 2.5rem 1.25rem 6rem;
  text-align: center;
}

.emar-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none !important;
  letter-spacing: 0.02em;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.emar-brand-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 2rem;
}

.emar-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.emar-nav-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.emar-nav-list a {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  transition: color 0.3s;
}

.emar-nav-list a:hover,
.emar-nav-list a:focus-visible,
.emar-nav-list a.is-active {
  color: var(--emar-accent) !important;
}

.emar-nav-list .sub {
  margin-top: 0.35rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  color: #8fa3ad;
  text-transform: lowercase;
}

.emar-sidebar__social {
  position: absolute;
  left: 0;
  right: var(--emar-ham-w);
  bottom: 0;
  padding: 1.25rem 1rem 1.5rem;
  background: linear-gradient(to top, var(--emar-slate-deep), transparent);
}

.emar-sidebar__social a {
  display: inline-block;
  margin: 0 0.35rem;
  color: #8fa3ad;
  font-size: 1.25rem;
  transition: color 0.3s;
}

.emar-sidebar__social a:hover {
  color: #fff;
}

.emar-sidebar__copy {
  margin-top: 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b7c85;
}

/* Main column */
.emar-shell {
  margin-left: var(--emar-rail-w);
  min-height: calc(100vh - var(--gwt-nav-h));
  overflow-x: hidden;
  transition: margin-left 0.35s ease;
}

.emar-page.emar-page--sidebar-collapsed .emar-shell {
  margin-left: var(--emar-ham-w);
}

/* Banner (inner-banner) */
.emar-banner {
  position: relative;
  z-index: 2;
  padding: 4.5rem 2.5rem 4rem 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--emar-banner-bg);
}

.emar-banner h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--emar-heading);
}

.emar-banner .accent {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  color: var(--emar-accent);
}

.emar-banner .lead {
  max-width: 36rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #7a7a7a;
}

/* Section spacing (Flying .section) */
.emar-section {
  padding: 4.5rem 2.5rem 4.5rem 3rem;
}

.emar-section--tight-top {
  padding-top: 2.5rem;
}

.emar-section--gray {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--emar-banner-bg);
}

/* Flying-style buttons */
.emar-btn {
  display: inline-block;
  padding: 0 1.75rem;
  border-radius: 2px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--emar-accent);
  color: var(--emar-accent);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 2.85rem;
  text-align: center;
  text-decoration: none !important;
  text-transform: capitalize;
  transition: background 0.35s, color 0.35s, padding 0.35s, box-shadow 0.35s;
}

.emar-btn:hover {
  padding-left: 2.15rem;
  padding-right: 2.15rem;
  background: var(--emar-accent);
  color: #fff !important;
  box-shadow: inset 0 0 0 1px var(--emar-accent);
}

.emar-btn--sm {
  padding: 0 1.35rem;
  line-height: 2.65rem;
  font-size: 0.68rem;
}

.emar-btn--sm:hover {
  padding-left: 1.65rem;
  padding-right: 1.65rem;
}

.emar-btn--line-dark {
  box-shadow: inset 0 0 0 1px var(--emar-slate-deep);
  color: var(--emar-slate-deep);
}

.emar-btn--line-dark:hover {
  background: var(--emar-slate-deep);
  color: #fff !important;
  box-shadow: inset 0 0 0 1px var(--emar-slate-deep);
}

.emar-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.emar-btn-row .emar-btn {
  flex: 1 1 auto;
  min-width: 8rem;
  text-align: center;
}

/* Tab slider */
.emar-tab-slider {
  margin-bottom: 2.5rem;
}

.emar-tab-panes {
  position: relative;
  background: #111;
}

.emar-tab-pane {
  display: none;
}

.emar-tab-pane.is-active {
  display: block;
}

.emar-tab-pane__img {
  position: relative;
  line-height: 0;
}

.emar-tab-pane__img img {
  width: 100%;
  height: auto;
  vertical-align: middle;
  display: block;
}

.emar-caption {
  position: absolute;
  padding: 0.65rem 1.1rem;
  background: var(--emar-slate-bar);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
}

.emar-caption--tl {
  left: 1.25rem;
  top: 1.25rem;
}

.emar-caption--br {
  left: auto;
  top: auto;
  right: 1.25rem;
  bottom: 1.25rem;
  background: var(--emar-accent);
}

.emar-caption--bar {
  left: 0;
  top: 0;
  right: 0;
  text-align: center;
  background: rgba(36, 48, 56, 0.88);
  padding: 1rem;
}

.emar-caption--bar a {
  color: #fff !important;
  text-decoration: none !important;
}

.emar-caption--bar a:hover {
  color: var(--emar-accent) !important;
}

.emar-tab-menu {
  display: flex;
  width: 100%;
}

.emar-tab-link {
  flex: 1 1 20%;
  min-height: 100px;
  border: none;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  transition: opacity 0.35s;
}

.emar-tab-link:hover,
.emar-tab-link.is-active {
  opacity: 1;
  outline: 2px solid var(--emar-accent);
  outline-offset: -2px;
  z-index: 1;
}

/* Meta row (Skills / Client / CTA) */
.emar-line {
  width: 100%;
  height: 1px;
  background: var(--emar-line);
  margin: 1.25rem 0 1.75rem;
}

.emar-line--short {
  margin-bottom: 1rem;
}

.emar-meta h4 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.emar-meta p {
  margin: 0;
  font-size: 0.88rem;
}

.emar-meta-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

/* Portfolio grid (mix-5) */
.emar-grid-title {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.25rem;
}

.emar-portfolio {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.emar-mix {
  position: relative;
  flex: 0 0 20%;
  max-width: 20%;
}

.emar-mix__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.25rem 0.75rem;
  background: var(--emar-slate-bar);
  color: #fff;
  text-align: center;
  text-decoration: none !important;
  transition: background 0.3s;
}

.emar-mix__title:hover {
  background: var(--emar-slate-deep);
}

.emar-mix__title h4 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 0.88rem;
}

.emar-mix__title .sub-text {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--emar-accent);
  font-size: 0.8rem;
  font-style: italic;
}

.emar-mix__img {
  position: relative;
  z-index: 1;
  line-height: 0;
  overflow: hidden;
  background: #1a1a1a;
}

.emar-mix__img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.emar-mix:hover .emar-mix__img img {
  transform: scale(1.04);
}

.emar-mix__corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 52px solid var(--emar-slate-bar);
  border-left: 52px solid transparent;
  z-index: 3;
  pointer-events: none;
}

.emar-mix__star {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  color: #fff;
  font-size: 0.65rem;
  pointer-events: none;
}

/* Contact */
.emar-contact-form .form-control {
  border-radius: 2px;
  margin-bottom: 0.65rem;
  border-color: #ddd;
  font-size: 0.9rem;
}

/* Mobile top bar */
.emar-mob-bar {
  display: none;
  position: fixed;
  top: var(--gwt-nav-h);
  left: 0;
  right: 0;
  z-index: 1019;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--emar-slate);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.emar-mob-bar .emar-brand {
  font-size: 1rem;
  margin: 0;
}

.emar-mob-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--emar-slate-bar);
  border-radius: 2px;
  cursor: pointer;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}

.emar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--gwt-nav-h);
  z-index: 1018;
  background: rgba(0, 0, 0, 0.45);
}

.emar-backdrop.is-visible {
  display: block;
}

/* GWT strip */
.emar-gwt-strip {
  text-align: center;
  padding: 1.25rem 1rem 1.5rem;
  background: #0b0c10;
  color: #c5c6c7;
  border-top: 2px solid #b9dd39;
  font-family: Poppins, system-ui, sans-serif;
  font-size: 0.95rem;
}

.emar-gwt-strip a {
  display: inline-block;
  margin: 0.35rem 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.emar-gwt-strip .emar-gwt-btn--primary {
  background: #b9dd39;
  color: #0b0c10;
}

.emar-gwt-strip .emar-gwt-btn--outline {
  border: 2px solid #b9dd39;
  color: #b9dd39;
  background: transparent;
}

@media (max-width: 991px) {
  .emar-mix {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }

  .emar-tab-link {
    min-height: 72px;
  }
}

@media (max-width: 767px) {
  .emar-mob-bar {
    display: flex;
  }

  .emar-page.emar-page--sidebar-collapsed .emar-shell {
    margin-left: 0 !important;
  }

  .emar-sidebar {
    transform: translateX(-100%);
    width: min(300px, 88vw);
    top: calc(var(--gwt-nav-h) + 52px);
    height: calc(100vh - var(--gwt-nav-h) - 52px);
    box-shadow: none;
  }

  /* En móvil no usar “peek” de escritorio: cajón completo o fuera de pantalla */
  .emar-sidebar.is-collapsed {
    transform: translateX(-100%);
  }

  .emar-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
  }

  .emar-sidebar__accent-bar {
    display: none;
  }

  .emar-backdrop {
    top: calc(var(--gwt-nav-h) + 52px);
  }

  .emar-sidebar__inner {
    padding-top: 1.75rem;
  }

  .emar-sidebar__social {
    left: 0;
    right: 0;
  }

  .emar-shell {
    margin-left: 0;
    padding-top: 52px;
  }

  .emar-banner,
  .emar-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .emar-tab-menu {
    flex-wrap: wrap;
  }

  .emar-tab-link {
    flex: 1 1 33.333%;
    min-height: 64px;
  }

  .emar-mix {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .emar-btn-row {
    flex-direction: column;
  }

  .emar-btn-row .emar-btn {
    width: 100%;
  }
}

@media (max-width: 479px) {
  .emar-mix {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .emar-tab-link {
    flex: 1 1 50%;
  }
}
