:root {
  --bata-red: #E20613;
  /* Bootstrap danger override (adjusted per request) */
  --bs-danger: #ec2236;
  --bs-btn-bg: #ec2236;
  --bg: #f8f9fa;
  --card: #ffffff;
  --ink: #212529;
  --muted: #6c757d;
  --line: #dee2e6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  /* Page background uses the hero image; right-centered so the "right part" of the artwork is visible.
     Primary image should be placed at assets/images/hero-bg.jpg; falls back to remote image. */
  background-image: url('assets/images/background.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-color: var(--bg);
  font-family: Montserrat, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  scroll-behavior: smooth;
  position: relative;
}

/* Subtle dark overlay to improve contrast of foreground elements against the background image.
   Keep its z-index below Bootstrap modal/backdrop z-index values (backdrop:1040, modal:1050). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  /* overlay removed - transparent background */
  background: transparent;
  pointer-events: none;
  z-index: 1030; /* below modal-backdrop (1040) and modal (1050) */
}

/* Keep the main page container above the overlay so content is visible */
.container-fluid {
  position: relative;
  z-index: 1035;
}

/* Header */
.header .logo {
  height: 40px;
  width: auto;
}

.btn-cta {
  transition: all 0.3s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 34, 54, 0.3);
}

/* Ensure .btn-danger and .bg-danger use the adjusted danger color */
.btn-danger,
.bg-danger {
  background-color: var(--bs-btn-bg) !important;
  border-color: var(--bs-btn-bg) !important;
  color: #fff !important;
}

.btn-danger:hover,
.bg-danger:hover {
  filter: brightness(0.95);
}

/* Hero Section */
.hero {
  background: transparent;
  min-height: 560px;
}

.hero-left {
  /* Hide the left hero panel so the landing shows only the right side artwork as the page background.
     On smaller screens we'll keep a smaller height but still hide the left panel to center the content. */
  display: none;
  min-height: 0;
}

/* Hero content (if displayed) should sit above overlay and retain readable white text */
.content {
  position: relative;
  z-index: 3;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-left .overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2));
}

.hero-left h1 {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
}

.hero-left .badge-logos img {
  opacity: 0.95;
  transition: opacity 0.3s;
}

.hero-left .badge-logos img:hover {
  opacity: 1;
}

.hero-right {
  /* background removed as requested */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Center the calendar board and give it a white box with black border */
.board {
  /* change board background to soft green as requested */
  background: tran;
  /* remove heavy black border — the decorative frame (.board-frame) will provide the outer contour */
  border: none;
  /* keep inner width so it sits nicely inside the frame */
  max-width: 912px;
  margin: 0 auto;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 200ms ease;
}

/* Decorative framed contour around the board (outer rounded area like the provided mock) */
.board-frame {
  /* width accounts for .board max-width + frame padding */
  max-width: calc(912px + 2 * 20px);
  margin: 3rem auto;
  position: relative;
  border-radius: 28px;
  /* background: #c8e2d8; Ensure consistent square background */
  padding: 20px;
  background-image: url(assets/images/caja.png);
  background-repeat: no-repeat;
  background-size: cover;
}

/* Roseta (bow) centered above the frame and outside the contour */
.roseta {
    position: absolute;
    top: -105px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: auto;
    pointer-events: none;
    z-index: 1;
}

/* Roseta (bow) centered above the frame and outside the contour */
.titulo {
    position: absolute;
    top: -95px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: auto;
    pointer-events: none;
    z-index: 1;
}

/* Roseta (bow) centered above the frame and outside the contour */
.titulo_head {
    position: absolute;
    top: -195px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: auto;
    pointer-events: none;
    z-index: 1;
}

/* Roseta (bow) centered above the frame and outside the contour */
.logo_bata {
    position: absolute;
    top: 30px;
    right: 20px;
    width: 200px;
    height: auto;
    pointer-events: none;
    z-index: 1;
}


/* Ensure the header (text + small image) outside the frame matches the frame width */
.calendar-header {
  max-width: calc(912px + 2 * 20px);
  margin: 0 auto 12px;
  padding: 0 6px;
}

/* Calendar header (image + text) */
.calendar-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-header-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0.06);
  background: #fff;
}
.calendar-header-text h2 {
  font-family: 'Mountains of Christmas', cursive;
  font-size: 1.125rem;
  margin: 0;
  color: var(--bata-red);
}
.calendar-header-text .small {
  margin-top: 2px;
  color: var(--muted);
}

