/*
    Theme Name: protect-your-child
    Text Domain: angelique-schadowsky.de
    Version: 1.0.0
    Description: custom theme for protect-your-child
    Author: Yazan Dar
 */

/*
@font-face {
    font-family: 'Merriweather';
    src: url('assets/fonts/merriweather/Merriweather-VariableFont_opsz,wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Merriweather';
    src: url('assets/fonts/merriweather/Merriweather-Italic-VariableFont_opsz,wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}
*/

/* --- Navigation Styles (Desktop) --- */
/* Nur auf Desktop anwenden (> 768px) */
@media (min-width: 768px) {

    /* Dropdown Basis-Styling (Tailwind-like) */
    .sub-menu {
        display: none;
        position: absolute;
        background-color: white;
        min-width: 14rem;
        /* w-56 */
        border: 1px solid #e5e7eb;
        /* border-gray-200 */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        /* shadow-md */
        z-index: 50;
        padding: 0.5rem 0;
        border-radius: 0.375rem;
        /* rounded-md */
    }

    /* Level 1 Dropdown: Öffnet nach unten */
    .menu-item-has-children>.sub-menu {
        top: 100%;
        left: 0;
        margin-top: 0.5rem;
    }

    /* Level 2+ Dropdown (Nested): Standardmäßig nach RECHTS */
    .sub-menu .menu-item-has-children>.sub-menu {
        top: 0;
        left: 100%;
        /* Nach rechts verschieben */
        right: auto;
        margin-top: 0;
        margin-left: 0.25rem;
        /* Kleiner Abstand */
        margin-right: 0;
    }

    /* Level 2+ Dropdown (Nested): Falls Platzmangel -> nach LINKS */
    .sub-menu .menu-item-has-children>.sub-menu.opens-left {
        left: auto;
        right: 100%;
        /* Nach links verschieben (startet am rechten Rand des Eltern-Items und geht nach links) */
        margin-left: 0;
        margin-right: 0.25rem;
    }

    /* Links Styling */
    .sub-menu .menu-item a {
        display: block;
        padding: 0.5rem 1rem;
        color: #374151;
        /* text-gray-700 */
        text-decoration: none;
        transition: background-color 0.2s;
    }

    /* PFEILE (Icons) */

    /* Pfeil nach UNTEN für Level 1 */
    .menu-item-has-children>a::after {
        content: '\f0d7';
        /* fa-caret-down */
        font-family: 'Font Awesome 5 Free';
        font-weight: 600;
        margin-left: 0.5rem;
        display: inline-block;
        transition: transform 0.3s;
    }

    /* Pfeil nach RECHTS für Level 2+ (Nested) */
    .sub-menu .menu-item-has-children>a::after {
        content: '\f0da';
        /* fa-caret-right */
        float: right;
        /* Pfeil rechtsbündig im Dropdown */
        margin-top: 2px;
    }

    /* Drehung bei offenem Menü (Optional) */
    .menu-item-has-children.open>a::after {
        transform: rotate(180deg);
    }

    /* Für Nested Items drehen wir den Pfeil nicht 180deg, sondern lassen ihn rechts.
       Der User wollte, dass der Pfeil immer rechts bleibt, auch wenn Menü links öffnet. */
    .sub-menu .menu-item-has-children.open>a::after {
        transform: none;
        /* Highlight Color */
    }

    /* Zeige Dropdown wenn Klasse .open existiert */
    .menu-item-has-children.open>.sub-menu {
        display: block;
    }

    /* Relative Position für Parent Items damit absolute Submenus sich daran orientieren */
    .menu-item-has-children {
        position: relative;
    }
}

/* --- Navigation Hover Effect --- */

/* The wrapper span for menu text */
.menu-item-text {
    position: relative;
    display: inline-block;
}

/* Centered line that expands horizontally */
.menu-item-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    /* Slightly more space */
    left: 50%;
    width: 0;
    height: 3px;
    /* Slightly thicker */
    background-color: #64C2CC;
    /* Turquoise primary color */
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expand the line on hover */
.menu-item:hover>a .menu-item-text::after {
    width: 100%;
}

/* Ensure links themselves don't have default underlines appearing */
.menu-item a {
    text-decoration: none !important;
    padding-top: 5px;
    padding-bottom: 5px;
    display: inline-block;
}

