/* ═══════════════════════════════════════════════════════════
   KAMJO – Custom Styles
   Ergänzend zu Tailwind CSS via CDN
   ═══════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #FF6600;
    color: white;
}

/* ── Scrollbar Styling (Webkit) ───────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F5F5;
}

::-webkit-scrollbar-thumb {
    background: #FF6600;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E55A00;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FF6600;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #FF6600;
}

/* Navbar scrolled state */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ── Mobile Menu Animation ────────────────────────────────── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 300px;
    opacity: 1;
}

/* ── Hero Animations ──────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#hero h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

#hero p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#hero .flex {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

#hero > div > div > div:first-child {
    animation: fadeInLeft 0.8s ease-out 0.1s both;
}

/* ── Section Reveal Animation ─────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.reveal-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-child.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Card Interactions ────────────────────────────────────── */
.group:hover .w-14 {
    transform: scale(1.05);
}

/* ── Leistungen Pill Toggle Panels ────────────────────────── */
.leistung-panels-wrapper {
    display: grid;
}

/* Beide Panels liegen im selben Grid-Cell übereinander.
   Wrapper-Höhe = höchstes Panel → kein Layout-Sprung. */
.leistung-panels-wrapper > .leistung-panel {
    grid-area: 1 / 1;
}

.leistung-panel {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s 0.4s;
}

.leistung-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s 0s;
}

.leistung-tab {
    cursor: pointer;
    user-select: none;
}

/* ── Form States ──────────────────────────────────────────── */
input:focus,
textarea:focus {
    border-color: #FF6600 !important;
}

input.error,
textarea.error {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
}

input.error:focus,
textarea.error:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
}

/* ── Orange Bar Glow Effect ───────────────────────────────── */
#orange-bar {
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

/* ── Responsive Adjustments ───────────────────────────────── */
@media (min-width: 768px) {
    /* Desktop: Shift content right for sidebar */
    #navbar {
        padding-left: 0.5rem;
    }
}

@media (max-width: 767px) {
    /* Mobile: Add top padding for top bar */
    html {
        scroll-padding-top: 5.5rem;
    }
}

/* ── Print Styles ─────────────────────────────────────────── */
@media print {
    #orange-bar,
    #navbar,
    .animate-bounce {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ── Utility: Focus Visible ───────────────────────────────── */
*:focus-visible {
    outline: 2px solid #FF6600;
    outline-offset: 2px;
}

/* ── Smooth Hover Transitions for all links ───────────────── */
a {
    transition: color 0.3s ease;
}
