*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}


/* ---------- BODY ---------- */

body{
  background:#0b4a45;
  color:white;
  font-family:"Inter", sans-serif;
  animation:fadePage 0.6s ease;
}

h1,h2,h3{
  font-family:"Playfair Display", serif;
}


/* ---------- ANIMACION ---------- */

@keyframes fadePage{
  from{
    opacity:0;
    transform:scale(0.98);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}


/* ---------- HEADER ---------- */

header{
  position:fixed;
  top:0;
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:5px 25px;
  background:#0b4a45;
  z-index:1000;
  transition:background 0.4s ease;
}

/* En la home, el header es transparente y se funde con el carrusel */
body.home-page header{
  background:transparent;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0) 100%
  );
}

.logo img{
  height:90px;
  transition:0.3s;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.logo img:hover{
  transform:scale(1.05);
}


/* ---------- MENU ---------- */

nav a{
  color:white;
  text-decoration:none;
  margin-left:25px;
  letter-spacing:3px;
  font-size:13px;
  position:relative;
}

nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-5px;
  width:0;
  height:1px;
  background:white;
  transition:0.3s;
}

nav a:hover::after{
  width:100%;
}


/* ---------- HOME ---------- */

.home{
  height:100vh;
  overflow:hidden;
  position:relative;
  background:#0b4a45;
}

.carousel{
  position:relative;
  width:100%;
  height:100%;
}

.slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity 1.2s ease-in-out;
  will-change:opacity, transform;
  transform:scale(1);
  pointer-events:none;
}

.slide.active{
  opacity:1;
  animation:cinemaZoom 6s ease-out forwards;
  z-index:1;
}

@keyframes cinemaZoom{
  from{
    transform:scale(1.06);
  }
  to{
    transform:scale(1);
  }
}

/* Texto del hero sobre el carrusel */
.heroOverlay{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:0 20px;
  padding-bottom:7vh;
  pointer-events:none;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,0) 65%,
    rgba(0,0,0,0.35) 100%
  );
}

.heroTitle{
  font-family:"Playfair Display", serif;
  font-size:clamp(56px, 11vw, 150px);
  font-weight:400;
  color:#fff;
  letter-spacing:2px;
  line-height:1;
  text-shadow:0 4px 30px rgba(0,0,0,0.45);
  margin:0;
}

.heroSub{
  font-family:"Inter", sans-serif;
  font-size:clamp(11px, 1.1vw, 14px);
  font-weight:300;
  letter-spacing:8px;
  text-transform:uppercase;
  color:rgba(255,255,255,0.92);
  margin-top:18px;
  text-shadow:0 2px 12px rgba(0,0,0,0.5);
}


/* ---------- GALERIA GRID ---------- */

.gallery{
  padding-top:100px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:10px;
}

.gallery img{
  width:100%;
  height:250px;
  object-fit:cover;
  transition:0.3s;
}

.gallery img:hover{
  transform:scale(1.05);
}

/* ---------- GALERIA DE CATEGORIA (.photoGrid) ---------- */

.photoGrid{
  padding:120px 24px 40px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
  gap:8px;
  max-width:none;
  width:100%;
}

.photoGrid picture,
.photoGrid img{
  display:block;
  width:100%;
  height:340px;
  object-fit:cover;
  cursor:pointer;
  transition:transform 0.4s ease, opacity 0.3s ease;
  border-radius:0;
}

.photoGrid picture img{
  height:100%;
}

.photoGrid picture:hover img,
.photoGrid img:hover{
  transform:scale(1.02);
  opacity:0.9;
}

@media (max-width: 1200px){
  .photoGrid{
    grid-template-columns:repeat(3, 1fr);
    padding:110px 16px 30px;
  }
  .photoGrid picture,
  .photoGrid img{
    height:280px;
  }
}

@media (max-width: 700px){
  .photoGrid{
    grid-template-columns:repeat(2, 1fr);
    gap:4px;
    padding:90px 6px 20px;
  }
  .photoGrid picture,
  .photoGrid img{
    height:180px;
  }
}


/* ---------- GALERIA POLAROID ---------- */

.galleryPage{
  padding-top:120px;
  display:flex;
  justify-content:center;
}

.polaroidGrid{
  width:92%;
  max-width:1700px;
  margin:auto;
  margin-top:60px;
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:40px;
  justify-items:center;
}