/* Hide the line effect in Dropdowns/Sub-menus */
.sub-menu .menu-item-text::after {
    display: none !important;
}

/* Background hover effect for sub-menus (Desktop & Mobile) */
.sub-menu .menu-item a:hover {
    background-color: #64C2CC;
    color: white !important;
    border-radius: 4px;
}

/* --- Mobile Menu Styles (< 768px) --- */
@media (max-width: 768px) {
    #mobile-menu {
        background-color: white;
        width: 100%;
        position: absolute;
        left: 0;
        top: 100%;
        z-index: 50;
    }

    #mobile-menu ul {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    #mobile-menu ul>li {
        width: 100%;
    }

    /* Language flags side-by-side at the end of mobile menu */
    #mobile-menu ul>li.lang-item {
        width: auto !important;
        display: inline-block !important;
        order: 99 !important;
        /* Ensure they are at the end */
        margin-top: 1.5rem !important;
        /* Spacing from menu above */
        padding-bottom: 0.5rem;
    }

    #mobile-menu ul>li.lang-item+li.lang-item {
        margin-left: 15px !important;
    }

    /* Adjust flag appearance on mobile */
    #mobile-menu .lang-item img {
        display: inline-block;
        vertical-align: middle;
        width: 24px;
        height: auto;
    }

    #mobile-menu .lang-item a {
        display: inline-block !important;
        padding: 5px !important;
    }

    /* Remove the turquoise line effect for flags */
    #mobile-menu .lang-item .menu-item-text::after {
        display: none !important;
    }

    /* Mobile Menu: Top-level items should keep the line effect,
       while sub-menu items use the background (handled above) */

    #mobile-menu .sub-menu {
        display: none;
        background-color: rgba(0, 0, 0, 0.05);
        /* Leicht dunklerer Hintergrund für Submenu */
        padding-left: 1rem;
    }

    #mobile-menu .menu-item-has-children.open>.sub-menu {
        display: block;
    }

    .menu-item-has-children>a::after {
        content: '\f0d7';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        margin-left: 0.5rem;
    }

    .sub-menu .menu-item a:hover {
        background-color: transparent;
        color: black !important;
    }
}

/* --- Decorative Ribbon backgrounds --- */
.ribbon-container {
    position: absolute;
    top: 200px;
    width: 100%;
    left: 50%;
    transform: translate(-50%, -40%);
    max-width: 1500px;
    /* Limits the waves on 4K screens */
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

@media (min-width: 1280px) {
    .ribbon-container {
        display: block;
    }
}

.ribbon-container img {
    width: 800px;
    max-width: 80%;
    display: block;
}

.ribbon-left img {
    margin-left: -40px;
}

.ribbon-right {
    display: flex;
    justify-content: flex-end;
}

.ribbon-right img {
    transform: scaleX(-1);
    margin-right: -60px;
}

.header-menu>li:nth-child(2) {
    margin-right: auto;
}

/* FORM */
.cf7-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* LABEL */
.cf7-field label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

/* INPUTS */
.cf7-form input[type="text"],
.cf7-form input[type="email"],
.cf7-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: all 0.2s ease;
    outline: none;
    margin-top: 0.7rem;
}

.cf7-form input:focus,
.cf7-form textarea:focus {
    background: #fff;
    border-color: #64C2CC;
    box-shadow: 0 0 0 3px rgba(100, 194, 204, 0.42);
}

/* ACCEPTANCE */
.cf7-acceptance {
    font-size: 0.875rem;
    color: #6b7280;
}

.cf7-acceptance a {
    color: #64C2CC;
}

.cf7-acceptance a:hover {
    color: #FBBF24;
}

/* SUBMIT BUTTON */
.cf7-submit input[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: none;
    background: #64C2CC;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

/* ARROW ICON */
.cf7-submit input[type="submit"]::after {
    content: '\f0da';
    /* Font Awesome right arrow */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

/* HOVER EFFECT */
.cf7-submit input[type="submit"]:hover {
    opacity: 0.9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.cf7-submit input[type="submit"]:hover::after {
    transform: translateX(6px);
}

/* ACTIVE */
.cf7-submit input[type="submit"]:active {
    transform: scale(0.97);
}