/* ============================================
   KROMATIVO™ PORTFOLIO
   ============================================ */


:root {
  --rose: #FA147A;
  --licorice: #0C0006;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-mid: #999;
  --sidebar-width: 220px;
  --gap: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Work Sans', -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--licorice);
  font-size: 16px;
}

body {
  background: var(--white);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* ---- LAYOUT: SIDEBAR + MAIN ---- */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 28px;
  border-right: 1px solid rgba(0,0,0,.06);
  z-index: 100;
  background: var(--white);
}

.sidebar__logo img {
  width: 170px;
}

.sidebar__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar__nav a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gray-mid);
  transition: color .2s;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
  color: var(--licorice);
}

/* ---- DROPDOWN DE PROYECTOS ---- */

.dropdown {
  position: relative;
}

.dropdown__toggle {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
  padding: 0;
}

.dropdown__toggle:hover {
  color: var(--licorice);
}

.dropdown__arrow {
  width: 10px;
  height: 10px;
  transition: transform .2s;
}

.dropdown.open .dropdown__arrow {
  transform: rotate(180deg);
}

.dropdown__menu {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0 0 16px;
}

.dropdown.open .dropdown__menu {
  display: flex;
}

.dropdown__menu a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--gray-mid);
  transition: color .2s;
}

.dropdown__menu a:hover,
.dropdown__menu a.active {
  color: var(--licorice);
}

/* Breadcrumb en página de proyecto */

.sidebar__breadcrumb-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--licorice);
  padding-left: 12px;
  border-left: 2px solid var(--rose);
}

/* ---- SOCIAL ICONS ---- */

.sidebar__social {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.sidebar__social a {
  color: var(--gray-mid);
  transition: color .2s;
}

.sidebar__social a:hover {
  color: var(--rose);
}

/* ---- HAMBURGER (hidden on desktop) ---- */

.hamburger {
  display: none;
  width: 24px;
  height: 18px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--licorice);
  border-radius: 2px;
  transition: .3s;
}

/* ---- MOBILE MENU OVERLAY ---- */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  flex-direction: column;
  padding: 40px 28px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.mobile-menu__close {
  width: 24px;
  height: 24px;
  color: var(--licorice);
}

.mobile-menu__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu__nav a {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gray-mid);
}

.mobile-menu__nav a:hover,
.mobile-menu__nav a.active {
  color: var(--licorice);
}

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

.main--project {
  background: #fdf6ff;
}

/* ---- HOME: PROJECT GRID ---- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  min-height: 100vh;
}

.grid__item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/5;
}

.grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.grid__item:hover img {
  transform: scale(1.03);
}

.grid__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,0,6,.6) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s ease;
}

.grid__item:hover .grid__overlay {
  opacity: 1;
}

.grid__overlay h3 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
}

.grid__overlay span {
  color: rgba(255,255,255,.7);
  font-size: 0.8rem;
  font-weight: 300;
}

/* ---- PROJECT PAGE ---- */

.project {
  padding: 60px 40px 0;
}

.project__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray-mid);
  margin-bottom: 40px;
  transition: color .2s;
}

.project__back:hover {
  color: var(--licorice);
}

.project__header {
  margin-bottom: 48px;
}

.project__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project__subtitle {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--gray-mid);
}

.project__row {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 40px;
  align-items: start;
  margin-top: 5%;
}

.project__row:first-of-type {
  margin-top: 0;
}

.project__row-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.project__row-text {
  position: sticky;
  top: 40px;
}

.project__meta {
  margin-bottom: 20px;
}

.project__meta dt {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-style: italic;
}

.project__meta dd {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.project__description {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.55;
  color: #444;
}

.project__description strong {
  font-weight: 600;
  color: var(--licorice);
}


.project__gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 60px;
}

.project__gallery img {
  width: 100%;
  border-radius: 8px;
}

/* ---- CTA ---- */

.project__cta {
  margin-top: 5%;
  margin-bottom: 5%;
}

.project__cta-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
  padding: 60px 48px;
  text-align: center;
  overflow: hidden;
  word-wrap: break-word;
}

.project__cta-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--licorice);
  margin-bottom: 16px;
}

.project__cta-text {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  color: #555;
  max-width: 560px;
  margin: 0 auto 32px;
}

.project__cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.project__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--rose);
  color: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 50px;
  transition: opacity .2s;
}

.project__cta-btn:hover {
  opacity: .85;
}

.project__cta-btn svg {
  flex-shrink: 0;
}

/* ---- FOOTER ---- */

.footer {
  background: var(--licorice);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer span {
  color: rgba(255,255,255,.6);
  font-size: 0.8rem;
  font-weight: 300;
}

.footer img {
  height: 20px;
}

.footer__social {
  display: none;
  gap: 20px;
  margin-top: 12px;
}

.footer__social a {
  color: rgba(255,255,255,.5);
  transition: color .2s;
}

.footer__social a:hover {
  color: var(--rose);
}

.footer--light {
  padding: 16px 40px 24px;
  text-align: center;
}

.footer--light p {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--gray-mid);
}

.footer__contact {
  display: none;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer__contact a {
  color: var(--gray-mid);
  transition: color .2s;
}

.footer__contact a:hover {
  color: var(--rose);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,.06);
    background: var(--white);
  }

  .sidebar__nav,
  .sidebar__social,
  .dropdown {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .main {
    margin-left: 0;
  }

  .layout {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project__row {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
  }

  .project__row-text {
    position: relative;
    top: 0;
  }

  .footer {
    flex-direction: column;
    gap: 16px;
    padding: 24px 28px;
  }

  .footer__social {
    display: flex;
  }

  .footer__contact {
    display: flex;
  }
}

@media (max-width: 540px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .project__cta-card {
    padding: 32px 20px;
  }

  .project__cta-title {
    font-size: 1.2rem;
  }

  .project__cta-text {
    font-size: 0.8rem;
  }

  .project__cta-btn {
    padding: 14px 24px;
    font-size: 0.8rem;
  }
}

@media (min-width: 1400px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
