/*
 * Racing Oil Homepage Styles - 1:1 replica of production site
 */

/* ============ HERO SLIDER ============ */
.racingoil-hero-slider {
  height: 600px;
  position: relative;
}

.racingoil-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease-in-out;
  pointer-events: none;
}

.racingoil-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.racingoil-hero-slide__bg {
  position: absolute;
  inset: 0;
}

.racingoil-hero-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.racingoil-hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 22, 137, 0.867) 0%, rgba(0, 22, 137, 0.6) 30%, transparent 70%);
  z-index: 1;
}

.racingoil-hero-slide__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
}

.racingoil-hero-slide__text {
  max-width: 42rem;
  color: #fff;
}

.racingoil-hero-slide__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  font-size: 1.875rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.racingoil-hero-slide__subtitle {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  color: #fff;
}

.racingoil-hero-slide__cta {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--color-primary);
  border-radius: 9999px;
  transition: all 300ms ease;
  text-decoration: none;
}

.racingoil-hero-slide__cta:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  color: #fff;
}

@media (min-width: 768px) { .racingoil-hero-slide__title { font-size: 2.25rem; } }
@media (min-width: 1024px) { .racingoil-hero-slide__title { font-size: 3rem; } }

/* Nav (dots + arrows) - horizontal layout, bottom right */
.racingoil-hero-nav {
  position: absolute;
  bottom: 5rem;
  right: 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  z-index: 20;
}

@media (min-width: 768px) { .racingoil-hero-nav { bottom: 7rem; } }

/* Swiper pagination container - override Swiper's default absolute positioning */
.racingoil-hero-dots {
  position: static !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
}

.racingoil-hero-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  cursor: pointer;
  transition: all 300ms ease;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.racingoil-hero-dot:hover { background-color: #fff; }

.racingoil-hero-dot.is-active {
  width: 2.5rem;
  background-color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.racingoil-hero-arrows {
  display: flex;
  gap: 0.5rem;
}

.racingoil-hero-arrow {
  background-color: #8C8E8F;
  border: none;
  padding: 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 300ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.racingoil-hero-arrow:hover { background-color: #707172; }

.racingoil-hero-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #fff;
}

/* Decorative wave - white color on gray-50 background */
.racingoil-hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  line-height: 0;
}

.racingoil-hero-wave svg {
  width: 100%;
  height: 4rem;
  display: block;
}

@media (min-width: 768px) { .racingoil-hero-wave svg { height: 6rem; } }

/* ============ USPs SECTION - bg-gray-50 (light) ============ */
.section-usps {
  padding: 4rem 0;
  background: #f9fafb; /* gray-50 */
}

@media (min-width: 768px) { .section-usps { padding: 6rem 0; } }

.usps-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) { .usps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .usps-grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; } }

.usp-item {
  text-align: center;
  padding: 1.5rem;
}

