/* ============================================================================
   kontakt-improvements.css
   Design improvements for kontakt.html (all elements except .flip-card*)
   – Better visual design for hero, form, info-cards, map, social-buttons
   – Correct hover effects without !important conflicts
   – Fully responsive: mobile (≤ 575px), tablet (576–991px), desktop (≥ 992px)
   – Animations adapted for mobile / prefers-reduced-motion
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────
   §1  DESIGN TOKENS (page-level overrides / new tokens)
   ───────────────────────────────────────────────────────────── */
:root {
    --kontakt-hero-pad-top: clamp(6rem, 12vw, 9rem);
    --kontakt-hero-pad-bottom: clamp(4rem, 8vw, 7rem);
    --kontakt-section-py: clamp(3.5rem, 7vw, 6rem);
    --kontakt-card-radius: 20px;
    --kontakt-card-shadow: 0 8px 32px rgba(32,35,74,0.10), 0 2px 8px rgba(32,35,74,0.06);
    --kontakt-card-shadow-hover: 0 20px 60px rgba(32,35,74,0.16), 0 4px 16px rgba(32,35,74,0.10);
    --kontakt-info-border: rgba(109,151,68,0.18);
    --kontakt-green: var(--ibc-green, #6D9744);
    --kontakt-blue: var(--ibc-blue, #20234A);
    /* Converts any SVG/icon to IBC green (#6D9744) via CSS filter */
    --icon-green-filter: brightness(0) saturate(100%) invert(51%) sepia(47%) saturate(537%)
                         hue-rotate(53deg) brightness(94%) contrast(86%);
    /* Map placeholder background image path */
    --map-placeholder-image: url('../assets/img/Maskottchen.webp');
}

/* ─────────────────────────────────────────────────────────────
   §2  HERO SECTION
   ───────────────────────────────────────────────────────────── */
.page-hero-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Decorative floating circles behind hero content */
.page-hero-section::before {
    content: '';
    position: absolute;
    width: clamp(240px, 35vw, 420px);
    height: clamp(240px, 35vw, 420px);
    background: radial-gradient(circle, rgba(109,151,68,0.18) 0%, transparent 70%);
    border-radius: 50%;
    top: -80px;
    right: -100px;
    pointer-events: none;
    animation: heroBlob1 10s ease-in-out infinite alternate;
    z-index: 0;
}

.page-hero-section::after {
    content: '';
    position: absolute;
    width: clamp(160px, 22vw, 280px);
    height: clamp(160px, 22vw, 280px);
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -40px;
    left: -60px;
    pointer-events: none;
    animation: heroBlob2 12s ease-in-out infinite alternate;
    z-index: 0;
}

/* Third small accent circle */
.page-hero-section .container {
    position: relative;
    z-index: 1;
}

@keyframes heroBlob1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 20px) scale(1.08); }
}
@keyframes heroBlob2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -15px) scale(1.06); }
}

/* ─────────────────────────────────────────────────────────────
   §3  CONTACT SECTION LAYOUT
   ───────────────────────────────────────────────────────────── */
section.py-5:has(#contact-form) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

section.py-5:has(#contact-form) > .container {
    padding-top: var(--kontakt-section-py);
    padding-bottom: var(--kontakt-section-py);
}

/* Two-column row: ensure equal top alignment */
section.py-5:has(#contact-form) .row.g-5 {
    align-items: flex-start;
}

/* Section headings inside contact section */
section.py-5:has(#contact-form) h2.ibc-heading {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

/* ─────────────────────────────────────────────────────────────
   §4  CONTACT FORM CARD (.contact-card)
   ───────────────────────────────────────────────────────────── */
.contact-card {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: var(--kontakt-card-radius) !important;
    padding: clamp(1.5rem, 4vw, 2.5rem) !important;
    box-shadow: var(--kontakt-card-shadow) !important;
    border: 1px solid rgba(109,151,68,0.12) !important;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
}

/* Top accent bar */
.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kontakt-green), var(--kontakt-blue));
    border-radius: var(--kontakt-card-radius) var(--kontakt-card-radius) 0 0;
}

.contact-card:hover {
    box-shadow: var(--kontakt-card-shadow-hover) !important;
}

/* ─────────────────────────────────────────────────────────────
   §5  FORM FIELDS — clean styling
   ───────────────────────────────────────────────────────────── */
