
/* =========================================
   СОФИЯ & ВАЛЕРИ — ОСНОВНИ НАСТРОЙКИ
   ========================================= */

:root {

  /* ЦВЕТОВЕ — управляват се според предназначението */

 /* --color-page: #fff; */
  --color-page-edge: #b07a88;

  --color-text: #b07a88;
  --color-heading: #701f3a;
  --color-subheading: #b07a88;

  --color-program-bg: #f2eada;
  --color-photo-border: #f2eada;

  --color-button-bg: #fff;
  --color-button-text: #701f3a;
  --color-button-border: #d9b9bd;

  --color-input-bg: #faf7f1;
  --color-input-border: #d9b9bd;
  --color-input-text: #701f3a;

  --color-decoration: #d9c3aa;


  /* ШРИФТОВЕ */

  --font-script: "Great Vibes", "Segoe Script", cursive;
  --font-body: "Sofia Sans Condensed", Arial, sans-serif;


  /* РАЗМЕРИ НА ШРИФТОВЕТЕ */

  --font-size-body: 19px;
  --font-size-h1: clamp(54px, 8vw, 100px);
  --font-size-h2: clamp(30px, 3.5vw, 42px);
  --font-size-h3: clamp(24px, 2.8vw, 30px);
  --font-size-subtitle: 20px;

  --font-size-intro: clamp(20px, 2.4vw, 27px);
  --font-size-invitation: clamp(20px, 2.4vw, 27px);
  --font-size-caption: 28px;
  --font-size-button: 19px;

  --font-size-countdown: 36px;
  --font-size-countdown-label: 20px;
}


/* =========================================
   ЛОКАЛНИ ШРИФТОВЕ
   ========================================= */

