/*
 Theme Name:   TheGem Child
 Template:     thegem
 Version:      1.0
*/

/* =========== Layout für Formulare =========== */

/* 2 Spalten auf Desktop, 1 Spalte auf Mobil */
.wpcf7-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Formularelemente: Standard Abstand */
.wpcf7-form p {
  margin-bottom: 20px;
}

/* Eingabefelder & Textareas */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fafafa;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

/* Fokuszustand */
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
  border-color: #d32f2f;
  background: #fff;
  box-shadow: 0 0 5px rgba(211, 47, 47, 0.3);
  outline: none;
}

/* Textarea soll 2 Spalten breit sein */
.wpcf7-form textarea {
  grid-column: 1 / 3;
  min-height: 150px;
}

/* Checkbox-Bereich */
.wpcf7-form .wpcf7-acceptance {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-top: 30px;
}

/* Datenschutz-Link */
.wpcf7-form .wpcf7-acceptance a {
  color: #d32f2f;
  font-weight: 600;
  text-decoration: underline;
  transition: all 0.3s ease;
}

.wpcf7-form .wpcf7-acceptance a:hover {
  color: #b71c1c;
  text-decoration: none;
}

/* Labels */
.wpcf7-form label {
  font-weight: 600;
  font-size: 16px;
}

/* Platzhalter-Design */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  font-style: italic;
  font-size: 15px;
  color: #999;
}

/* =========== Formular-Button =========== */

