* {
  box-sizing: border-box;
}

html,
body {
  --ccft-cs-background: #000;
  --ccft-cs-on-surface: #fff;
  --ccft-cs-surface: #fff;
  --ccft-cs-primary: rgb(252, 120, 79);
  --ccft-cs-primary-alt: hsla(14, 97%, 65%, .3);
  --ccft-ts-primary: Montserrat, sans-serif;
  --ccft-ts-secondary: 'Abril Fatface', serif;
  --ccft-ts-secondary: var(--ccft-cs-on-surface);
  --ccft-spacer-x: 40px;
  --ccft-spacer-y: 40px;
  --ccft-brand-size: 150px;
  
  background-color: var(--ccft-cs-background);
  font-family: var(--ccft-ts-primary);
  margin: 0;
}

.layout {
  background-image: url(/images/Cafecito.png);
  background-position: 0 0;
  background-size: cover;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.layout.nav--active main {
  opacity: .2;
  user-select: none;
}

.layout__backdrop,
.layout__frontdrop {
  background-color: rgba(0, 0, 0, .3);
  content: '';
  display: block;
  height: 100%;
  left: 0;
  position: fixed;
  transform-origin: 0% 50%;
  width: 100%;
  z-index: 0;
}

.layout__backdrop {
  transform: scaleX(.34) translateX(calc(67% * 3));
}

.layout.nav--active .layout__frontdrop {
  background-color: var(--ccft-cs-primary-alt);
  visibility: visible;
}

.layout__frontdrop {
  opacity: 0;
  visibility: hidden;
  z-index: 2;
}

.layout__wrapper {
  display: grid;
  grid-template-columns: 300px repeat(3, 1fr);
  margin: auto;
  height: 100%;
}

.layout__main {
  transition: opacity .3s;
  z-index: 1;
}

.hero {
  padding-top: 10rem;
}

.hero-title {
  color: #fff;
  font-family: var(--ccft-ts-secondary);
  font-weight: 400;
  font-size: 4.75rem;
  line-height: 1.2;
  margin-left: auto;
  margin-right: 5rem;
  margin-bottom: 0;
  position: relative;
  width: 32.5rem;
  z-index: 1;
}

.hero-title em {
  display: block;
  font-size: 2rem;
  font-style: normal;
  line-height: 1.2;
  transform: translateX(2.5rem);
}

.hero-text {
  background-color: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: .92rem;
  line-height: 1.75;
  margin: 0;
  margin-left: auto;
  margin-right: 6rem;
  padding: 5rem 3rem 3rem;
  transform: translateY(-3rem);
  width: 50%;
  z-index: 0;
}

.hero-text a {
  box-shadow: 0 4px #fff;
  color: #fff;
  text-decoration: none;
}

.hero-block--content > *:last-child {
  margin-bottom: 0;
}

.layout__main {
  display: flex;
  flex-direction: column;
}

.layout__header {
  height: 100%;
  z-index: 2;
}

.layout__header nav {
  height: 100%;
}

.layout__main {
  grid-column: span 3;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav--header-1 {
  counter-reset: n;
  height: 100%;
  padding: 0 2rem;
  position: relative;
}

.nav--header-1 > .nav__item:not(.nav__item--home) {
  counter-increment: n;
}

.nav--header-1 > .nav__item:not(.nav__item--home) > .nav__link {
  color: var(--ccft-cs-on-surface);
  display: block;
  font-family: var(--ccft-ts-secondary);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: .045em;
  padding: 1rem 1rem;
  padding-left: 3rem;
  padding-top: 3rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s;
  transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
  z-index: 1;
}

.nav--header-1 > .nav__item > .nav__link::before {
  content: counter(n, decimal-leading-zero);
  display: block;
  font-family: var(--ccft-ts-primary);
  font-size: 6rem;
  font-weight: bold;
  left: 0;
  top: 0;
  opacity: .25;
  position: absolute;
  transition: transform .2s;
  z-index: -1;
}

.nav--header-1 > .nav__item > .nav__link:hover,
.nav--header-1 > .nav__item.nav__item--active > .nav__link {
  color: var(--ccft-cs-primary);
  transform: translateX(.5rem);
}

.nav--header-1 > .nav__item.nav__item--active .nav--header-2 {
  visibility: visible;
}

.nav--header-1 .nav__item--home {
  background-image: url("/images/logosvg.svg");
  background-repeat: no-repeat;
  background-size: var(--ccft-brand-size) var(--ccft-brand-size);
  background-position: 10px 50%;
  
  margin-bottom: 60px;
  padding: 0;
}

.nav--header-1 .nav__item--home > .nav__link {
  display: block; /* Necessary for text-indent to work */
  height: calc(var(--ccft-brand-size) + 60px);
  text-indent: -999px;
}

.nav--header-2 {
  height: 100%;
  left: 270px;
  opacity: 0;
  padding: 2.5rem 5rem;
  position: fixed;
  top: 0;
  visibility: hidden;
  width: 100%;
}

.nav--header-2::before {
  background-image: url("./img/mi-icono.svg");
  background-repeat: no-repeat;
  background-size: 30px 30px;
  content: '';
  cursor: pointer;
  display: block;
  margin-bottom: 6rem;
  height: 30px;
  width: 30px;
}

.nav--header-2 > .nav__item {
  margin-bottom: 2.75rem;
}

.nav--header-2 > .nav__item > .nav__link {
  background-image: linear-gradient(to bottom, var(--ccft-cs-primary) 0%, var(--ccft-cs-primary) 100%);
  background-position: 0 100%;
  background-repeat: repeat-x;
  background-size: 6px 6px;
  color: #fff;
  font-family: var(--ccft-ts-primary);
  font-size: 2.75rem;
  font-weight: bold;
  letter-spacing: .05em;
  text-decoration: none;
  transition: background-size .25s, color .3s;
}

.nav--header-2 > .nav__item > .nav__link:hover {
  background-size: 6px 50px;
  color: #ffffff;
}

#contactWindow img {
    width: 100%;
    border-radius: 10px;
    margin: 10px 0;
}

/* Ventanas internas (subwindow) — por defecto ocultas */
.subwindow {
  background-color: rgba(255, 255, 255, 0.8);
  color: #fff;
  padding: 3rem;
  position: fixed;
  left: 270px;      /* igual que .nav--header-2 left */
  top: 0;
  width: calc(100% - 270px);
  height: 100%;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  z-index: 4;
  box-sizing: border-box;
}

/* Cuando la ventana está visible */
.subwindow.visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}