.polaroid{
  width:100%;
  max-width:380px;
  background:linear-gradient(to bottom, #ffffff, #f2f2f2);
  padding:14px 14px 18px;
  text-align:center;
  text-decoration:none;
  color:black;
  transition:0.4s ease;
  box-shadow:
    0 10px 25px rgba(0,0,0,0.3),
    0 3px 8px rgba(0,0,0,0.18);
  border-radius:2px;
  border:1px solid rgba(0,0,0,0.1);
}

.polaroid img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}

.polaroid p{
  margin-top:14px;
  letter-spacing:3px;
  font-size:15px;
}

.polaroid:hover{
  transform:scale(1.04) rotate(0.6deg);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.4),
    0 6px 15px rgba(0,0,0,0.25);
}

/* En galería normal (7 cards = 4+3) la última fila se centra */
.galleryPage:not(.galleryPageOlympic) .polaroidGrid{
  grid-template-columns:repeat(4, 1fr);
}

/* La 5ª empieza desplazada 0.5 columnas para centrar la fila de 3 */
.galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(5){
  grid-column:1 / span 1;
  justify-self:end;
}
.galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(6){
  grid-column:2 / span 2;
  justify-self:center;
}
.galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(7){
  grid-column:4 / span 1;
  justify-self:start;
}

/* Tablet */
@media (max-width: 1100px){
  .polaroidGrid,
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid{
    grid-template-columns:repeat(3, 1fr);
    gap:30px;
  }
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(5),
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(6),
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(7){
    grid-column:auto;
    justify-self:center;
  }
}

/* Móvil */
@media (max-width: 700px){
  .polaroidGrid,
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid{
    grid-template-columns:repeat(2, 1fr);
    gap:18px;
    width:94%;
    margin-top:40px;
  }
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(5),
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(6),
  .galleryPage:not(.galleryPageOlympic) .polaroidGrid a:nth-child(7){
    grid-column:auto;
    justify-self:center;
  }
  .polaroid{
    padding:8px 8px 12px;
  }
  .polaroid p{
    font-size:11px;
    letter-spacing:2px;
    margin-top:8px;
  }
}


/* ---------- ABOUT ---------- */

.about{
  padding-top:120px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:60px;
  width:80%;
  margin:auto;
}

.aboutPhoto{
  width:350px;
  object-fit:cover;
  box-shadow:0 10px 25px rgba(0,0,0,0.4);
}

.aboutText{
  max-width:500px;
}

.aboutText h1{
  margin-bottom:20px;
  letter-spacing:2px;
}

.aboutText p{
  line-height:1.6;
}


/* =============================================================
   CONTACT — diseño split editorial
   ============================================================= */

body.contact-page{
  background:#0b4a45;
  color:#f5f1e8;
  overflow:hidden;
  height:100vh;
}

/* Header con un suave gradiente para que destaque sobre la foto */
body.contact-page header{
  background:linear-gradient(
    to bottom,
    rgba(11,74,69,0.4) 0%,
    rgba(11,74,69,0) 100%
  );
}

.contact-split{
  display:grid;
  grid-template-columns:1fr 1fr;
  width:100vw;
  height:100vh;
}

/* ---------- COLUMNA IMAGEN ---------- */
.contact-image{
  position:relative;
  overflow:hidden;
  background:#0b4a45;
}

.contact-image picture,
.contact-image img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Capa verde sutil sobre la foto para que armonice con el lado derecho */
.contact-image::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    to right,
    rgba(11,74,69,0.0) 0%,
    rgba(11,74,69,0.15) 70%,
    rgba(11,74,69,0.55) 100%
  );
  pointer-events:none;
}

/* Firma "gv." vertical sobre la foto, estilo Lovable */
.photo-signature{
  position:absolute;
  left:2.5rem;
  top:50%;
  transform:translateY(-50%);
  font-family:"Playfair Display", serif;
  font-style:italic;
  font-weight:400;
  font-size:clamp(2.5rem, 4vw, 4rem);
  color:rgba(245, 241, 232, 0.35);
  letter-spacing:0.02em;
  line-height:1;
  z-index:2;
  pointer-events:none;
  user-select:none;
}

/* ---------- COLUMNA CONTENIDO ---------- */
.contact-content{
  background:#0b4a45;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:6rem clamp(2rem, 5vw, 5rem);
  color:#f5f1e8;
}

