:root {
  /* Paleta verde elegante */
  --primary: #93BFC7;          /* Verde azulado principal */
  --primary-light: #ABE7B2;    /* Verde menta claro */
  --primary-dark: #75A6AE;     /* Verde azulado oscuro */
  --secondary: #CBF3BB;        /* Verde menta brillante */
  --secondary-light: #ECF4E8;  /* Verde pálido */
  --secondary-dark: #202020;   /* Verde menta oscuro */
  --text-green: #60805c;       /* Verde oscuro para texto #2C3C34 */
  
  /* Tonos neutros */
  --bg: #FFFFFF;
  --bg-alt: #F7FAF5;          /* Fondo alternativo verde suave */
  --bg-accent: #ECF4E8;       /* Fondo con toque verde */
  
  /* Texto */
  --text: #2C3C34;            /* Verde oscuro para texto */
  --text-muted: #5B7268;      /* Verde grisáceo para texto secundario */
  --text-light: #789088;      /* Verde suave para texto terciario */
  --itinerario: #a8d49e;     /* Verde suave para itinerario */
  
  /* Acentos y estados */
  --accent: var(--primary);
  --accent-light: var(--primary-light);
  --success: #739E82;         /* Verde sage elegante */
  --success-light: #A5C0AE;   /* Verde sage claro */
  
  /* Bordes y separadores */
  --border: #E8E1E4;          /* Borde suave */
  --border-light: #F2ECE7;    /* Borde más claro */
  
  /* Gradientes */
  --hero-start: #F2D9E6;      /* Rosa muy suave */
  --hero-end: var(--bg);
  
  /* Medidas y espaciado */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1000px;
  --section-spacing: clamp(3rem, 8vw, 5rem);
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(42,93,67,0.04);
  --shadow: 0 4px 12px rgba(42,93,67,0.08);
  --shadow-lg: 0 8px 24px rgba(42,93,67,0.12);
  
  /* Tipografía */
  --font-heading: "Tangerine", cursive;
  --font-body: "Poppins", system-ui, sans-serif;
  --font-special: "Great Vibes", cursive;
  --font-title: "EB Garamond", serif;
}

/* Base / Mobile-first */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

html, body {
  height: 100%;
}

.mb-3 {
  margin-bottom: 0rem !important;
}

.h4{
  font-family: var(--font-heading);
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
}

.form-label{
  font-family: var(--font-body);
  color: var(--text);
  font-weight: 400;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

body {
  font-family: var(--font-body);
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
  background-image: 
    radial-gradient(circle at top left, var(--bg-alt) 0%, transparent 20%),
    radial-gradient(circle at bottom right, var(--bg-alt) 0%, transparent 20%);
  background-attachment: fixed;
  background-image: url('../images/Invitacion.PNG');
}

section {
  text-align: center;
  position: relative;
  background: var(--bg);
  margin: 0 auto;
  background-image: url('../images/Invitacion.PNG');
  background-position: center;
  background-size: cover;
}

.mb-0 {
  margin-bottom: 0 !important;
  white-space: nowrap;
  font-size: 1rem;
}

section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 200px;
  height: 1px;
  background: var(--muted-border);
}

/* Limit content width for large screens */
section, header, footer {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}

.mountain img{
  margin-top: -25px;
}

.rings img{
  width:130px;
  height:130px;
  margin-top: -25px;
}

.cheers img{
  width:140px;
  height:150px;
  margin-top: -15px;
  margin-bottom: 15px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.4)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(3.8rem, 8vw, 4.5rem);
  font-weight: 700;
  font-style: normal;
  color: white;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.0rem, 4vw, 2.2rem);
  color: var(--secondary-light);
  margin: 1rem 0;
  line-height: 1.4;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
  margin-top: -25px;
}

.containericon img{
  display: block;
  margin: auto;
  width: 647px;
  height: 915px;
  margin-top: -5rem;
}

h2 {
  font-family: var(--font-heading);
  color: var(--text-green);
  margin: 0 0 1.5rem 0;
  font-size: clamp(5rem, 4vw, 2rem);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
}