.wpcf7-submit {
  grid-column: 1 / 3;
  background-color: #d32f2f;
  color: #fff;
  padding: 16px 32px;
  border: none;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.wpcf7-submit:hover {
  background-color: #b71c1c;
  transform: translateY(-2px);
  animation: wiggle 0.4s ease;
}

/* Button Animation - Wiggle */
@keyframes wiggle {
  0% { transform: translateY(0); }
  25% { transform: translateY(-2px); }
  50% { transform: translateY(2px); }
  75% { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}

/* Button Animation - Spinner */
@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Button bei Absenden (Spinner statt Text) */
.wpcf7-form.submitting .wpcf7-submit {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.wpcf7-form.submitting .wpcf7-submit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid #fff;
  border-top-color: #d32f2f;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

/* =========== Formular-Meldungen =========== */

/* Fehlermeldung */
.wpcf7-not-valid-tip {
  font-size: 13px;
  color: #e53935;
}

/* Erfolgreiche Absendung */
.wpcf7-mail-sent-ok {
  border: 2px solid #4caf50;
  padding: 15px;
  border-radius: 6px;
  background: #e8f5e9;
  color: #2e7d32;
}

/* Allgemeine Validierungsfehler */
.wpcf7-validation-errors {
  border: 2px solid #e53935;
  padding: 15px;
  border-radius: 6px;
  background: #ffebee;
  color: #b71c1c;
}

/* =========== Überschriften + Animierter Balken =========== */

/* Überschrift-Stil */
.formular-titel {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  position: relative;
  margin-bottom: 30px;
}

/* Animierter Balken unter Überschriften */
.balken-titel {
  position: relative;
  text-align: center;
  margin-bottom: 30px;
}

.balken-titel::after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  background-color: #d32f2f;
  margin: 10px auto 0;
  border-radius: 2px;
  transition: width 1.2s ease-in-out 0.3s;
  max-width: 180px;
}

.balken-titel.active::after {
  width: 100%;
}

/* =========== Responsive Optimierungen =========== */

@media (max-width: 768px) {
  
  /* Layout */
  .wpcf7-form .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Überschriften */
  .formular-titel {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .balken-titel {
    margin-bottom: 20px;
  }

  .balken-titel::after {
    max-width: 220px;
    height: 3px;
  }

  /* Button */
  .wpcf7-submit {
    padding: 14px 24px;
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .elementor-widget-heading h1, 
  .elementor-widget-heading h2, 
  .elementor-widget-heading h3 {
    font-size: 5vw; /* Skaliert sanft */
    line-height: 1.2em;
  }
}

@media (max-width: 768px) {
  .zauberschmiede-text {
    margin-top: -25px;
  }
}

/* === Benutzerdefiniertes CSS === */

/* ============================================
   Benutzerdefiniertes CSS für Zauberschmiede
   Enthält mobile Optimierungen, Layout-Elemente,
   Buttons, Typografie und Sektionen.
   ============================================ */

/* -------------------------------
   Mobile Typografie-Anpassungen
   ------------------------------- */
@media (-webkit-device-pixel-ratio: 1.25) {
    #primary-menu.no-responsive > li:not(.megamenu-template-enable) ul > li,
    #primary-menu.nav-menu.no-responsive > li.megamenu-enable > ul > li span.megamenu-column-header,
    .minisearch,
    .minisearch .sf-input {
        border-top: 0.8px solid #dfe5e8;
    }
    #primary-menu.no-responsive > li:not(.megamenu-template-enable) ul,
    #primary-menu.nav-menu.no-responsive > li.megamenu-enable.megamenu-style-grid > ul > li,
    .minisearch,
    .minisearch .sf-input {
        border-bottom: 0.8px solid #dfe5e8;
        border-left: 0.8px solid #dfe5e8;
        border-right: 0.8px solid #dfe5e8;
    }
}

@media (max-width: 1000px) {
    .title-xlarge,
    .elementor-widget-heading .title-xlarge.elementor-heading-title {
        line-height: 9vw;
    }

    .title-xlarge,
    body .gem-style-text.title-xlarge {
        font-size: 8vw;
    }

    h1,
    .title-h1,
    .elementor-widget-heading h1.elementor-heading-title,
    .elementor-widget-heading .title-h1.elementor-heading-title {
        line-height: 6.9vw;
    }

    h1,
    .title-h1,
    body .gem-style-text.title-h1 {
        font-size: 5vw;
    }

    h2,
    .title-h2,
    .elementor-widget-heading h2.elementor-heading-title,
    .elementor-widget-heading .title-h2.elementor-heading-title {
        line-height: 6.4vw;
    }

    h2,
    .title-h2,
    body .gem-style-text.title-h2 {
        font-size: 4.2vw;
    }

    h3,
    .title-h3,
    .elementor-widget-heading h3.elementor-heading-title,
    .elementor-widget-heading .title-h3.elementor-heading-title {
        line-height: 5.4vw;
    }

    h3,
    .title-h3,
    body .gem-style-text.title-h3 {
        font-size: 3.5vw;
    }

    h4,
    .title-h4,
    .elementor-widget-heading h4.elementor-heading-title,
    .elementor-widget-heading .title-h4.elementor-heading-title {
        line-height: 5vw;
    }

    h4,
    .title-h4,
    body .gem-style-text.title-h4 {
        font-size: 3.2vw;
    }

    h5,
    .title-h5,
    .elementor-widget-heading h5.elementor-heading-title,
    .elementor-widget-heading .title-h5.elementor-heading-title {
        line-height: 4.2vw;
    }

    h5,
    .title-h5,
    body .gem-style-text.title-h5 {
        font-size: 2.7vw;
    }

    h6,
    .title-h6,
    .elementor-widget-heading h6.elementor-heading-title,
    .elementor-widget-heading .title-h6.elementor-heading-title {
        line-height: 3.5vw;
    }

    h6,
    .title-h6,
    body .gem-style-text.title-h6 {
        font-size: 2.2vw;
    }

    .elementor-icon {
        font-size: 4vw !important;
    }
}

/* -------------------------------
   Mobile Header Fix & Hero Style
   ------------------------------- */
@media (max-width: 768px) {
    .elementor-location-header {
        background-color: #000000;
    }

    .elementor-element.hero-section {
        padding-top: 100px;
    }

    .elementor-element.hero-title {
        font-size: 34px;
        text-transform: uppercase;
    }

    .elementor-element.hero-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }

    .elementor-element.cta-button {
        background-color: #ff6600;
        color: #fff;
        font-weight: bold;
        border-radius: 8px;
    }
}

/* -------------------------------
   Hero Sektion
   ------------------------------- */
.hero-section {
    background-position: center center;
    background-size: cover;
    min-height: 100vh;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

.hero-subtitle {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 20px;
    color: #dddddd;
    text-align: center;
    margin-bottom: 40px;
}

/* -------------------------------
   Call-to-Action Button
   ------------------------------- */
.cta-button {
    background-color: #ff6600;
    color: #ffffff;
    font-weight: bold;
    padding: 15px 30px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #e65c00;
}