/* Eyebrow con línea dorada */
.contact-eyebrow{
  display:flex;
  align-items:center;
  gap:14px;
  font-family:"Inter", sans-serif;
  font-size:0.72rem;
  letter-spacing:0.32em;
  font-weight:400;
  color:#d4b572;
  margin-bottom:1.2rem;
}
.eyebrow-line{
  display:inline-block;
  width:42px;
  height:1px;
  background:#d4b572;
}

/* Título "Hablemos." en Playfair grande con punto dorado */
.contact-title{
  font-family:"Playfair Display", serif;
  font-weight:500;
  font-size:clamp(3rem, 6vw, 5.5rem);
  letter-spacing:-0.01em;
  line-height:1;
  color:#f5f1e8;
  margin-bottom:1.6rem;
}
.contact-title .dot{
  color:#d4b572;
}

/* Intro */
.contact-intro{
  font-family:"Inter", sans-serif;
  font-weight:300;
  font-size:1rem;
  line-height:1.7;
  color:rgba(245, 241, 232, 0.78);
  margin-bottom:3rem;
  max-width:480px;
}

/* Lista de filas de contacto */
.contact-list{
  display:flex;
  flex-direction:column;
  border-top:1px solid rgba(245, 241, 232, 0.12);
}

.contact-row{
  display:flex;
  align-items:center;
  gap:1.5rem;
  padding:1.4rem 0.5rem;
  border-bottom:1px solid rgba(245, 241, 232, 0.12);
  text-decoration:none;
  color:#f5f1e8;
  transition:padding 0.35s ease, background 0.35s ease;
}

.contact-row:hover{
  padding-left:1.2rem;
  background:rgba(245, 241, 232, 0.03);
}

.contact-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  flex-shrink:0;
  color:#d4b572;
  transition:transform 0.35s ease;
}

.contact-icon svg{
  width:24px;
  height:24px;
}

.contact-row:hover .contact-icon{
  transform:scale(1.1);
}

.contact-text{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:0.3rem;
  min-width:0;
}

.contact-label{
  font-family:"Inter", sans-serif;
  font-size:0.72rem;
  letter-spacing:0.3em;
  font-weight:400;
  color:rgba(245, 241, 232, 0.55);
}