/* Countdown box */
#countdown {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.5rem;
  align-items: stretch;
  justify-content: center;
  padding: 1rem;
  max-width: 700px;
  margin: 1.5rem auto;
  position: relative;
  font-size: clamp(0.7rem, 2.5vw, 1rem);
}

#countdown.row {
  margin-left: 0;
  margin-right: 0;
}

.countdown-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  padding: clamp(0.5rem, 2vw, 1.2rem);
  background: var(--bg);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 15px rgba(157, 107, 126, 0.08),
    0 1px 3px rgba(157, 107, 126, 0.1);
  position: relative;
  overflow: hidden;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  transition: all 0.3s ease;
}

.countdown-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--secondary-light));
  opacity: 0.5;
}

.countdown-item .number {
  font-family: var(--font-heading) !important;
  font-size: clamp(1.8rem, 4vw, 3.5rem) !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  line-height: 1;
  margin-bottom: 0.25rem !important;
  padding: 0 !important;
}

.countdown-item .label {
  font-size: clamp(0.6rem, 2vw, 0.85rem) !important;
  color: var(--text-light) !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.countdown-item:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 8px 20px rgba(157, 107, 126, 0.12),
    0 2px 5px rgba(157, 107, 126, 0.1);
  border-color: var(--secondary-light);
}

.button {
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  text-transform: uppercase;
  text-align: center;
}

button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-dark));
  transform: translateY(-1px);
  box-shadow: 
    0 8px 20px rgba(157, 107, 126, 0.2),
    0 2px 5px rgba(157, 107, 126, 0.1);
}

button:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(157, 107, 126, 0.2),
    0 4px 15px rgba(157, 107, 126, 0.15);
}

button:active {
  transform: translateY(1px);
}

input, select, textarea {
  padding: 0.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0;
  width: 100%;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--bg);
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(157, 107, 126, 0.1);
  background: var(--bg-accent);
}

input::placeholder, select::placeholder, textarea::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

/* Historia fotos */
.historia-fotos {
  position: relative;
  width: 320px;
  height: 420px;
  margin: 3rem auto;
  perspective: 1200px;
  background: transparent;
  border-radius: var(--radius-lg);
}

.historia-fotos .card-stack {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1200px;
}

.img-fluid{
  border-radius: var(--radius-lg);
  max-width: 716px;
  height: auto;
}

.img-fluids{
  border-radius: var(--radius-lg);
  max-width: 716px;
  height: auto;
  margin-top: -5rem;
}

.historia-fotos .photo-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  border-radius: 12px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
  user-select: none;
  touch-action: none;
  transform-origin: center 80%;
  will-change: transform, opacity;
  border: 6px solid white;
  overflow: hidden;
}

.historia-fotos .photo-card:first-child {
  cursor: grab;
  z-index: 10;
  transform: rotateZ(4deg);
}

.historia-fotos .photo-card:nth-child(2) {
  transform: scale(0.92) translateY(15px) rotateZ(-8deg);
  opacity: 0.85;
  z-index: 9;
}

.historia-fotos .photo-card:nth-child(3) {
  transform: scale(0.84) translateY(30px) rotateZ(12deg);
  opacity: 0.7;
  z-index: 8;
}

.historia-fotos .photo-card:nth-child(4) {
  transform: scale(0.76) translateY(45px) rotateZ(-6deg);
  opacity: 0.55;
  z-index: 7;
}

.historia-fotos .photo-card:nth-child(n+5) {
  transform: scale(0.68) translateY(60px) rotateZ(9deg);
  opacity: 0.4;
  z-index: 0;
}

.historia-fotos .photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.historia-fotos .photo-card.swiping {
  transition: none;
  cursor: grabbing;
}

.historia-fotos .photo-card.swipe-left {
  animation: swipeOutLeft 0.3s ease-out forwards;
}

.historia-fotos .photo-card.swipe-right {
  animation: swipeOutRight 0.3s ease-out forwards;
}

@keyframes swipeOutLeft {
  to {
    transform: translateX(-150%) rotate(-25deg);
    opacity: 0;
  }
}