/* Galería vertical simple */
.subwindow .gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.subwindow .gallery img {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

/* Estilo heading dentro de subwindow */
.subwindow h2 {
  margin: 0 0 1rem 0;
  font-family: var(--ccft-ts-secondary);
  font-size: 2rem;
}

/* SERVICIOOOOOS
/* Reseteo básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* ---------------- NAVBAR ---------------- */
.navbar {
    width: 100%;
    background-color: #e8c93d; /* Amarillo */
    display: flex;
    align-items: center;
    padding: 15px 40px;
}

.logo img {
    width: 70px; /* Ajusta según tu logo */
    cursor: pointer;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 80px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: #303030;
    font-size: 1.6rem;
    font-weight: bold;
}

/* ---------------- CONTENIDO PRINCIPAL ---------------- */
.contenedor {
    background-color: #2b2b2b;
    min-height: 100vh;
    padding: 40px 40px;
}

.categoria {
    color: white;
    font-size: 2rem;
    margin: 40px 0 20px 0;
}

/* Galería */
.galeria {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 4px;
}

.box {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Reseteo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* ---------------- NAVBAR ---------------- */
.navbar {
    width: 100%;
    background-color: #e8c93d;
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    width: 60px;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 50px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: #303030;
    font-size: 1.3rem;
    font-weight: bold;
}

/* ---------------- CONTENIDO ---------------- */
.contenedor {
    background-color: #2b2b2b;
    min-height: 100vh;
    padding: 40px 25px;
}

.categoria {
    color: white;
    font-size: 1.8rem;
    margin: 40px 0 15px 0;
}

/* GALERÍA */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Los cuadros ahora soportan imagen de fondo */
.box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Si usas imágenes internas */
.box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* ---------------- RESPONSIVE MOVIL ---------------- */
@media (max-width: 768px) {

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .categoria {
        font-size: 1.5rem;
    }

    .galeria {
        gap: 20px;
    }
}

@media (max-width: 480px) {

    .navbar {
        flex-direction: row;
    }

    .logo img {
        width: 50px;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .contenedor {
        padding: 25px 15px;
    }

    .categoria {
        font-size: 1.3rem;
    }

    .galeria {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}