.contact-value{
  font-family:"Inter", sans-serif;
  font-size:1.1rem;
  font-weight:400;
  color:#f5f1e8;
  letter-spacing:0.01em;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.contact-arrow{
  font-size:1.3rem;
  color:rgba(245, 241, 232, 0.5);
  transition:transform 0.35s ease, color 0.35s ease;
  flex-shrink:0;
}

.contact-row:hover .contact-arrow{
  transform:translateX(6px);
  color:#d4b572;
}

/* ---------- TABLET ---------- */
@media (max-width: 1024px){
  body.contact-page{
    overflow-y:auto;
    height:auto;
    min-height:100vh;
  }
  .contact-split{
    grid-template-columns:1fr;
    height:auto;
    min-height:100vh;
  }
  .contact-image{
    height:45vh;
    min-height:300px;
  }
  .photo-signature{
    left:1.5rem;
    top:auto;
    bottom:1.5rem;
    transform:none;
    font-size:2.5rem;
  }
  .contact-content{
    padding:4rem clamp(1.5rem, 5vw, 4rem);
  }
}

/* ---------- MÓVIL ---------- */
@media (max-width: 600px){
  .contact-image{
    height:38vh;
    min-height:240px;
  }
  .photo-signature{
    left:1.25rem;
    bottom:1.25rem;
    font-size:2rem;
  }
  .contact-content{
    padding:3rem 1.5rem 4rem;
  }
  .contact-eyebrow{
    font-size:0.65rem;
  }
  .contact-title{
    font-size:3rem;
  }
  .contact-intro{
    font-size:0.95rem;
    margin-bottom:2rem;
  }
  .contact-row{
    gap:1rem;
    padding:1.2rem 0.25rem;
  }
  .contact-icon{
    width:36px;
    height:36px;
  }
  .contact-icon svg{
    width:20px;
    height:20px;
  }
  .contact-value{
    font-size:1rem;
  }
}


/* ---------- GALERIA ESTILO AROS OLIMPICOS ---------- */

.galleryPageOlympic{
  min-height:100vh;
  padding-top:160px;
  padding-bottom:70px;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

.olympicGrid{
  width:min(86vw, 1400px);
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(14, 1fr);
  gap:44px 34px;
  align-items:start;
}

.olympicCard{
  width:100%;
  max-width:none;
  justify-self:stretch;
  align-self:start;
}

.olympicCard img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  display:block;
}

.olympicCard p{
  margin-top:12px;
  font-size:13px;
  letter-spacing:2.5px;
}

/* fila 1: 4 */
/* fila 2: 3 centradas con más aire */

.card-1{
  grid-column:2 / span 3;
  grid-row:1;
}

.card-2{
  grid-column:5 / span 3;
  grid-row:1;
}

.card-3{
  grid-column:8 / span 3;
  grid-row:1;
}

.card-4{
  grid-column:11 / span 3;
  grid-row:1;
}

.card-5{
  grid-column:3 / span 3;
  grid-row:2;
  margin-top:-18px;
}

.card-6{
  grid-column:6 / span 3;
  grid-row:2;
  margin-top:-18px;
}

.card-7{
  grid-column:9 / span 3;
  grid-row:2;
  margin-top:-18px;
}

.galleryPageOlympic .polaroid{
  background:linear-gradient(to bottom, #ffffff, #f4f4f4);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.22),
    0 3px 8px rgba(0,0,0,0.14);
}

.galleryPageOlympic .polaroid:hover{
  transform:translateY(-4px) scale(1.03) rotate(0.6deg);
  box-shadow:
    0 18px 38px rgba(0,0,0,0.28),
    0 6px 14px rgba(0,0,0,0.18);
}


/* ---------- TABLET ---------- */

@media (max-width:1100px){

  .galleryPageOlympic{
    padding-top:140px;
  }

  .olympicGrid{
    grid-template-columns:repeat(2, minmax(260px, 1fr));
    gap:30px;
    width:min(90vw, 920px);
  }

  .card-1,
  .card-2,
  .card-3,
  .card-4,
  .card-5,
  .card-6,
  .card-7{
    grid-column:auto;
    grid-row:auto;
    margin-top:0;
  }
}


/* ---------- MOBILE ---------- */

@media(max-width:700px){

  header{
    padding:6px 15px;
  }

  .logo img{
    height:60px;
  }

  nav{
    flex-wrap:wrap;
    justify-content:flex-end;
  }

  nav a{
    margin-left:18px;
    font-size:12px;
    letter-spacing:2px;
  }

  .polaroidGrid{
    grid-template-columns:1fr;
  }

  .polaroidGrid a:last-child{
    grid-column:auto;
    justify-self:center;
  }

  .about{
    flex-direction:column;
  }

  .gallery img{
    height:180px;
  }

  .contactMain{
    padding:118px 16px 40px;
  }

  .contactCard{
    margin-top:10px;
    padding:32px 22px;
    border-radius:16px;
  }

  .contactCard h1{
    font-size:32px;
  }

  .contactIntro{
    font-size:14px;
    line-height:1.7;
  }

  .contactValue{
    font-size:16px;
  }

  .galleryPageOlympic{
    padding-top:120px;
    padding-bottom:40px;
  }

  .olympicGrid{
    grid-template-columns:1fr;
    gap:22px;
    width:min(92vw, 440px);
  }

  .olympicCard{
    max-width:100%;
  }

  .galleryPageOlympic .polaroid{
    width:100%;
  }

  .galleryPageOlympic .polaroid img{
    aspect-ratio:1/1;
  }

  .galleryPageOlympic .polaroid p{
    font-size:13px;
    letter-spacing:2px;
  }
}

/* =============================================================
   GALERIA BENTO GRID — gallery.html
   ============================================================= */

/* Header transparente también en la página de galería bento */
body.gallery-bento-page{
  height:100vh;
  height:100dvh;            /* iPhone respeta esto, evita el "cut off" del bottom bar */
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
body.gallery-bento-page header{
  background:linear-gradient(
    to bottom,
    rgba(11,74,69,0.85) 0%,
    rgba(11,74,69,0) 100%
  );
}
body.gallery-bento-page main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;             /* permite que los hijos se compriman */
  padding-top:30px;         /* deja sitio para el header fijo */
}

/* Intro con título grande */
.gallery-intro{
  flex:0 0 auto;
  padding:0 2.5rem 0.6rem;
  text-align:center;
}
.gallery-intro h1{
  font-family:"Playfair Display", serif;
  font-weight:400;
  font-size:clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing:0.05em;
  color:#fff;
  margin:0;
}
.gallery-intro p{
  margin-top:0.3rem;
  font-size:0.7rem;
  letter-spacing:0.3em;
  text-transform:uppercase;
  opacity:0.6;
  color:#fff;
}

/* Grid bento — flex:1 para que ocupe todo el espacio que sobre */
.bento{
  flex:1;
  min-height:0;
  display:grid;
  gap:8px;
  padding:0.4rem 1.2rem 1rem;
  grid-template-columns:repeat(4, 1fr);
  grid-template-rows:repeat(3, 1fr);
  grid-template-areas:
    "a a b c"
    "a a d e"
    "f f g e";
}

.bento-card{
  position:relative;
  overflow:hidden;
  cursor:pointer;
  background:#0a3a36;
  text-decoration:none;
  color:#fff;
  isolation:isolate;
  border-radius:2px;
}

.bento-card picture,
.bento-card img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform 1.2s cubic-bezier(.2,.7,.2,1), filter 0.6s;
  filter:brightness(0.78) saturate(1.05);
}

.bento-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    to top,
    rgba(11,74,69,0.85) 0%,
    rgba(11,74,69,0.15) 50%,
    transparent 100%
  );
  z-index:1;
  transition:opacity 0.5s;
}

