/**
 * Kienzle Immobilien - Global Styles
 * Bootstrap 5 Compatible
 */

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    --transition: all 0.3s ease;
    --bs-breadcrumb-font-size: 16px;
}

/* ===================================
   GLOBAL RESETS
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink-900);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1.5rem;
}

main {
    flex: 1;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.5rem;
    font-weight: 500;
}

small, small {
    font-size: .6em;
}
/* ===================================
   HEADER & NAVIGATION
   =================================== */
header {
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

.page-content-offset {
    padding-top: calc(160px + var(--info-banner-h, 0px));
}

@media (max-width: 1199.98px) {
    .page-content-offset {
        padding-top: calc(110px + var(--info-banner-h, 0px));
    }
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand img {
    transition: var(--transition);
    max-width: 100%;
    height: auto;
}

.top-contact-bar {
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, margin 0.35s ease;
    transform: translateY(0);
    max-height: 100px;
}

header.scrolled .top-contact-bar {
    opacity: 0;
    transform: translateY(-12px);
    max-height: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ===================================
   INFO BANNER
   =================================== */
:root {
    --info-banner-h: 96px;
}

.info-banner {
    background: linear-gradient(135deg, #fff8e1 0%, #ffeeba 100%);
    border-bottom: 2px solid #ffc107;
    font-size: 0.9rem;
    color: #4a3800;
}

.info-banner__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0;
}

.info-banner__img-wrap {
    flex-shrink: 0;
}

.info-banner__img {
    height: 78px;
    width: 126px;
    object-fit: cover;
    border-radius: 0.4rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.info-banner__text {
    flex: 1;
    line-height: 1.45;
}

/*Formulare*/

.bg-primary {
    background-color: var(--bs-gray-500) !important;
}

.btn-light {
    --bs-btn-color: #000;
    --bs-btn-bg: var(--bs-gray-300);
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #d3d4d5;
    --bs-btn-hover-border-color: #c6c7c8;
    --bs-btn-focus-shadow-rgb: 211, 212, 213;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #c6c7c8;
    --bs-btn-active-border-color: #babbbc;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #f8f9fa;
    --bs-btn-disabled-border-color: #f8f9fa;
}

.expose-page .top-contact-bar {
    display: none !important;
}

header.scrolled .navbar {
    padding: 0.5rem 0;
}

header.scrolled .navbar-brand img {
    height: 56px;
    width: auto;
}

.expose-page header .navbar {
    padding: 0.5rem 0;
}

.expose-page header.scrolled .navbar {
    padding: 0.5rem 0;
}

.expose-page header .navbar-brand img,
.expose-page header.scrolled .navbar-brand img {
    height: 56px;
    width: auto;
}

.expose-page header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--ink-900) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-primary) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--brand-primary);
}

.dropdown-menu {
    --bs-dropdown-font-size: 1.4rem;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    font-weight: 500;

}

.dropdown-item:hover {
    background-color: var(--brand-primary);
    color: var(--white);
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    border-radius: 0.375rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0 !important;
}
.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-outline-primary {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ===================================
   UTILITIES
   =================================== */
.text-black {
    color: var(--black);
}


.form-textarea-tall {
    height: 150px;
}

.offscreen-field {
    margin-left: -99999px;
    position: absolute;
}

.notfound-code {
    font-size: clamp(6rem, 15vw, 10rem);
}

.map-frame {
    width: 100%;
    z-index: 1;
}

.contact-map-frame {
    height: 620px;
}

.min-h-400 {
    min-height: 400px;
}

.bg-cover {
    background-size: cover;
    background-position: center;
}

.bg-cover-fixed {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.aspect-3x2 {
    aspect-ratio: 3 / 2;
}

.max-h-80 {
    max-height: 80px;
}

.max-h-100 {
    max-height: 100px;
}

.max-h-500 {
    max-height: 500px;
}

.object-cover {
    object-fit: cover;
}

.h-360 {
    height: 360px;
}

.h-25 {
    height: 25px;
}

.w-10p {
    width: 10%;
}

.w-50p {
    width: 50%;
}

/* ===================================
   CARDS
   =================================== */
.card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-img-top {
    transition: var(--transition);
    object-fit: cover;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.service-card {
    height: 100%;
}

/* ===================================
   FORMS
   =================================== */
.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid var(--border-900);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-primary-focus);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ink-900);
}

.form-check-input {
    border: 1px solid var(--border-900);
    border-radius: 0.25rem;
    transition: var(--transition);
}

.form-text {
    font-size: 0.6em;
}
/* ===================================
   SECTIONS
   =================================== */
section {
    position: relative;
}
.bg-gray {
    background-color: var(--surface-200) !important;
}

/* ===================================
   FOOTER
   =================================== */
footer {
    margin-top: auto;
}

.footer-links h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover,
.hover-white:hover {
    color: var(--white) !important;
    padding-left: 5px;
}

.footer-bottom {
    background-color: var(--overlay-ink-20);
}

/* ===================================
   COOKIE BANNER
   =================================== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: var(--surface-0);
    color: var(--ink-800);
    border-top: 1px solid var(--border-100);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1 1 320px;
    font-size: 0.95rem;
}

.cookie-banner__text p {
    margin: 0.25rem 0 0;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-banner a {
    color: var(--link-primary);
    text-decoration: underline;
}

.cookie-banner .btn {
    width: auto;
}

/* ===================================
   ACCORDION
   =================================== */
.accordion-item {
    font-size: 1.25rem;
}
.accordion-button {
    font-weight: 600;
    background-color: var(--surface-0);
    font-size: 1.5rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--surface-100);
    color: var(--brand-primary);
}

.accordion-button:focus {
    box-shadow: var(--shadow-primary-focus);
}

/* ===================================
   UTILITIES
   =================================== */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

.bg-light {
    background-color: var(--surface-100) !important;
}

.z-index-1 {
    z-index: 1;
}

.gap-3 {
    gap: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ===================================
   LOADING STATES
   =================================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--surface-100);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   CUSTOM SCROLLBAR
   =================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--surface-100);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary-hover);
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

@media (max-width: 992px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background-color: var(--surface-0);
        border-radius: 0.5rem;
        box-shadow: var(--shadow-md);
    }

    .nav-link.active::after {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .btn {
        width: 100%;
    }

    .card-img-top {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        width: 120px;
        height: auto;
    }

    section {
        padding: 2rem 0 !important;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    header,
    footer,
    .btn,
    .navbar {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}
/* Desktop: Hover öffnet Dropdown */
@media (hover: hover) and (pointer: fine) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* saubere Fokusdarstellung */
.nav-item.dropdown > a:focus + .dropdown-menu {
    display: block;
}

/* ===================================
   404 ERROR PAGE
   =================================== */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-404 .error-number {
    animation: fadeInDown 0.8s ease-out;
}

.error-404 h2 {
    animation: fadeIn 1s ease-out 0.2s both;
}

.error-404 .lead {
    animation: fadeIn 1s ease-out 0.4s both;
}

.error-404 .btn {
    animation: fadeIn 1s ease-out 0.6s both;
}

.error-404 .helpful-links {
    animation: fadeIn 1s ease-out 0.8s both;
}

.error-404 .hover-shadow {
    transition: var(--transition);
}

.error-404 .hover-shadow:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--brand-primary) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.version {
    font-size: 0.8rem;
    font-style: italic;
}

.transition-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy)!important;
}

.object-fit-cover {
    object-fit: cover;
}