.contact-card .form-group-animated {
    margin-bottom: 1.5rem;
}

.contact-card .form-control {
    border-radius: 10px;
    border: 1.5px solid #dde3ec;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.contact-card .form-control:hover {
    border-color: rgba(109,151,68,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-card .form-control:focus {
    border-color: var(--kontakt-green);
    box-shadow: 0 0 0 3px rgba(109,151,68,0.18), 0 2px 8px rgba(0,0,0,0.05);
    outline: none;
    transform: translateY(-1px);
}

/* Textarea */
.contact-card textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

/* ─────────────────────────────────────────────────────────────
   §6  FORM BUTTONS — clean, conflict-free
   Works harmoniously with Bootstrap d-flex flex-column flex-md-row
   ───────────────────────────────────────────────────────────── */

/* Remove the scale(1.15) from older CSS, let Bootstrap flex handle layout */
.form-buttons-container .send-button-wrapper {
    /* Override: height was 130px and transform: scale(1.15) in kontakt.css */
    transform: none !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
}

.form-buttons-container #sendButtonSvg {
    height: 52px !important;
    max-height: 52px !important;
    width: 100% !important;
}

/* Send button */
.form-buttons-container .send-button,
.form-buttons-container #contact-send-btn {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: 0 1.5rem !important;
    transform: none !important;
    box-sizing: border-box !important;
}

/* Reset button */
.form-buttons-container .btn-reset-form {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    border-radius: 12px !important;
    padding: 0 1.25rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    background: #f5f7fa !important;
    border: 1.5px solid #e0e6f0 !important;
    color: #6c757d !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease,
                transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275),
                box-shadow 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-sizing: border-box !important;
}

.form-buttons-container .btn-reset-form:hover {
    background: #fff0f0 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(220,38,38,0.18) !important;
}

.form-buttons-container .btn-reset-form .icon {
    transition: transform 0.4s ease;
}

.form-buttons-container .btn-reset-form:hover .icon {
    transform: rotate(-180deg);
}

/* my-button-container wrapper normalisation */
.form-buttons-container .my-button-container {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ─────────────────────────────────────────────────────────────
   §7  CONTACT INFO ITEMS (.info-item)  — fixed hover effects
   ───────────────────────────────────────────────────────────── */
.info-item {
    display: flex;
    align-items: flex-start;
    background-color: var(--ibc-white, #fff);
    padding: 1.5rem 1.75rem;
    border-radius: var(--border-radius-large, 20px);
    box-shadow: var(--shadow-medium);
    border-left: 5px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165,0.84,0.44,1),
                box-shadow 0.4s cubic-bezier(0.165,0.84,0.44,1),
                border-left-color 0.4s ease,
                background-color 0.4s ease;
}

.info-item:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lifted);
    border-left-color: var(--ibc-green);
    background-color: #f9fdf6;
    overflow: hidden;
}

/* ::before – subtle gradient tint that animates into view over white bg */
.info-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(109,151,68,0.07) 0%,
        rgba(32,35,74,0.04) 100%);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.info-item:hover::before {
    opacity: 1;
}

/* ::after – green left border line, reveals from top */
.info-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ibc-green), var(--ibc-blue));
    border-radius: var(--border-radius-large, 20px) 0 0 var(--border-radius-large, 20px);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.45s cubic-bezier(0.19,1,0.22,1);
    z-index: 1;
}

.info-item:hover::after {
    transform: scaleY(1);
}

/* Keep all content above the pseudo-element overlays */
.info-item > * {
    position: relative;
    z-index: 2;
}

/* Icon (i.fas) — enable smooth transition */
.info-item i.fas {
    font-size: 1.6rem;
    color: var(--kontakt-green);
    margin-right: 1.5rem;
    width: 40px;
    text-align: center;
    padding-top: 4px;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275),
                color 0.3s ease !important;
}

.info-item:hover i.fas {
    transform: scale(1.12) !important;
    color: var(--kontakt-green) !important;
}

/* Icon (SVG .svg-icon) — enable smooth transition */
.info-item .svg-icon,
.info-item > svg {
    transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275) !important;
}

.info-item:hover .svg-icon,
.info-item:hover > svg {
    transform: scale(1.1) !important;
    fill: var(--ibc-green) !important;
    color: var(--ibc-green) !important;
}

