/*--------- HEADER -------*/
header {
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 99;
  /* backdrop-filter: blur(4px); */
  animation: stickyNav 0.5s linear forwards;
  animation-timeline: view();
  animation-range-start: 100vh;
  animation-range-end: 200vh;
}
nav {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  z-index: 10;
}
.logo-svg {
  width: 40px;
  height: auto;
  fill: white;
}
/* .logo {
  width: 50px;
  background-image: url(../imgs/logo-corazon.webp);
  background-size: contain;
  background-position: left center;
  background-repeat: no-repeat;
  height: 50px;
} */
.logo-link {
  flex: 1;
  display: inline-block;
  padding-left: 1rem;
}
.main-nav {
  flex: 2;
  display: flex;
  justify-content: flex-start;
}

/* NAV Sin fondo y 90 con fondo */
header {
  background-color: transparent;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}
header.scrolled {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.menu-on {
  width: max(600px, 50%);
}
.menu-on-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style-type: none;
}
.menu-on-nav li a {
  font-size: 1.1rem;
  color: white;
  text-transform: uppercase;
  text-decoration: none;
  font-family: "Ferrari-Regular", sans-serif;
  font-weight: 400;
  letter-spacing: 0.1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  position: relative;
}
/* Hover: Subrayado dorado y ligero zoom */
.menu-on-nav li a:hover {
  transform: scale(1.05);
}
.menu-on-nav li a:hover::after,
.menu-on-nav li a.active::after {
  width: 100%;
}
/* Menú abierto: Mantener color dorado
  header.menu-open .menu-on-nav li a {
    color: var(--champagne);
  } */
header.menu-open .menu-on-nav li a:hover {
  color: var(--a--hover);
  font-weight: 400;
}
.nav-bar {
  display: none;
}
.highlight {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: inline-block;
}
.nav-svg {
  display: flex;
  align-items: center;
}
@media screen and (max-width: 960px) {
  .nav-svg {
    display: none;
  }
}
.fa-location-dot {
  width: 18px;
  height: auto;
  margin-left: 8px;
  display: inline-block;
}
/* FONDO */
.hero-section {
  position: relative;
  z-index: 0;
  padding-top: 150px;
}
.hero-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100vh - 150px);
}
.hero-image {
  width: 100%;
  height: 100vh;
  background-image: url("../imgs/hero-home.avif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  height: 100%;
  justify-content: flex-end;
}
.phrase-hero {
  color: white;
  z-index: 1;
  padding-right: 2rem;
}
.quote {
  text-align: right;
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.author {
  font-style: italic;
  color: #ccc;
}
/* .phrase-hero h1 {
  font-family: "Ferrari-Medium", sans-serif;
  text-align: center;
  font-size: 8rem;
  padding: 0;
  margin: 0;
  text-transform: uppercase;
  font-weight: 600;
}
.phrase-hero .outline {
  -webkit-text-stroke-width: 4px;
  -webkit-text-stroke-color: white;
  color: transparent;
} */

.row-icons {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding-bottom: 50px; */
}
.column-icons {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  width: 100px;
  padding-bottom: 50px;
}
.hero-icon {
  width: 40px;
  height: auto;
  cursor: pointer;
}

.column-icons a {
  display: inline-block;
  width: 100%;
  text-align: center;
}

.column-icons a img {
  display: block;
  margin: 0 auto;
}

/* Para asegurar que la imagen del fondo no se vea afectada por el nav */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ----------INTRO SECTION --------------- */
.intro-section {
  width: 100%;
  height: auto;
  padding: 4rem 9rem;
}
.intro-container {
  width: 100%;
  height: auto;

  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.intro-content-container {
  width: 100%;
  height: auto;
  display: flex;

  gap: 2rem;
}
.intro-img-2 {
  max-width: 100%;
  width: 100%;
  height: auto;
}
.intro-content {
  width: 45%;
  height: auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4rem;
}
.intro-img-1 {
  width: 55%;
  height: auto;
}
.intro-img-1 img {
  width: 100%;
  height: auto;
  object-fit: cover;
  overflow: hidden;
}
.intro-img-2 img {
  width: 100%;
  height: auto;
}

/* ----------- ESENCIA SECTION ------------- */
.essence-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10%;
}
.essence-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.8;
}
.essence-content {
  position: relative;
  color: var(--ferrari-white);
  z-index: 2;
}
.essence-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--ferrari-white);
  text-transform: uppercase;
}

