/* ==========================================================================
   Royal House Berlin - Contact Module Stylesheet (Mobile Overrides Fix)
   ========================================================================== */

/* 1. HONEYPOT */
.rh-c-hp {
    display: none !important;
    visibility: hidden !important;
}

/* 2. MAINGROUP WRAPPER */
#content.rh-c-wrapper,
.rh-c-wrapper {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 20px;
    box-sizing: border-box;
    float: none !important;
}

/* 3. HEADER BEREICH */
.rh-c-header {
    padding: 40px;
    background: #141414 !important;
    border: 1px solid #D9AF62 !important;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* Haupttitel "ROYAL CHANCERY..." (Durch alle CSS-Ebenen erzwungenes Gold) */
html body #mainContent #content .rh-c-header h2.rh-c-title,
html body .rh-c-header h2.rh-c-title,
html body h2.rh-c-title,
.rh-c-title {
    color: #D9AF62 !important;
    font-family: 'Cinzel', 'Georgia', serif !important;
    font-size: 2em !important;
    letter-spacing: 1px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    text-align: center !important;
    text-transform: uppercase;
    -webkit-text-fill-color: #D9AF62 !important; /* Verhindert iOS Text-Fill Bugs */
}

.rh-c-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #D9AF62, transparent) !important;
    margin: 20px 0 25px 0;
}

/* Beschreibungstext (Erzwungenes Gold/Helligkeit) */
html body #mainContent #content .rh-c-header p.rh-c-description,
html body .rh-c-header p.rh-c-description,
html body p.rh-c-description,
.rh-c-description {
    font-size: 1.05em !important;
    line-height: 1.8 !important;
    color: #C59B27 !important;
    text-align: center !important;
    max-width: 750px;
    margin: 0 auto !important;
    -webkit-text-fill-color: #C59B27 !important;
}

/* 4. FEEDBACK-BOXEN */
.rh-c-feedback {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
}

.rh-c-feedback.success {
    background: rgba(217, 175, 98, 0.15);
    border: 1px solid #D9AF62;
    color: #D9AF62 !important;
}

.rh-c-feedback.error {
    background: rgba(217, 83, 79, 0.15);
    border: 1px solid #d9534f;
    color: #d9534f !important;
}

/* 5. FORMULAR-CARD */
.rh-c-card {
    background: #141414 !important;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    margin: 0 auto 40px auto;
    box-sizing: border-box;
}

.rh-c-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rh-c-row-double {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rh-c-group {
    flex: 1;
    min-width: 250px;
}

html body #mainContent #content .rh-c-card label.rh-c-label,
html body .rh-c-card label.rh-c-label,
html body label.rh-c-label {
    display: block;
    color: #D9AF62 !important;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-text-fill-color: #D9AF62 !important;
}

.rh-c-input,
.rh-c-select,
.rh-c-textarea {
    width: 100%;
    padding: 12px 15px;
    background: #0a0a0a !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    -webkit-text-fill-color: #ffffff !important;
}

.rh-c-select {
    cursor: pointer;
}

.rh-c-textarea {
    resize: vertical;
    line-height: 1.5;
}

.rh-c-input:focus,
.rh-c-select:focus,
.rh-c-textarea:focus {
    outline: none;
    border-color: #D9AF62 !important;
    box-shadow: 0 0 8px rgba(217, 175, 98, 0.2);
}

/* 6. BUTTON */
.rh-c-btn-container {
    text-align: center;
    margin-top: 15px;
}

.rh-c-btn {
    background: linear-gradient(135deg, #D9AF62 0%, #A67437 100%) !important;
    color: #000000 !important;
    border: none;
    padding: 14px 40px;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 175, 98, 0.3);
    -webkit-text-fill-color: #000000 !important;
}

.rh-c-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 175, 98, 0.5);
}

/* 7. GALERIE TITELLINIE (In Desktop und Mobil auf weißem Grund = Schwarz) */
html body #mainContent h2.rh-c-symbols-title,
html body h2.rh-c-symbols-title,
.rh-c-symbols-title {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    text-align: center !important;
    font-family: inherit;
}

/* 8. MOBILE ANPASSUNGEN (Überschreibt jegliche globale Theme-Media-Queries) */
@media screen and (max-width: 1024px) {
    
    /* Header-Farben erzwingen */
    html body #mainContent #content .rh-c-header h2.rh-c-title,
    html body .rh-c-header h2.rh-c-title,
    html body h2.rh-c-title {
        color: #D9AF62 !important;
        -webkit-text-fill-color: #D9AF62 !important;
        font-size: 1.4em !important;
        line-height: 1.3 !important;
    }

    html body #mainContent #content .rh-c-header p.rh-c-description,
    html body .rh-c-header p.rh-c-description,
    html body p.rh-c-description {
        color: #C59B27 !important;
        -webkit-text-fill-color: #C59B27 !important;
        font-size: 0.95em !important;
        line-height: 1.6 !important;
    }

    /* Formular Labels erzwingen */
    html body #mainContent #content .rh-c-card label.rh-c-label,
    html body .rh-c-card label.rh-c-label {
        color: #D9AF62 !important;
        -webkit-text-fill-color: #D9AF62 !important;
    }

    /* Container Abstände für Mobilgeräte */
    .rh-c-wrapper {
        padding: 10px !important;
    }

    .rh-c-header {
        padding: 25px 15px !important;
    }

    .rh-c-card {
        padding: 20px 15px !important;
    }

    .rh-c-row-double {
        flex-direction: column;
        gap: 15px;
    }

    .rh-c-group {
        min-width: 100%;
    }

    .rh-c-btn {
        width: 100%;
        padding: 15px;		
    }

	
	/* Hinweis und Link unter Formular in Mobil */
    html body #mainContent .rh-c-card p,
    html body .rh-c-card p,
    html body .rh-c-card span,
    html body .rh-c-card a {
        color: #D9AF62 !important;
        -webkit-text-fill-color: #D9AF62 !important;
    }

    /* Privacy Policy Überschriften und Texte in Mobil */
    html body #mainContent #content .rh-c-card h3,
    html body .rh-c-card h3 {
        color: #D9AF62 !important;
        -webkit-text-fill-color: #D9AF62 !important;
    }

    html body #mainContent #content .rh-c-card p,
    html body .rh-c-card p {
        color: #aaaaaa !important;
        -webkit-text-fill-color: #aaaaaa !important;
    }
}
/* Erzwungene schwarze Textfarbe für den Impressum-Button auf Mobilgeräten */
@media screen and (max-width: 1024px) {
    html body .rh-c-card a.rh-c-btn,
    html body .rh-c-card a.rh-c-btn *,
    a.rh-c-btn,
    a.rh-c-btn:link,
    a.rh-c-btn:visited,
    a.rh-c-btn:hover,
    a.rh-c-btn:active {
        color: #000000 !important;
        -webkit-text-fill-color: #000000 !important;
    }
}

