@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Quicksand:wght@300..700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Playfair Display", serif;
  background-color: #f7f2ec;
  color: #422e16;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
}

.pozivnicaText {
  font-family: "Dancing Script", serif;
  color: #422e16;
  display: flex;
  margin-top: 20px;
  flex-direction: column;
  align-items: center;
  font-size: 1.5rem;
  line-height: 1.6;
}

section {
  width: 50%;
  max-width: 720px;
  margin: 3rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  section {
    width: 85%;
  }
}

h2 {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 1px;
}

p {
  font-size: 1.1rem;
}

img {
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
  display: block;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

#countdown > div {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
}

#countdown > div > div {
  flex: 1;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 1px;
}

#form {
  background-color: #f7f2ec;
  border: 1px solid #422e16;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 40px rgba(107, 78, 61, 0.15);
}

#form h2 {
  margin-bottom: 0.2rem;
}

#form p {
  margin-bottom: 1rem;
  font-style: italic;
}

#form label {
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  display: block;
}

#form input,
#form select,
#form textarea {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid #422e16;
  background: transparent;
  color: #422e16;
  transition:
    box-shadow 0.3s ease,
    border 0.3s ease;
}

#form textarea {
  min-height: 90px;
  resize: vertical;
}

#form input:focus,
#form select:focus,
#form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(107, 78, 61, 0.25);
}

#form .toggle-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.8rem;
}

#form button {
  margin-top: 1rem;
  align-self: center;
  padding: 0.8rem 2.2rem;
  border-radius: 50px;
  border: 2px solid #422e16;
  background-color: transparent;
  color: #422e16;
  font-size: 1rem;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#form button:hover {
  background-color: #422e16;
  color: #f7f2ec;
  transform: translateY(-2px);
}

#form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #422e16;
  color: #422e16;
  background-color: transparent;
  transform: none;
}

#form button:disabled:hover {
  background-color: transparent;
  color: #422e16;
  transform: none;
}

#form button {
  transition:
    all 0.3s ease,
    opacity 0.2s ease;
}

@media (max-width: 600px) {
  #form {
    padding: 2rem 1.5rem;
  }
}

.toggle-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.toggle-group input[type="radio"] {
  display: none;
}

.toggle-group .toggle {
  padding: 0.6rem 1.5rem;
  border: 2px solid #422e16;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  background-color: transparent;
  color: #422e16;
}

.toggle-group .toggle:hover {
  background-color: #422e16;
  color: #f7f2ec;
}

.toggle-group input[type="radio"]:checked + .toggle {
  background-color: #422e16;
  color: #f7f2ec;
}

#location {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

#location iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  #location {
    padding: 1rem;
  }

  #location iframe {
    height: 200px;
  }
}

#footer {
  margin: 0 auto 5rem auto;
  width: 50%;
  max-width: 720px;
  text-align: center;
  padding: 2.5rem 2rem;
  background-color: #422e16;
  color: #f7f2ec;
  border-radius: 15px;
  box-shadow: 0 15px 30px rgba(107, 78, 61, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

#footer h2 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

#footer p {
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  #footer {
    width: 85%;
    padding: 2rem 1.5rem;
  }
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.time-box {
  background-color: #422e16;
  color: #f7f2ec;
  padding: 1.2rem 0.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.time-box span {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.time-box small {
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-top: 0.3rem;
  text-transform: uppercase;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem auto 0 auto;
  width: 100%;
  max-width: 420px;
  justify-items: center;
}

#countdown {
  align-items: center;
}

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

#options,
#options-label,
#message,
#message-label {
  transition:
    opacity 0.3s ease,
    max-height 0.3s ease;
}

.hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  width: 60%;
}

.section-divider .line {
  flex: 1;
  height: 1px;
  background-color: #867764;
  margin: 0 10px;
}

.section-divider .stars {
  color: #867764;
  font-size: 24px;
  white-space: nowrap;
}

#plan .timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 2rem;
  position: relative;
}

#plan .timeline::before {
  display: none;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  z-index: 2;
}

.timeline-item .time {
  width: 50px;
  height: 30px;
  background-color: #422e16;
  color: #f7f2ec;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.timeline-item .time:hover {
  background-color: #f7f2ec;
  color: #422e16;
  border-color: #422e16;
}

.timeline-item .circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f7f2ec;
  border: 2px solid #422e16;
  color: #422e16;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  z-index: 2;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.timeline-item .circle:hover {
  transform: scale(1.2);
  background-color: #fff0e6;
  border-color: #422e16;
  cursor: pointer;
}

.timeline-item .label {
  font-size: 0.85rem;
  text-align: center;
  max-width: 100px;
  margin-top: 0.5rem;
  min-height: 40px;
}

.timeline-item:not(:last-child)::after {
  display: none;
}

@media (max-width: 900px) {
  #plan .timeline {
    flex-direction: column;
    align-items: center;
  }

  .timeline-item {
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    width: auto;
  }

  .timeline-item .time {
    order: 1;
    margin-bottom: 0.5rem;
  }

  .timeline-item .circle {
    order: 2;
    margin-bottom: 0.5rem;
  }

  .timeline-item .label {
    order: 3;
    text-align: center;
    max-width: 200px;
  }

  .timeline-item:not(:last-child)::after {
    display: none;
  }
}

.excel-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
  background-color: #1e6823;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.excel-btn:hover {
  background-color: #145214;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.excel-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
}

#lang-switcher select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 2px solid #422e16;
  background: #f7f2ec;
  color: #422e16;
  font-size: 14px;
  cursor: pointer;
}