/* ----------- Innovación y Rendimiento --------------- */
.performance-section {
  width: 100%;
  height: auto;
  padding: 4rem 9rem;
}
.performance-container {
  width: 100%;
  height: auto;

  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.performance-row {
  display: flex;
  justify-content: space-between;
}
.performance-row.reverse .performance-text {
  padding-left: 2rem;
}
.performance-text {
  width: 50%;
  color: var(--ferrari-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.performance-row:nth-of-type(1) .performance-text,
.performance-row:nth-of-type(3) .performance-text {
  padding-right: 2rem;
}
.performance-title {
  color: var(--ferrari-red);
  font-size: 2rem;
  margin-bottom: 0.8rem;
}
.performance-subtitle {
  font-size: 1.2rem;
  color: var(--ferrari-white);
  margin-bottom: 2.5rem;
}
.performance-description {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.performance-image {
  width: 50%;
  position: relative;
}
.performance-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
}
.performance-button {
  width: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ferrari-dark-gray);
  color: var(--ferrari-white);
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  gap: 1rem;
}
.performance-button i {
  margin-left: 10px;
  transition: transform 0.2s ease;
}
.performance-button:hover {
  background-color: var(--ferrari-red);
  color: var(--ferrari-black);
  transform: scale(1.05);
}
.performance-button:hover i {
  transform: translateX(5px);
}

/* ----------------- SECCION MANSORY MODELOS ---------------------- */
.masonry-section {
  width: 100%;
  height: auto;
  padding: 4rem 9rem;
}
.masonry-header {
  width: 100%;
  height: auto;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}
.masonry-header h2 {
  width: 100%;
  font-size: 2.5rem;
  color: var(--ferrari-red);
  margin-bottom: 1rem;
}
.masonry-header p {
  width: 100%;
  font-size: 1.2rem;
  margin-bottom: 3rem;
}
.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.masonry-item {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  visibility: hidden;
  /* position: relative;
  overflow: hidden;
  border-radius: 10px; */
}
.masonry-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}
.masonry-item:hover img {
  transform: scale(1.1);
}
.masonry-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: var(--ferrari-white);
  padding: 1rem;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.masonry-overlay h3 {
  font-size: 1.4rem;
  color: var(--ferrari-red);
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.masonry-overlay p {
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.masonry-item:hover .masonry-overlay {
  opacity: 1;
  transform: translateY(0);
}
.masonry-item:hover .masonry-overlay h3,
.masonry-item:hover .masonry-overlay p {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 1200px) {
  .masonry-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 968px) {
  .masonry-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .masonry-section {
    padding: 4rem 4rem;
  }
}
@media (max-width: 700px) {
  .masonry-section {
    padding: 3rem 1.5rem;
  }
  .masonry-header h2 {
    font-size: 2rem;
  }
  .masonry-header p {
    font-size: 1rem;
  }
  .masonry-gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}
@media (max-width: 500px) {
}

/* ----------------- SECCION NEWS FERRARI ---------------------- */
.news-section {
  width: 100%;
  padding-top: 4rem;
}
.news-container {
  width: 100%;
  height: auto;

  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.news-banner {
  width: 100%;
  position: relative;
  background: url("../imgs/news/hero-news.avif") no-repeat center center;
  background-size: cover;
  padding-top: 4rem;
  padding-bottom: 4rem;
  padding-left: 9rem;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.news-title {
  color: var(--ferrari-red);
  font-size: 3rem;
  margin-bottom: 1rem;
}
.news-subtitle {
  color: white;
  font-size: 1.5rem;
}
.news-list {
  display: flex;
  flex-direction: column;
  padding: 4rem 9rem;
  gap: 2rem;
}
.news-item {
  display: flex;
  margin-bottom: 2rem;
}
.news-image {
  width: 50%;
  padding-right: 1rem;
}
.news-image img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.news-image:hover img {
  transform: scale(1.05);
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}
.news-content {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.news-item-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-family: "Ferrari-Medium", sans-serif;
}
.news-content > div {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  padding-bottom: 2rem;
}
.news-category,
.news-date {
  font-size: 1.2rem;
  color: gray;
}
.news-category,
.news-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.news-description {
  font-size: 1rem;
  color: var(--ferrari-white);
}

/* ----------- MEDIA QUERY ------------------ */
@media screen and (max-width: 1400px) {
}
@media screen and (max-width: 1200px) {
  .intro-section {
    padding: 4rem 4rem;
  }
  .intro-content,
  .intro-img-1 {
    width: 50%;
  }
  .performance-section {
    padding: 4rem 4rem;
  }
  .masonry-section {
    padding: 4rem 4rem;
  }
  .news-banner {
    padding-left: 4rem;
  }
  .news-list {
    padding: 4rem 4rem;
  }
}
@media screen and (max-width: 960px) {
  .intro-content-container {
    flex-direction: column;
  }
  .intro-content,
  .intro-img-1 {
    width: 100%;
  }
  .essence-title {
    font-size: 2rem;
  }
  .performance-row {
    flex-direction: column;
    gap: 2rem;
  }
  .performance-text,
  .performance-image {
    width: 100%;
  }
  .performance-row:nth-of-type(1) .performance-text,
  .performance-row:nth-of-type(3) .performance-text {
    padding-right: 0;
  }
  .performance-description {
    margin-bottom: 2rem;
  }
  .performance-button {
    width: 100%;
  }
  .performance-row.reverse {
    flex-direction: column-reverse;
  }
  .performance-row.reverse .performance-text {
    padding-left: 0;
  }
  .performance-container {
    gap: 4rem;
  }
  .news-item {
    flex-direction: column;
    gap: 2rem;
  }
  .news-image,
  .news-content {
    width: 100%;
  }
  .news-title {
    font-size: 2rem;
  }
  .news-subtitle {
    font-size: 1rem;
  }
  .masonry-header h2 {
    margin-bottom: 0;
  }
  .news-image {
    padding-right: 0;
  }
}
@media screen and (max-width: 700px) {
  .quote {
    font-size: 1.2rem;
  }
  .news-category,
  .news-date {
    font-size: 1rem;
  }
  .news-item-title {
    font-size: 1.5rem;
  }
  .masonry-item {
    display: none;
  }
  .masonry-item:nth-child(-n + 6) {
    display: block;
  }
}
@media screen and (max-width: 500px) {
  .intro-section {
    padding: 4rem 2rem;
  }
  .essence-title {
    font-size: 1.5rem;
  }
}