/* Calendar Board */
.calendar-title {
  color: #b91c1c;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gift-icon {
  width: 48px;
  height: 48px;
  background: var(--bata-red);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(226, 6, 19, 0.2);
}

/* Calendar Grid */
.calendar {
  display: grid;
  /* remove gap to use a normal grid layout */
  grid-template-columns: repeat(6, 1fr);
  gap: 0; /* Remove gap between grid items */
  position: relative;
  z-index: 2;
  zoom: 0.8;
}
.textobajada, .textobajadatitle{
  display: none;
}
@media (max-width: 767px) {
  .calendar {
    grid-template-columns: repeat(2, 1fr);
  }
  .titulo, .titulo_head {
    width:100%
  }
  .titulo, .titulo_head{
    display: none;
  }
  .roseta {
    width: 150px;
    top: -90px;
  }
  .board {
    max-width: 315px;
  }
  .board-frame {
    max-width: calc(312px + 2 * 20px);
    background-image: none;
    background-color: #c7c7c7;
  }
  .col-lg-6.hero-right.position-relative.mx-auto, .board-frame{
    margin-bottom: 0px !important;    
  }
  .site-footer{
    display: none;
  }
  .textobajada{
      display: block !important;
      position: absolute;
      top: -107px;
      width: 100%;
      left: 0px;
      float: left;
      color: #ffffff;
      font-size: 18px;
      text-align: center;
  }
  .textobajadatitle{
      display: block !important;
      position: absolute;
      top: -167px;
      width: 100%;
      left: 0px;
      float: left;
      color: #ffffff;
      font-size: 28px;
      text-align: center;
      font-weight: 900px;
  }
  .logo_bata {
    position: absolute;
    top: 30px;
    right: 30%;
    width: 145px;
   }
}

@media (max-width: 480px) {
  .calendar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Calendar Day Card */
/* Adjust .day to ensure perfect square and reduce size slightly */
.day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #bcbaba;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.8rem 0.4rem 0.4rem 0.4rem; /* Slightly reduced padding */
  text-align: left;
  width: 150px; /* Fixed width for consistent sizing */
}

.day-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: 1.2em;
}
.day-number {
  font-size: 0.95rem;
  color: #6c757d;
  font-weight: bold;
  margin-left: 2px;
}
.day-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  flex-grow: 1;
  height: 100%;
}
.day-discount {
  font-size: 1.8rem;
  margin-top: 10px !important;
  font-weight: bold;
  color: #ec2236 !important;
  margin: 0.2em 0 0.1em 0;
  line-height: 24px;
  text-align: center;
}

/* Make all text in .day-description bold */
.day-description {
  font-weight: bold;
}

.day-action {
  font-weight: bold;
  color: #cf0827; /* Red color */
  text-align: center;
  display: block; /* Ensure centering */
}

.day-action {
  font-size: 0.9rem;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-top: auto;
  margin-bottom: 0.2em;
}

.day:hover:not(.disabled) {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(226, 6, 19, 0.15);
  border-color: var(--bata-red);
}

.day:active:not(.disabled) {
  transform: translateY(-2px) scale(1);
}

.day.disabled {
  opacity: 0.5;
  filter: grayscale(0.3);
  cursor: not-allowed;
}

.day .num {
  position: absolute;
  top: 6px;
  left: 8px;
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--bata-red);
}

.day .promo {
  font-weight: 800;
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: #111;
  text-align: center;
  margin-bottom: 4px;
}

.day .sub {
  font-size: 0.65rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.2;
}

.day .icon {
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 1.25rem;
}

