/*
Theme Name:  opportunity Child
Theme URI:   https://opportunity-singletag.de
Description: Warmes, modernes Child Theme für opportunity-singletag.de – vollständig über den Gutenberg Block Editor pflegbar.
Author:      opportunity-Singletag
Template:    twentytwentyfour
Version:     2.0.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opportunity-child
*/

/* =====================================================
   BASIS-RESET & BODY
   ===================================================== */

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--wp--preset--color--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   SEITENTITEL AUSBLENDEN (Standard-WP-Titel)
   ===================================================== */

.wp-block-post-title,
h1.wp-block-post-title,
.entry-title,
h1.entry-title {
    display: none !important;
}

.wp-block-group:has(> .wp-block-post-title) {
    display: none !important;
}

/* =====================================================
   TYPOGRAFIE
   ===================================================== */

.wp-block-post-content p,
.wp-block-paragraph {
    max-width: 68ch;
}

.wp-block-paragraph.has-text-align-center {
    max-width: 100%;
}

/* Lora in Headings angenehmer machen */
h1, h2, h3 {
    text-wrap: balance;
}

/* =====================================================
   LINKS
   ===================================================== */

.entry-content a,
.wp-block-post-content a {
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.wp-block-button__link {
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    letter-spacing: 0.01em;
}

.wp-block-button__link:hover {
    background-color: var(--wp--preset--color--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 53, 29, 0.3);
}

/* Outline-Weiß Stil */
.wp-block-button.is-style-outline-white .wp-block-button__link {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.wp-block-button.is-style-outline-white .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Outline auf hellem Hintergrund */
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--wp--preset--color--primary-light) !important;
    box-shadow: none;
    transform: translateY(-1px);
}

/* =====================================================
   CARD BLOCK STYLE
   ===================================================== */

.is-style-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(30, 20, 15, 0.07), 0 1px 3px rgba(30, 20, 15, 0.05);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    border: 1px solid var(--wp--preset--color--border);
}

.is-style-card:hover {
    box-shadow: 0 8px 32px rgba(30, 20, 15, 0.12), 0 2px 8px rgba(30, 20, 15, 0.06);
    transform: translateY(-3px);
}

/* =====================================================
   LAYOUT – Block-Gap nach Header entfernen
   ===================================================== */

.wp-site-blocks > header + * {
    margin-top: 0 !important;
}

/* =====================================================
   HEADER – Sticky mit Glasmorphismus
   ===================================================== */

.wp-site-blocks > header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header {
    background: rgba(253, 248, 246, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.25s ease;
    border-bottom: 1px solid var(--wp--preset--color--border);
}

@supports not (animation-timeline: scroll()) {
    .site-header {
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    }
}

/* Site-Titel */
.site-header .wp-block-site-title a {
    text-decoration: none !important;
    color: var(--wp--preset--color--primary) !important;
    font-weight: 700;
    transition: color 0.15s ease;
}

.site-header .wp-block-site-title a:hover {
    color: var(--wp--preset--color--primary-dark) !important;
}

/* =====================================================
   NAVIGATION – Desktop
   ===================================================== */

.wp-block-navigation .wp-block-navigation-item__content {
    padding: 0.4rem 0.875rem !important;
    white-space: nowrap;
    position: relative;
}

/* Unterstrich-Effekt */
.wp-block-navigation .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.875rem;
    right: 0.875rem;
    height: 2px;
    background: var(--wp--preset--color--primary);
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.wp-block-navigation .wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after {
    transform: scaleX(1);
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
    color: var(--wp--preset--color--primary) !important;
}

.wp-block-navigation a {
    transition: color 0.15s ease;
}

.wp-block-navigation a:hover {
    color: var(--wp--preset--color--primary) !important;
}

/* =====================================================
   NAVIGATION – Dropdown
   ===================================================== */

.wp-block-navigation .wp-block-navigation__submenu-container {
    background: #ffffff !important;
    border: 1px solid var(--wp--preset--color--border) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    padding: 0.5rem !important;
    min-width: 240px !important;
    margin-top: 0.25rem !important;
}

.wp-block-navigation .wp-block-navigation__submenu-container::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding: 0.55rem 1rem !important;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    width: 100%;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:hover .wp-block-navigation-item__content {
    background: var(--wp--preset--color--primary-light);
    color: var(--wp--preset--color--primary) !important;
}

/* =====================================================
   NAVIGATION – Mobile
   ===================================================== */

.wp-block-navigation__responsive-container.is-menu-open {
    background: #ffffff !important;
    padding: 1.5rem !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    padding: 0.75rem 0 !important;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
    color: var(--wp--preset--color--primary) !important;
}

/* =====================================================
   TRENNLINIE
   ===================================================== */

.wp-block-separator {
    border-color: var(--wp--preset--color--border) !important;
    opacity: 1;
}

/* =====================================================
   COVER-BLOCK – Overlay wärmer
   ===================================================== */

.wp-block-cover {
    isolation: isolate;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer .footer-nav-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

footer .footer-nav-list li {
    margin-bottom: 0.5rem;
}

footer .footer-nav-list a {
    text-decoration: none;
    transition: color 0.15s ease;
}

footer .footer-nav-list a:hover {
    color: #ffffff !important;
}

/* =====================================================
   ANKER-NAVIGATION
   ===================================================== */

.opp-anker-nav {
    border-bottom: 1px solid var(--wp--preset--color--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95) !important;
    z-index: 90;
}

.opp-anker-link {
    text-decoration: none !important;
    color: var(--wp--preset--color--text-muted) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.opp-anker-link:hover {
    color: var(--wp--preset--color--primary) !important;
}

/* Scroll-Offset damit Header + Anker-Nav nicht überdecken */
[id] {
    scroll-margin-top: 7rem;
}

/* =====================================================
   TESTIMONIAL-PATTERN – Zitat-Styling
   ===================================================== */

.opp-testimonial blockquote {
    border: none;
    padding: 0;
    margin: 0;
}

.opp-testimonial .wp-block-quote__citation {
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--wp--preset--color--text-muted);
    margin-top: 1rem;
    display: block;
}

/* Anführungszeichen-Dekoration */
.opp-testimonial::before {
    content: '\201C';
    font-family: var(--wp--preset--font-family--lora);
    font-size: 5rem;
    line-height: 1;
    color: var(--wp--preset--color--primary-light);
    display: block;
    margin-bottom: -1.5rem;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 600px) {
    .wp-block-columns {
        gap: 1.5rem !important;
    }
}

@media (max-width: 781px) {
    .site-header > .wp-block-group {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}