/* ==========================================================================
   9. ANPASSUNGEN FÜR RTL / ARABISCH (.rtl-layout)
   ========================================================================== */

/* Ausrichtung von Texten und Labels im RTL-Modus */
.rtl-layout .rh-c-card,
.rtl-layout .rh-c-card p,
.rtl-layout .rh-c-card div,
.rtl-layout .rh-c-card address,
.rtl-layout label.rh-c-label,
.rtl-layout .rh-c-input,
.rtl-layout .rh-c-select,
.rtl-layout .rh-c-textarea {
    text-align: right !important;
    direction: rtl;
}

/* Wechselt die Reihenfolge von Name und E-Mail (Name oben rechts, E-Mail oben links) */
.rtl-layout .rh-c-row-double {
    flex-direction: row-reverse;
}

/* Quellenangabe im Impressum für RTL nach links spiegeln */
.rtl-layout .rh-c-card p[style*="text-align: right"] {
    text-align: left !important;
}

@media screen and (max-width: 1024px) {
    .rtl-layout .rh-c-row-double {
        flex-direction: column;
    }
}

/* Verhindert das Umspringen von E-Mails und Telefonnummern in RTL-Texten */
.rtl-layout .rh-c-card a[href^="mailto:"],
.rtl-layout .rh-c-card a[href^="tel:"],
.rtl-layout .ltr-inline {
    direction: ltr !important;
    unicode-bidi: embed;
    display: inline-block;
}

/* Passt den Pfeil im Impressum-Button für arabische Lese-Richtung an */
.rtl-layout .rh-c-btn {
    direction: rtl;
}


/* ==========================================================================
   RTL Galerie-Lightbox Text & Positionierung (projects.css)
   ========================================================================== */

/* Textbeschreibungen unter dem Galeriebild rechtsbündig ausrichten */
#mainContent.rtl-layout .caption-container,
#mainContent.rtl-layout #caption,
#mainContent.rtl-layout #detailed-description,
.rtl-layout .caption-container,
.rtl-layout #caption,
.rtl-layout #detailed-description {
    text-align: right !important;
}

/* Schließen-Button oben links bei RTL platzieren */
#mainContent.rtl-layout #bigView .close-btn,
.rtl-layout #bigView .close-btn {
    right: auto !important;
    left: 20px !important;
}

/* ==========================================================================
   Galerie-Lightbox Controls (LTR & RTL Korrektur)
   ========================================================================== */

/* Basis-Positionierung der Navigationspfeile */
#bigView .prev,
#bigView .next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 35px !important;
    color: #f3e5ab !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 15px !important;
    z-index: 100 !important;
    transition: color 0.3s ease !important;
}

#bigView .prev:hover,
#bigView .next:hover {
    color: #ffffff !important;
}

/* LTR Standard-Positionen (Englisch/Deutsch) */
#bigView .prev {
    left: 20px !important;
    right: auto !important;
}

#bigView .next {
    right: 20px !important;
    left: auto !important;
}

/* ==========================================================================
   RTL Anpassungen für Galerie (Arabisch)
   ========================================================================== */

/* Wenn html/body dir="rtl" hat oder .rtl-layout gesetzt ist */
[dir="rtl"] #bigView .prev,
.rtl-layout #bigView .prev,
body.rtl-layout #bigView .prev {
    right: 20px !important;
    left: auto !important;
}

[dir="rtl"] #bigView .next,
.rtl-layout #bigView .next,
body.rtl-layout #bigView .next {
    left: 20px !important;
    right: auto !important;
}

/* Schließen-Button bei RTL links oben platzieren */
[dir="rtl"] #bigView .close-btn,
.rtl-layout #bigView .close-btn {
    left: 20px !important;
    right: auto !important;
}

/* Nummerierung (1 / 6) im RTL-Modus ordnungsgemäß anzeigen */
[dir="rtl"] #bigView .numbertext,
.rtl-layout #bigView .numbertext {
    direction: ltr !important;
    display: inline-block !important;
    left: 20px !important;
    right: auto !important;
}

/* Textbeschreibung im RTL-Modus rechtsbündig */
[dir="rtl"] #bigView .caption-container,
[dir="rtl"] #bigView #caption,
[dir="rtl"] #bigView #detailed-description,
.rtl-layout #bigView .caption-container,
.rtl-layout #bigView #caption,
.rtl-layout #bigView #detailed-description {
    text-align: right !important;
}