/* New styles for calendar-day class */
.calendar-day {
    background-color: #ffffff; /* Fondo blanco */
    margin: 5px; /* Espacio de 5px entre cuadros */
    padding: 10px; /* Espaciado interno */
    border-radius: 5px; /* Bordes redondeados */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Sombra sutil */
    width: 170px;
    min-height: 210px;
}

.calendar-day .discount {
    color: var(--bata-red); /* Color rojo para el descuento */
    font-size: 1.2em; /* Tamaño de fuente más grande */
    font-weight: bold; /* Negrita */
}

/* Animación de ampliación para el cuadro activo */
@keyframes expandDay {
  from {
    transform: scale(1);
    z-index: 10;
  }
  to {
    transform: scale(1.8);
    z-index: 1000;
  }
}

.calendar-day.active-expanded {
  animation: expandDay 0.6s ease-out forwards;
  position: relative;
}

/* Animación de expansión centrada para el cuadro activo */
@keyframes expandToCenter {
  from {
    transform: scale(1);
    position: relative;
    z-index: 10;
  }
  to {
    transform: scale(2.5);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2.5);
    z-index: 1000000;
  }
}

.calendar-day.active-expanded {
  animation: expandToCenter 0.8s ease-out forwards;
  z-index: 1000000;
}

.calendar-day.active-expanded .close-expand-btn {
  display: block;
}

.close-expand-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bata-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  padding: 0;
}

.close-expand-btn:hover {
  background: #c41e3a;
}

/* Scene Effects */
.scene {
  pointer-events: none;
  z-index: 1;
}

.snow {
  overflow: hidden;
}

.snow i {
  position: absolute;
  top: -10px;
  background: #fff;
  border-radius: 50%;
  animation: fall linear infinite;
}

/* Ensure snowflakes cover the entire site and animate properly */
#snow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1030; /* Below modal-backdrop (1040) */
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(0) translateX(0);
  }
  100% {
    transform: translateY(100vh) translateX(calc(100vw * var(--wind)));
  }
}

.trees {
  height: 35%;
  background-repeat: repeat-x;
  background-size: auto 80%;
  background-position: bottom center;
  opacity: 0.7;
}

.hills {
  height: 45%;
  /* background removed as requested */
  background: none;
}

/* Modal Customization */
.modal-content {
  border-radius: 20px;
  border: 2px solid #000;
}

.modal-header {
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
}

.form-control:focus,
.form-check-input:focus {
  border-color: var(--bata-red);
  box-shadow: 0 0 0 0.25rem rgba(226, 6, 19, 0.15);
}

.form-control-lg {
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.form-check-input:checked {
  background-color: var(--bata-red);
  border-color: var(--bata-red);
}

.border-dashed {
  border-style: dashed !important;
}

/* Footer */
.site-footer {
  background: transparent;
  color: var(--ink);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.site-footer .logo {
  height: 32px;
  width: auto;
}

.site-footer a {
  color: var(--ink);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .hero {
    min-height: auto;
  }
  
  .hero-left {
    min-height: 300px;
  }
  
  .hero-right {
    min-height: 500px;
  }
}

@media (max-width: 575px) {
  .hero-left {
    min-height: 220px;
  }
  
  .calendar {
    gap: 8px;
  }
  
  .day {
    border-radius: 0;
  }
}

/* Restore sensible padding for utility class .p-md-4 at medium screens and above
   (override previous accidental shrink to 0.2rem). Keep important to ensure
   consistent layout when Bootstrap utility classes are used). */
@media (min-width: 768px) {
  .p-md-4 {
    padding: 0.5rem !important;
  }
}

/* Accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-check-input:focus-visible {
  outline: 2px solid var(--bata-red);
  outline-offset: 2px;
}

/* Loading State */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
h5#modal-title {
    display: none;
}

/* Snowfall effect applied within the specific container */
.container-fluid.px-lg-5 {
  position: relative;
}

.container-fluid.px-lg-5 #snow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1030; /* Below modal-backdrop (1040) */
}