.bento-card:hover img{
  transform:scale(1.06);
  filter:brightness(0.9) saturate(1.1);
}
.bento-card:hover::after{
  opacity:0.7;
}

.bento-label{
  position:absolute;
  left:1.25rem;
  bottom:1.1rem;
  z-index:2;
  pointer-events:none;
}
.bento-num{
  display:block;
  font-family:"Inter", sans-serif;
  font-size:0.7rem;
  letter-spacing:0.35em;
  opacity:0.75;
  margin-bottom:0.35rem;
  font-weight:300;
}
.bento-name{
  font-family:"Playfair Display", serif;
  font-size:clamp(1.1rem, 1.7vw, 1.8rem);
  font-weight:400;
  letter-spacing:0.04em;
  line-height:1;
}

/* Card destacada (la grande de Automovilismo) */
.bento-feature .bento-name{
  font-size:clamp(2rem, 3.2vw, 3.4rem);
}

/* Asignación de áreas del grid */
.bento-1{ grid-area:a; }   /* AUTOMOVILISMO destacada */
.bento-2{ grid-area:b; }   /* CABALLOS */
.bento-3{ grid-area:c; }   /* CLASICOS */
.bento-4{ grid-area:d; }   /* DEPORTIVOS */
.bento-5{ grid-area:e; }   /* MOTOCICLISMO vertical */
.bento-6{ grid-area:f; }   /* TOROS wide */
.bento-7{ grid-area:g; }   /* URBANA */

/* TABLET */
@media (max-width: 1024px) and (min-width: 641px){
  .bento{
    grid-template-columns:repeat(3, 1fr);
    grid-template-rows:repeat(4, 1fr);
    grid-template-areas:
      "a a b"
      "a a c"
      "d e f"
      "g e f";
  }
}

/* MÓVIL */
@media (max-width: 640px){
  body.gallery-bento-page{
    height:auto;
    height:auto;
    overflow:auto;
    display:block;
  }
  body.gallery-bento-page main{
    flex:initial;
    display:block;
    padding-top:80px;
  }
  .gallery-intro{
    padding:0.5rem 1rem 0.6rem;
  }
  .gallery-intro h1{
    font-size:1.5rem;
  }
  .gallery-intro p{
    font-size:0.62rem;
  }
  .bento{
    flex:initial;
    padding:0.5rem 0.5rem 1rem;
    grid-template-columns:repeat(2, 1fr);
    /* AUTOMOVILISMO grande arriba (2 cols) + 6 cards en pares de 2 cols */
    grid-template-rows:30vh repeat(3, 17vh);
    grid-template-areas:
      "a a"
      "b c"
      "d e"
      "f g";
    gap:5px;
  }
  /* Resetear MOTOCICLISMO y TOROS para que ocupen 1 col cada una en móvil */
  .bento-5{ grid-area:e; }   /* MOTOCICLISMO */
  .bento-6{ grid-area:f; }   /* TOROS */
  .bento-7{ grid-area:g; }   /* URBANA */

  .bento-label{
    left:0.7rem;
    bottom:0.6rem;
  }
  .bento-num{
    font-size:0.5rem;
    margin-bottom:0.2rem;
    letter-spacing:0.3em;
  }
  .bento-name{
    font-size:0.95rem;
  }
  .bento-feature .bento-name{
    font-size:1.6rem;
  }
}