/* Icon (img.contact-icon-green) — enable smooth transition */
.info-item img.contact-icon-green {
    transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275),
                filter 0.3s ease !important;
}

.info-item:hover img.contact-icon-green {
    transform: scale(1.1) !important;
    filter: var(--icon-green-filter) !important;
}

/* Text content */
.info-item > div {
    flex: 1;
    min-width: 0;
}

.info-item strong {
    font-size: 1.12rem;
    color: var(--kontakt-blue);
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.info-item:hover strong {
    color: var(--kontakt-green);
}

.info-item p {
    margin-bottom: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.65;
}

.info-item p a {
    color: var(--kontakt-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

.info-item p a:hover {
    color: var(--kontakt-green);
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────
   §8  SOCIAL BUTTONS (.social-buttons)
   Single source of truth – replaces all conflicting hover rules
   ───────────────────────────────────────────────────────────── */
.social-buttons {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.social-buttons .btn {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275),
                box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    flex-shrink: 0;
    padding: 0;
    overflow: visible;
}

.social-buttons .btn i {
    color: #fff !important;
    pointer-events: none;
}

/* Platform colours */
.social-buttons .facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d47a1 100%);
}
.social-buttons .instagram {
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #833AB4 100%);
}
.social-buttons .linkedin {
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
}

/* Hover — desktop only (pointer:fine) */
@media (hover: hover) and (pointer: fine) {
    .social-buttons .btn:hover {
        transform: translateY(-4px) scale(1.12);
        box-shadow: 0 10px 24px rgba(0,0,0,0.28);
        filter: brightness(1.08);
    }
    .social-buttons .btn i {
        color: #fff !important;
    }
}

/* Active (tap / click) */
.social-buttons .btn:active {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ─────────────────────────────────────────────────────────────
   §9  COPY BUTTON (.custom-copy-btn)  — keep existing, adjust
   ───────────────────────────────────────────────────────────── */
.custom-copy-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid var(--kontakt-green);
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: background 0.25s ease, border-color 0.25s ease,
                transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275),
                box-shadow 0.25s ease;
}

.custom-copy-btn:hover {
    background: var(--kontakt-green);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 10px 24px rgba(109,151,68,0.3);
}

.custom-copy-btn svg {
    width: 16px !important;
    height: 16px !important;
    stroke: var(--kontakt-green);
    stroke-width: 2px;
    fill: none;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}

.custom-copy-btn:hover svg {
    stroke: #fff;
}

.contact-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.875rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ─────────────────────────────────────────────────────────────
   §10 MAP SECTION
   ───────────────────────────────────────────────────────────── */
.map-section {
    margin-top: 0;
    position: relative;
}

.map-placeholder {
    height: clamp(300px, 50vw, 480px);
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-placeholder-background {
    position: absolute;
    inset: 0;
    background: var(--map-placeholder-image) center/cover no-repeat;
    opacity: 0.07;
    filter: grayscale(100%);
}

.map-consent-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 520px;
    text-align: center;
}

.map-consent-icon {
    font-size: 3rem;
    color: var(--kontakt-blue);
    margin-bottom: 1rem;
    display: block;
}

.map-consent-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--kontakt-blue);
    margin-bottom: 0.75rem;
}

/* Load-map button */
.map-consent-content .btn-ibc {
    margin-top: 0.5rem;
}

/* Loaded map iframe */
#map-container iframe {
    width: 100%;
    height: clamp(300px, 50vw, 480px);
    border: none;
    display: block;
}

/* ─────────────────────────────────────────────────────────────
   §11 RECAPTCHA CONSENT NOTICE
   ───────────────────────────────────────────────────────────── */
#recaptcha-consent-notice {
    border-radius: 14px;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255,193,7,0.12), rgba(255,193,7,0.06));
    border: 1px solid rgba(255,193,7,0.35);
}

#recaptcha-consent-notice .consent-icon-large {
    font-size: 2.25rem;
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   §12 MODAL BOX — polish
   ───────────────────────────────────────────────────────────── */
.my-modal-box {
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}

/* ─────────────────────────────────────────────────────────────
   §13 TOAST NOTIFICATIONS
   ───────────────────────────────────────────────────────────── */
.toast-notification {
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.16);
}