@keyframes swipeOutRight {
  to {
    transform: translateX(150%) rotate(25deg);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .historia-fotos {
    width: 280px;
    height: 380px;
    margin: 2.5rem auto;
  }

  .historia-fotos .photo-card {
    border: 5px solid white;
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .historia-fotos {
    width: 240px;
    height: 320px;
    margin: 2rem auto;
  }

  .historia-fotos .photo-card {
    border: 4px solid white;
    border-radius: 8px;
  }

  .historia-fotos .photo-card:first-child {
    transform: rotateZ(4deg);
  }

  .historia-fotos .photo-card:nth-child(2) {
    transform: scale(0.88) translateY(12px) rotateZ(-8deg);
  }

  .historia-fotos .photo-card:nth-child(3) {
    transform: scale(0.76) translateY(24px) rotateZ(12deg);
  }

  .historia-fotos .photo-card:nth-child(4) {
    transform: scale(0.64) translateY(36px) rotateZ(-6deg);
  }

  .historia-fotos .photo-card:nth-child(n+5) {
    transform: scale(0.52) translateY(48px) rotateZ(9deg);
  }
}

#invitado-info.oculto{display:none}

footer {
  background-color: var(--hero-start);
  padding: 1rem;
  color: #2a5d43;
}

/* Form / confirmation area */
.codigo-form{
  display:flex;
  gap:0.5rem;
  align-items:center;
  justify-content:center;
  margin-top:0.6rem;
}

.codigo-form input[type="text"]{min-width:0;flex:1}
.codigo-form button{flex:0 0 auto}

#invitado-info{margin-top:1rem}

form#formConfirmacion{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.6rem;
  margin-top:0.6rem;
}

label{font-weight:600}

/* make iframe responsive (keeps width 100% but control max-height) */
iframe{border:0; width:100%; max-width:100%; height:250px; border-radius:8px}

/* Small desktop / tablet adjustments */
@media (min-width: 640px){
  section{padding:2rem 1.25rem}
  .codigo-form{max-width:560px; margin-left:auto; margin-right:auto}
}

@media (min-width: 900px) {
  body {
    font-size: 17px;
  }
  
  .hero {
    padding: calc(var(--section-spacing) * 1.5) 2rem;
    margin-bottom: 2rem;
  }

  section {
    padding: var(--section-spacing) 2rem;
  }

  .historia-fotos {
    padding: 2rem;
    gap: 2rem;
  }

  iframe {
    height: 380px;
    box-shadow: var(--shadow);
  }

  .codigo-form {
    display: flex;
    gap: 1rem;
    max-width: 700px;
  }

  .codigo-form input {
    width: auto;
    min-width: 300px;
  }

  #countdown {
    margin: 3rem auto;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .countdown-item {
    transform: translateY(0);
    transition: transform 0.3s ease;
    min-width: unset;
  }

  .countdown-item:hover {
    transform: translateY(-5px);
  }
}

/* Bootstrap overrides */
.card {
  background: transparent !important;
  border: none !important;
}

.alert-primary {
  background: var(--bg-accent) !important;
  border: 2px solid var(--primary-light) !important;
  color: var(--primary-dark) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.bg-primary {
  background: var(--primary) !important;
}

.btn-primary {
  background: var(--success) !important;
  border: none !important;
  font-size: 15px !important;
  margin-bottom: 10px !important;
  margin-top: 10px !important;
}

.btn-primary:hover {
  background: var(--text-green)!important;
  transform: translateY(-1px);
}

/* Utility helpers */
.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}

/* Accessibility focus state */
button:focus, input:focus, select:focus, textarea:focus{box-shadow:0 0 0 3px rgba(107,191,128,0.15)}

/* small tweaks for number input spinner consistency */
input[type=number]{-moz-appearance:textfield; -webkit-appearance:textfield; appearance:textfield}

/* Contador: tamaño aumentado para escritorio y móvil */
.contador-title{
  font-family: var(--font-title);
  font-weight: 400;
  /* más grande en escritorio, todavía responsivo */
  font-size: clamp(1.0rem, 5.5vw, 2.0rem);
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.countdown-grid{ /* container set as flex in HTML */
  gap: 1.5rem;
}

.count-box{
  width: 120px;
  height: 96px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(42,93,67,0.08);
}

.count-box .number{
  font-family: var(--font-title);
  font-size: 3.5rem;
  color: var(--text-green);
  line-height: 1;
  margin-bottom: 10px;
}

.count-label{
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contador-subtitle{
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

.date-display{
  align-items: center;
  background-image: url('../images/center.png');
  background-size: 150px 150px;
  background-position: center;
  background-repeat: no-repeat;
}

.date-side{
  min-width: 160px;
}


.date-label{
  font-family: var(--font-body);
  color: var(--text-green);
  font-size: 1.3rem;
  border-top: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  padding: 0.5rem 0;
}

.date-day{
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--text-green);
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.section2 h5{
  font-family: var(--font-heading);
  font-size: 5rem;
  color: var(--text-green);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.dresscode{
  margin-bottom: 2rem;
}

.regalos{
  margin-bottom: 2rem;
}

.dresscode img{
  width: 130px;
  height: 130px;
  margin-bottom: 1rem;
}

.regalos img{
  width: 100px;
  height: 100px;
  margin-bottom: 1rem;
}
.section2 p{
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  padding: 10px;
}

.input-group{
  max-width: 400px;
  margin: 0 auto;
}

.input-group input{
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--bg);
  color: var(--text);
}

.btn-sobres {
  display: inline-block;
  background-color: transparent;
  color: #7fa88c;              /* Verde suave */
  border: 1.5px solid #7fa88c;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: default;             /* Importante */
}

.py-5 {
  padding-top: 1rem !important;
  padding-bottom: 3rem !important;
}

.codigo-form input[type="text"] {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

@media (max-width: 900px){
  .count-box{ width: 100px; height: 82px }
  .count-box .number{ margin-bottom: 10px; font-size: 2.6rem}
  .date-side{ min-width: 110px }
  .date-day{ font-size: 8rem; margin-bottom: 2rem; }
  .contador-title{ font-size: clamp(1.0rem, 6vw, 1.9rem) }
  .count-label{ font-size: 0.8rem }
  .containericon img { width: 100%; height: auto; }
}

@media (max-width: 640px){
  .count-box{ width: 84px; height: 72px }
  .count-box .number{ margin-bottom: 10px; font-size: 2.4rem }
  .date-side{ min-width: 80px }
  .date-day{ font-size: 8.6rem; margin-bottom: 2rem; }
  .contador-title{ font-size: clamp(1.0rem, 6vw, 1.9rem); white-space: nowrap; justify-content: center;}
  .contador-subtitle{ font-size: 1.5rem }
  .count-label{ font-size: 0.7rem }
  .section2 h5{ font-size: 3.5rem }
  .img-fluid { width: 95%; height: auto ; border-radius: 0%; display:flex; justify-content:center}
  .img-fluids { width: 95%; height: auto ; border-radius: 0%; display:flex; justify-content:center; margin-top: -4rem}
  .containericon img { width: 85%; height: auto; margin-top: -5rem;}
    h2{ font-size: clamp(2.5rem, 6vw, 4.5rem) }
  .codigo-form input[type="text"]{ font-size: 0.85rem }
  .mb-0 { font-size: 0.85rem }
}

/* Itinerario inline dentro de contador */
.itinerario-inline {
  margin-top: 0rem;
  padding-top: 0rem;
}

.itinerario-subtitle {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  color: var(--text);
  font-weight: 600;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 10px;
  margin-bottom: 10px;
}

.timeline-item {
  display: flex;
  align-items: center;
  text-align: left;
  padding-bottom: 20px;
  margin-bottom: 40px;          /* space between sections */
  position: relative;           /* needed for the line */
}

/* separator line */


/* hide line on last item */
.timeline-item:last-of-type::after {
  display: none;
}

.timeline-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  border-radius: 50%;
  color: white;
}

.timeline-text h5 {
  font-size: 1.5rem;
  color: var(--text-green);
  font-weight: 600;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 5rem;
}

.timeline-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 640px){


  .itinerario-inline {
    margin-top: 0;
    padding-top: 0;
  }
  
  .timeline-icon {
    width: 42px;
    height: 42px;
  }
  
  .timeline-icon i {
    font-size: 1.2rem !important;
  }
  
  .timeline-text h5 {
    font-size: 3.5rem;
    text-align: center;
    margin-top: -1rem;
  }
  
  .timeline-text p {
    font-size: 1.3rem;
  }
}