@font-face {
  font-family: "Great Vibes";
  src: url("fonts/GreatVibes-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sofia Sans Condensed";
  src: url("fonts/SofiaSansCondensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* =========================================
   ОБЩИ НАСТРОЙКИ
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  /* Типография */
  font-family: var(--font-body);
  font-size: var(--font-size-body);

  /* Размери и позициониране */
  margin: 0;

  /* Цветове */
  color: var(--color-text);
  background: linear-gradient(
    90deg,
    var(--color-page-edge) 0 4%,
    var(--color-page) 4% 96%,
    var(--color-page-edge) 96% 100%
  );
}

.page {
  /* Размери и позициониране */
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;

  /* Цветове */
  background: var(--color-page);
}


/* =========================================
   ОБЩА ТИПОГРАФИЯ
   ========================================= */

h1 {
  /* Типография */
  font-family: var(--font-script);
  font-size: var(--font-size-h1);
  font-weight: 400;
  line-height: 1.1;
  text-align: left;

  /* Размери и позициониране */
  position: relative;
  left: -40px;
  margin: 35% 0 0;

  /* Визия */
  white-space: nowrap;

  /* Цветове */
  color: var(--color-heading);
}

h2 {
  /* Типография */
  font-family: var(--font-script);
  font-size: var(--font-size-h2);
  font-weight: 400;
  line-height: 1.2;

  /* Размери и позициониране */
  margin: 0 0 28px;

  /* Цветове */
  color: var(--color-heading);
}

h3 {
  /* Типография */
  font-family: var(--font-script);
  font-size: var(--font-size-h3);
  font-weight: 400;
  line-height: 1.2;

  /* Размери и позициониране */
  margin: 7px 0 18px;

  /* Цветове */
  color: var(--color-subheading);
}

p {
  /* Типография */
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.5;

  /* Размери и позициониране */
  margin: 0 0 12px;

  /* Цветове */
  color: var(--color-text);
}

span.subtitle {
  /* Типография */
  font-family: var(--font-body);
  font-size: var(--font-size-subtitle);
  line-height: 1.3;
}


/* =========================================
   ГОРНА ЧАСТ — ХЕДЪР
   ========================================= */

.hero {
  /* Размери и позициониране */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 340px;
  padding: 40px 8% 35px 30%;
}

.hero-flowers {
  /* Размери и позициониране */
  position: absolute;
  top: 0;
  left: 0;
  width: min(47%, 540px);
  height: auto;

  /* Визия */
  object-fit: contain;
  object-position: top left;
}

h1 span {
  padding: 0 .12em;
}


/* =========================================
   ПЛАВАЩ БУТОН ЗА МУЗИКАТА
   ========================================= */

.music-toggle {
  /* Типография */
  font-size: 25px;

  /* Размери и позициониране */
  position: fixed;
  top: auto;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;

  /* Визия */
  border: 1px solid var(--color-decoration);
  border-radius: 50%;
  box-shadow: 0 3px 12px #0002;
  cursor: pointer;

  /* Цветове */
  background: rgba(242, 234, 218, 0.7);
  color: var(--color-heading);

  /* Ефекти */
  transition: background-color .2s ease, transform .2s ease;
}

.music-toggle:hover {
  background: rgba(242, 234, 218, 1);
  transform: scale(1.06);
}

.music-toggle:focus-visible {
  outline: 3px solid var(--color-decoration);
  outline-offset: 3px;
}


/* =========================================
   ВЪВЕДЕНИЕ
   ========================================= */

.intro {
  /* Размери и позициониране */
  padding: 42px 18px 10px;
  text-align: center;
}

.intro p {
  /* Типография */
  font-family: var(--font-script);
  font-size: var(--font-size-intro);
  line-height: 1.7;

  /* Размери и позициониране */
  margin: 0 auto 18px;
}


/* =========================================
   СНИМКИ НА МЛАДОЖЕНЦИТЕ
   ========================================= */

.couple-art {
  /* Размери и позициониране */
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.couple-art img {
  /* Размери и позициониране */
  display: block;
  width: min(92%, 1050px);
  height: auto;
  margin: 0 auto;
}


/* =========================================
   СВАТБЕНА ПОКАНА
   ========================================= */

.invitation {
  /* Типография */
  font-family: var(--font-script);
  font-size: var(--font-size-invitation);
  line-height: 1.85;
  font-weight: 400;
  text-align: center;

  /* Размери и позициониране */
  max-width: 600px;
  margin: 42px auto 0;
  padding: 0 28px;
}

.invitation p {
  margin-bottom: 13px;
  font-family: var(--font-script);
  font-size: var(--font-size-h3);
}


/* =========================================
   КУМОВЕ
   ========================================= */

.godparents {
  /* Размери и позициониране */
  padding: 100px 5%;
  text-align: center;
}

.godparents-grid {
  /* Размери и позициониране */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  max-width: 920px;
  margin: 0 auto;
}

.godparents figure {
  margin: 0;
}

.godparents img {
  /* Размери и позициониране */
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin: 0 auto;
}

figcaption {
  /* Типография */
  font-family: var(--font-script);
  font-size: var(--font-size-caption);
  font-weight: 400;

  /* Размери и позициониране */
  margin-top: 2px;

  /* Цветове */
  color: var(--color-subheading);
}


/* =========================================
   ПРОГРАМА
   ========================================= */

.program {
  /* Размери и позициониране */
  padding: 42px 4% 38px;
  text-align: center;

  /* Цветове */
  background: rgba(242, 234, 218, 0.4);
}

.program h2 {
  margin-bottom: 28px;
}

.program-grid {
  /* Размери и позициониране */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  max-width: 850px;
  margin: 0 auto;
  padding: 20px;
}

.event {
  min-width: 0;
}

.event-photo {
  /* Размери и позициониране */
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 auto 18px;
  overflow: hidden;

  /* Визия */
  border: 3px solid var(--color-photo-border);
  border-radius: 8px;
  box-shadow: 0 3px 10px var(--color-decoration);
}

.event-photo img {
  /* Размери и позициониране */
  display: block;
  width: 100%;
  height: 100%;

  /* Визия */
  object-fit: cover;
  object-position: center;
}

.event h3 {
  margin-bottom: 18px;
}

.event p {
  margin: 8px 0;
}

.map-button {
  /* Типография */
  font-family: var(--font-body);
  text-decoration: none;

  /* Размери и позициониране */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 18px;

  /* Визия */
  border: 1px solid var(--color-button-border);
  border-radius: 5px;
  box-shadow: 0 3px 5px var(--color-decoration);
  /* Цветове */
  background: var(--color-button-bg);
  color: var(--color-button-text);

  /* Ефекти */
  transition:
    background-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.map-marker {
  /* Размери и позициониране */
  width: 24px;
  height: auto;
  flex-shrink: 0;
}

.map-button:hover .map-marker {
  animation: pin-spin 1.5s ease-in-out;
}

@keyframes pin-spin {
  from {
    transform: perspective(300px) rotateY(0deg);
  }
  to {
    transform: perspective(300px) rotateY(360deg);
  }
}


/* =========================================
   RSVP — ПОТВЪРЖДЕНИЕ НА ПРИСЪСТВИЕ
   ========================================= */

.rsvp {
  /* Размери и позициониране */
  max-width: 850px;
  margin: 25px auto 55px;
  padding: 25px 28px;
  text-align: center;
}

.rsvp h2 {
  margin-bottom: 8px;
}

.rsvp-lead,
.rsvp-deadline {
  font-size: var(--font-size-subtitle);
}

.rsvp-actions,
.form-buttons {
  /* Размери и позициониране */
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

button {
  font: inherit;
}

.primary-button,
.secondary-button {
  /* Типография */
  font-family: var(--font-body);
  font-size: var(--font-size-button);

  /* Размери и позициониране */
  padding: 11px 18px;
  cursor: pointer;

  /* Визия */
  border: 1px solid var(--color-heading);
  border-radius: 4px;
}

.primary-button {
  background: var(--color-heading);
  color: white;
}

.secondary-button {
  background: var(--color-button-bg);
  color: var(--color-button-text);
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

#rsvpForm {
  text-align: left;
}
#rsvpForm input[name="phone"]::placeholder {
  color: var(--color-text);
  opacity: 1;
}
.form-grid {
  /* Размери и позициониране */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid label {
  /* Типография */
  font-family: var(--font-body);
  font-size: 18px;

  /* Размери и позициониране */
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;

  /* Цветове */
  color: var(--color-heading);
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  /* Типография */
  font: 17px var(--font-body);

  /* Размери и позициониране */
  width: 100%;
  padding: 10px;

  /* Визия */
  border: 1px solid var(--color-input-border);
  border-radius: 3px;

  /* Цветове */
  background: var(--color-input-bg);
  color: var(--color-input-text);
}

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--color-heading);
  box-shadow: 0 0 0 2px rgba(112, 31, 58, 0.15);
}

.form-note {
  font-size: 16px;
  text-align: center;
  color: var(--color-subheading);
}
.phone-input {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.phone-input select {
  flex: 0 0 auto;
  width: 112px;
}

.phone-input input {
  flex: 1;
  min-width: 0;
 
}

/* =========================================
   ДОЛНА ЧАСТ
   ========================================= */

.footer {
  /* Размери и позициониране */
  padding: 10px 3% 45px;
  text-align: center;
}

.footer img {
  /* Размери и позициониране */
  display: block;
  width: min(94%, 1080px);
  height: auto;
  margin: 0 auto;
}

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

.footer a:hover {
  color: var(--color-subheading);
}


/* =========================================
   БРОЯЧ
   ========================================= */

.countdown {
  /* Типография */
  font-family: var(--font-body);

  /* Размери и позициониране */
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 42px);
  margin: 40px auto;

  /* Цветове */
  color: var(--color-heading);
}

.countdown div {
  display: grid;
  gap: 2px;
  min-width: 48px;
}

.countdown strong {
  font-size: var(--font-size-countdown);
  font-weight: 600;
}

.countdown span {
  font-size: var(--font-size-countdown-label);
  color: var(--color-subheading);
}


/* =========================================
   ОБЩИ НАСТРОЙКИ
   ========================================= */

[hidden] {
  display: none !important;
}


/* =========================================
   ГОЛЕМИ ЕКРАНИ
   ========================================= */

@media (min-width: 900px) {

  body {
    background: linear-gradient(
      90deg,
      var(--color-page-edge) 0 4%,
      var(--color-page) 4% 96%,
      var(--color-page-edge) 96% 100%
    );
  }

  .hero {
    min-height: 390px;
  }
}


/* =========================================
   ТЕЛЕФОНИ И МАЛКИ ЕКРАНИ
   ========================================= */

@media (max-width: 650px) {

  :root {
    --font-size-h1: clamp(34px, 9vw, 58px);
    --font-size-caption: 23px;
    --font-size-countdown: 20px;
    --font-size-invitation: 22px;
  }

  body {
    background: var(--color-page);
  }

  .hero {
    /* Размери и позициониране */
    min-height: 230px;
    padding: 25px 4% 25px 24%;
    justify-content: center;
  }

  .hero-flowers {
    width: 40%;
    left: 0;
  }

  h1 {
    margin-top: 20px;
    white-space: normal;
  }

  .music-toggle {
    width: 46px;
    height: 46px;
    right: 16px;
    bottom: 16px;
    background: rgba(242, 234, 218, 0.7);
    transition: background-color .25s ease;
  }

  .music-toggle:hover {
    background: rgba(242, 234, 218, 1);
  }

  .intro {
    padding-top: 30px;
  }

  .desktop-only {
    display: none;
  }

  .countdown {
    gap: 14px;
  }

  .invitation {
    line-height: 1.65;
    padding: 0 20px;
  }

  .godparents {
    padding: 55px 5% 20px;
  }

  .godparents-grid {
    gap: 12px;
  }

  .program {
    padding: 25px 12px;
  }

  .program-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 18px;
  }

  .event h3 {
    margin-bottom: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .rsvp {
    padding: 20px 16px;
  }
}

/* Премахване на синьото оцветяване при Autofill в Chrome */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--color-input-text);
  -webkit-box-shadow: 0 0 0 1000px var(--color-input-bg) inset;
  transition: background-color 9999s ease-out;
  background: var(--color-input-bg); 
  color: var(--color-input-text); 


}

#rsvpForm textarea {
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--color-input-text) transparent;
}

/* Chrome, Edge, Safari */
#rsvpForm textarea::-webkit-scrollbar {
  width: 7px;
}

#rsvpForm textarea::-webkit-scrollbar-track {
  background: transparent;
}

#rsvpForm textarea::-webkit-scrollbar-thumb {
  background-color: var(--color-input-bg);
  border-radius: 10px;
  border: 2px solid var( --color-button-border);
  background-clip: padding-box;
}

#rsvpForm textarea::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-input-text);
}

/* RSVP – фиксиран цвят на текста във всички полета */
#rsvpForm input,
#rsvpForm textarea,
#rsvpForm select {
  color: var(--color-input-text) !important;
  -webkit-text-fill-color: var(--color-input-text) !important;
  font-family: var(--font-body);
}