/* ─────────────────────────────────────────────────────────────
   §14 RESPONSIVE — Tablet  (576px – 991px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    /* Stack columns on tablet as well */
    section.py-5:has(#contact-form) .row.g-5 {
        flex-direction: column;
    }

    section.py-5:has(#contact-form) .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .contact-info {
        margin-top: 0.5rem;
    }

    .info-item {
        padding: 1.25rem 1.5rem;
    }
}

/* ─────────────────────────────────────────────────────────────
   §15 RESPONSIVE — Mobile  (≤ 575px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 575px) {
    .contact-card {
        padding: 1.25rem !important;
        border-radius: 14px !important;
    }

    /* Mobile buttons: full width, no min/max constraints */
    .form-buttons-container .send-button,
    .form-buttons-container #contact-send-btn,
    .form-buttons-container .send-button-wrapper,
    .form-buttons-container .my-button-container,
    .form-buttons-container .btn-reset-form {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
    }

    .info-item {
        padding: 1rem 1.25rem;
        border-radius: 14px;
    }

    .info-item strong {
        font-size: 1rem;
    }

    .info-item p {
        font-size: 0.88rem;
    }

    .social-buttons .btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        font-size: 15px;
    }

    /* Smaller map on mobile */
    .map-placeholder,
    #map-container iframe {
        height: 300px;
    }

    .map-consent-content {
        padding: 1.25rem;
    }

    .map-consent-icon {
        font-size: 2.25rem;
    }
}

/* ─────────────────────────────────────────────────────────────
   §16 RESPONSIVE — Small mobile  (≤ 375px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 375px) {
    .contact-card {
        padding: 1rem !important;
    }

    .info-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .info-item i.fas,
    .info-item .svg-icon,
    .info-item > svg {
        margin-right: 0 !important;
        margin-bottom: 0.25rem;
    }
}

/* ─────────────────────────────────────────────────────────────
   §17 ANIMATIONS — Mobile / Tablet overrides  (≤ 768px)
   Performance: reduce translateY range and duration;
   remove GPU-heavy decorative blob animations on mobile.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Simplify hero blob animations */
    .page-hero-section::before,
    .page-hero-section::after {
        animation: none !important;
        opacity: 0.5;
    }

    /* Faster, simpler fade-in for JS-revealed elements */
    .js-reveal,
    .fade-in-up {
        transition-duration: 0.5s !important;
    }

    /* Reduce card hover lift on touch devices */
    .info-item:hover {
        transform: translateY(-3px) !important;
    }

    /* Hide map load iframe height for very small screens */
    .map-placeholder {
        height: 280px;
    }
}

/* ─────────────────────────────────────────────────────────────
   §18 PREFERS-REDUCED-MOTION — disable all decorative animations
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .page-hero-section::before,
    .page-hero-section::after {
        animation: none !important;
    }

    .info-item,
    .info-item::before,
    .info-item::after,
    .contact-card,
    .social-buttons .btn,
    .custom-copy-btn,
    .form-buttons-container .btn-reset-form {
        transition: none !important;
        animation: none !important;
    }

    /* Keep focus rings visible */
    .info-item:hover {
        transform: none !important;
    }

    .social-buttons .btn:hover {
        transform: none !important;
        filter: brightness(1.1);
    }
}

/* ─────────────────────────────────────────────────────────────
   §19  PRIVACY / HUBSPOT CHECKBOXES — visual polish
   ───────────────────────────────────────────────────────────── */
.hubspot-consent-section {
    background: rgba(32,35,74,0.03);
    border-left: 3px solid var(--kontakt-blue);
    border-radius: 10px;
    padding: 1rem 1rem 1rem 1.25rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.hubspot-consent-section:hover {
    background: rgba(109,151,68,0.04);
    border-left-color: var(--kontakt-green);
}

/* ─────────────────────────────────────────────────────────────
   §20  js-reveal / fade-in-up  —  ensure they work correctly
   ───────────────────────────────────────────────────────────── */
.js-reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1);
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for child elements */
.js-reveal:not(.is-visible)[data-animation-delay="200ms"] {
    transition-delay: 0.2s;
}

.js-reveal:not(.is-visible)[data-animation-delay="400ms"] {
    transition-delay: 0.4s;
}

/* On mobile: no stagger (elements should appear promptly) */
@media (max-width: 768px) {
    .js-reveal:not(.is-visible)[data-animation-delay] {
        transition-delay: 0s !important;
    }
}