.usp-item__circle {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usp-item__circle--green { background-color: #dcfce7; color: #16a34a; }
.usp-item__circle--secondary { background-color: #EBEBEB; color: #707172; }
.usp-item__circle--primary { background-color: #CCD1E6; color: #00126E; }
.usp-item__circle--blue { background-color: #dbeafe; color: #2563eb; }

.usp-item__circle svg {
  width: 2rem;
  height: 2rem;
}

.usp-item__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.usp-item__desc { color: #4b5563; }

/* ============ CATALOG BANNER ============ */
.section-catalog-banner {
  position: relative;
  padding: 4rem 0;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(to bottom right, var(--color-primary-700), var(--color-primary-900));
}

@media (min-width: 768px) { .section-catalog-banner { padding: 6rem 0; } }

.section-catalog-banner__bg {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  z-index: 0;
}

.section-catalog-banner__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-catalog-banner__inner {
  position: relative;
  z-index: 10;
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.section-catalog-banner__title {
  font-family: var(--font-heading);
  font-style: italic;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.section-catalog-banner__desc {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #f3f4f6;
}

@media (min-width: 768px) {
  .section-catalog-banner__title { font-size: 2.5rem; }
  .section-catalog-banner__desc { font-size: 1.5rem; }
}

.section-catalog-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #fff;
  color: var(--color-primary);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 300ms ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.section-catalog-banner__btn:hover {
  background-color: #f3f4f6;
  transform: scale(1.05);
  color: var(--color-primary);
}

.section-catalog-banner__btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ============ CATEGORIES SHOWCASE - horizontal expand on hover ============ */
.section-categories {
  padding: 4rem 0;
  background: #fff;
}

@media (min-width: 768px) { .section-categories { padding: 6rem 0; } }

.section-categories__title {
  font-family: var(--font-heading);
  font-style: italic;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.875rem;
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) { .section-categories__title { font-size: 2.5rem; } }

.section-categories__subtitle {
  text-align: center;
  color: #4b5563;
  max-width: 42rem;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
}

/* Mobile: 2-column grid / Desktop: flex horizontal 500px */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .categories-grid {
    display: flex;
    flex-direction: row;
    height: 500px;
    gap: 0.5rem;
    grid-template-columns: none;
  }
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  transition: all 500ms ease-out;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  height: 150px;
  display: flex;
}

@media (min-width: 768px) {
  .category-card {
    flex: 1;
    height: auto;
  }
  .category-card:hover {
    flex: 4;
  }
}

/* Hover text color forced white */
.category-card:hover {
  color: #ffffff !important;
}

/* Featured image - desktop only, appears on hover */
.category-card__image {
  position: absolute;
  inset: 0;
  opacity: 1;
  transition: opacity 700ms ease;
}

@media (min-width: 768px) {
  .category-card__image {
    opacity: 0;
  }
  .category-card:hover .category-card__image {
    opacity: 1;
  }
}

.category-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.6), rgba(0,0,0,0.3));
}

/* Content container */
.category-card__content {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0.75rem 1rem;
  z-index: 2;
}

/* Icon - positioned at top */
.category-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  opacity: 0.9;
  transition: all 500ms ease;
  position: relative;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
  z-index: 2;
}

.category-card:hover .category-card__icon {
  opacity: 1;
  transform: scale(1.15);
}

@media (min-width: 768px) {
  .category-card__icon {
    width: 3.25rem;
    height: 3.25rem;
  }
}

.category-card__icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Mobile: horizontal name */
.category-card__name-mobile {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-top: 0.5rem;
}

/* Mobile: always force white text (ignore inline color from category config) */
@media (max-width: 767.98px) {
  .category-card,
  .category-card__name-mobile {
    color: #ffffff !important;
  }
}

@media (min-width: 768px) { .category-card__name-mobile { display: none; } }

/* Desktop: vertical name (hidden on hover) - centered vertically, below icon */
.category-card__name-vertical {
  display: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  text-align: center;
  font-size: 1.25rem;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 300ms ease;
  flex: 1;
  align-self: center;
  display: none;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .category-card__name-vertical {
    display: flex;
    font-size: 1.5rem;
  }
  .category-card:hover .category-card__name-vertical {
    opacity: 0;
    transform: scale(0);
  }
}

/* Desktop: horizontal name + desc (only on hover) */
.category-card__hover-content {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  opacity: 0;
  transform: scale(0.9);
  transition: all 500ms ease;
  text-align: center;
}

@media (min-width: 768px) {
  .category-card__hover-content { display: flex; }
  .category-card:hover .category-card__hover-content {
    opacity: 1;
    transform: scale(1);
  }
}

.category-card__hover-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

@media (min-width: 1024px) { .category-card__hover-title { font-size: 1.875rem; } }
@media (min-width: 1280px) { .category-card__hover-title { font-size: 2.25rem; } }

.category-card__hover-desc {
  font-size: 0.75rem;
  text-align: center;
  max-width: 28rem;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 1024px) { .category-card__hover-desc { font-size: 0.875rem; } }
@media (min-width: 1280px) { .category-card__hover-desc { font-size: 1rem; } }

.section-categories__cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ============ NEWS GRID SECTION ============ */
.section-news {
  padding: 4rem 0;
  background: #fff;
}

@media (min-width: 768px) { .section-news { padding: 6rem 0; } }

.section-news__title {
  font-family: var(--font-heading);
  font-style: italic;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.875rem;
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 3rem;
}

@media (min-width: 768px) { .section-news__title { font-size: 2.5rem; } }

/* ============ CTA / ASESORAMIENTO ============ */
.section-cta {
  padding: 4rem 0;
  color: #fff;
  background: linear-gradient(to right, var(--color-primary-600), var(--color-primary-800));
  text-align: center;
}

@media (min-width: 768px) { .section-cta { padding: 6rem 0; } }

.section-cta__title {
  font-family: var(--font-heading);
  font-style: italic;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.875rem;
  margin-bottom: 1rem;
  color: #fff;
}

@media (min-width: 768px) { .section-cta__title { font-size: 2.5rem; } }

.section-cta__desc {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

/* ============ WORLD MAP SECTION ============ */
.section-world-map {
  padding: 4rem 0;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

@media (min-width: 768px) { .section-world-map { padding: 6rem 0; } }

.section-world-map__title {
  font-family: var(--font-heading);
  font-style: italic;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.875rem;
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) { .section-world-map__title { font-size: 2.5rem; } }

.section-world-map__subtitle {
  text-align: center;
  color: #4b5563;
  max-width: 42rem;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
}

.world-map {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.world-map__mount {
  width: 100%;
}

.world-map__svg-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.world-map__legend {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
}

.world-map__country-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border-radius: 9999px;
  font-size: 0.875rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 300ms ease;
}

.world-map__country-tag:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.world-map__country-tag::before {
  content: '';
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.world-map__country-tag-text {
  font-family: var(--font-body);
  color: #374151;
  font-weight: 500;
}

/* Tooltip */
.world-map__backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.world-map__tooltip {
  position: fixed;
  z-index: 50;
  transform: translate(-50%, -120%);
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border: 2px solid var(--color-primary);
  min-width: 220px;
}

.world-map__tooltip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.world-map__tooltip-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.world-map__tooltip-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-align: center;
  margin: 0;
}

.world-map__tooltip-desc {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

.world-map__tooltip-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  color: #9ca3af;
}

.world-map__tooltip-close:hover {
  color: #374151;
  background: #e5e7eb;
}

/* ============ CARDS GRIDS ============ */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
