/* =============================================================================
   FRANK HÜBNER BAUUNTERNEHMEN UND DACHDECKER – STYLE.CSS
   Kolorikation für huebner-dach-bau.de
   ============================================================================= */

:root {
    --primary: #8B3A2E;
    --primary-dark: #6B2A20;
    --primary-light: #A0553F;
    --text: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --bg-light: #F4F1EF;
    --bg-alt: #dde2e2;
    --dark: #2a2018;
    --shadow: rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
    --max-width: 1100px;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.skip {
    position: absolute; top: -100px; left: 0;
    background: var(--primary); color: var(--white);
    padding: 12px 24px; z-index: 9999; font-weight: 700;
}
.skip:focus { top: 0; }

.wrap { width: 90%; max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }

/* === TOPBAR === */
.topbar {
    background: var(--white);
    padding: 10px 0;
    position: sticky; top: 0; z-index: 1100;
    box-shadow: 0 2px 8px var(--shadow);
}
.topbar-inner {
    display: flex; justify-content: flex-end; gap: 30px;
    flex-wrap: wrap; align-items: center;
}
.topbar-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--primary); font-size: 0.95rem; font-weight: 500;
    padding: 6px 12px; border-radius: 6px;
    background: rgba(139, 58, 46, 0.05);
    transition: all 0.3s;
}
.topbar-link:hover {
    background: rgba(139, 58, 46, 0.15);
    color: var(--primary-dark); text-decoration: none;
}
.topbar-link svg { fill: var(--primary); flex-shrink: 0; }

/* === HEADER === */
.site-shell {
    background: var(--primary);
    padding: 12px 0;
    position: sticky; top: 52px; z-index: 1050;
    box-shadow: 0 3px 12px var(--shadow);
}
.wrap .nav {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 15px;
}
.logo-float { flex: 0 0 auto; }
.logo-box {
    background: var(--white); padding: 8px 14px;
    border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.2);
    display: inline-block;
}
.logo-box img { max-height: 65px; width: auto; object-fit: contain; }

/* === NAVIGATION === */
.nav-toggle {
    display: none; font-size: 1.8rem; cursor: pointer;
    color: var(--white); background: none; border: none; padding: 8px;
}
.menu {
    display: flex; gap: 5px; list-style: none;
    flex-wrap: wrap; align-items: center;
}
.menu-item a {
    color: var(--white); font-weight: 500; font-size: 0.95rem;
    padding: 10px 16px; border-radius: 6px; transition: all 0.3s;
    min-height: 44px; display: flex; align-items: center;
}
.menu-item a:hover, .menu-item a.active {
    background: rgba(255,255,255,0.18); color: var(--white); text-decoration: none;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}
.hero-content { max-width: 850px; margin: 0 auto; }
.hero h1 {
    font-size: 2.3rem; font-weight: 700; margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5); line-height: 1.25;
}
.hero p {
    font-size: 1.15rem; opacity: 0.95;
    max-width: 700px; margin: 0 auto; line-height: 1.8;
}

/* === SECTIONS === */
.section { padding: 65px 0; }
.section-bg { background: var(--bg-light); }
.section-title { text-align: center; margin-bottom: 45px; }
.section-title h2 {
    font-size: 1.9rem; color: var(--primary);
    margin-bottom: 12px; font-weight: 700;
}
.section-title p {
    color: var(--text-light); max-width: 650px;
    margin: 0 auto; font-size: 1.05rem;
}

/* === CARD INTRO === */
.card-intro {
    background: var(--white); padding: 45px;
    border-radius: var(--radius); box-shadow: 0 6px 24px var(--shadow);
    max-width: 900px; margin: 0 auto;
    border: 1px solid rgba(139,58,46,0.08);
}
.card-intro h2 {
    font-size: 1.6rem; color: var(--primary);
    margin-bottom: 20px; text-align: center; font-weight: 700;
}
.card-intro p {
    margin-bottom: 16px; font-size: 1.05rem;
    color: var(--text); line-height: 1.75;
}
.card-intro a { color: var(--primary); text-decoration: underline; font-weight: 600; }

/* === SERVICES GRID === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px; margin-top: 35px;
}
.service-card {
    background: var(--white); padding: 30px;
    border-radius: var(--radius); box-shadow: 0 4px 16px var(--shadow);
    text-align: center; border: 2px solid transparent;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.15);
    border-color: var(--primary);
}
.service-icon { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--primary); }
.service-icon svg { fill: var(--primary); }
.service-card h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 10px; font-weight: 700; }
.service-card p { font-size: 0.95rem; color: var(--text-light); line-height: 1.65; }

/* === CTA BOX === */
.cta-box {
    text-align: center; margin-top: 45px;
    background: var(--white); padding: 35px;
    border-radius: var(--radius); box-shadow: 0 4px 16px var(--shadow);
    max-width: 750px; margin-left: auto; margin-right: auto;
}
.cta-box p { font-size: 1.1rem; margin-bottom: 22px; color: var(--text); }

/* === BUTTONS === */
.btn {
    display: inline-block; background: var(--primary); color: var(--white);
    padding: 14px 32px; border-radius: 8px; font-weight: 600; font-size: 1.05rem;
    border: none; cursor: pointer; transition: all 0.3s;
    min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover {
    background: var(--primary-dark); color: var(--white);
    text-decoration: none; transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* === GALERIE / REFERENZEN === */
.gallery-shell {
    background: var(--white); border-radius: var(--radius);
    padding: 30px; box-shadow: 0 4px 16px var(--shadow);
    max-width: 950px; margin: 0 auto;
}
.gallery-wrap {
    display: flex; gap: 12px; overflow-x: auto;
    scroll-behavior: smooth; padding: 10px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--primary) #ddd;
}
.gallery-wrap::-webkit-scrollbar { height: 8px; }
.gallery-wrap::-webkit-scrollbar-track { background: #ddd; border-radius: 4px; }
.gallery-wrap::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.slides {
    flex: 0 0 320px; height: 220px; border-radius: 10px;
    overflow: hidden; background: #e0e0e0; flex-shrink: 0;
    transition: transform 0.3s;
}
.slides:hover { transform: scale(1.02); }
.slides img { width: 100%; height: 100%; object-fit: cover; }
.gallery-hint { text-align: center; color: var(--text-light); font-size: 0.9rem; margin: 15px 0; font-style: italic; }
.gallery-empty { padding: 34px; text-align: center; color: var(--text-light); width: 100%; }

.gallery-nav {
    display: flex; justify-content: center; gap: 15px; margin-top: 10px;
}
.icon-btn {
    width: 50px; height: 50px; border-radius: 50%;
    border: 2px solid var(--primary); background: var(--white);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; min-width: 50px; font-size: 1.5rem; color: var(--primary);
}
.icon-btn:hover { background: var(--primary); color: var(--white); }

/* === LIGHTBOX === */
.gallery-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.95);
    z-index: 9999; justify-content: center; align-items: center; padding: 20px;
}
.gallery-modal.active { display: flex; }
.modal-img { max-width: 88%; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; color: white;
    font-size: 2.2rem; cursor: pointer; z-index: 10001; padding: 8px 16px;
    opacity: 0.85; transition: opacity 0.3s;
}
.modal-close:hover { opacity: 1; }
.modal-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: white;
    cursor: pointer; z-index: 10001; padding: 15px 25px;
    opacity: 0.75; transition: opacity 0.3s;
}
.modal-arrow:hover { opacity: 1; }
.modal-prev { left: 10px; }
.modal-next { right: 10px; }
.modal-arrow svg { fill: rgba(255,255,255,0.9); width: 40px; height: 40px; }

/* === KONTAKT === */
.contact-card {
    background: var(--white); border-radius: var(--radius);
    padding: 45px; box-shadow: 0 4px 18px var(--shadow);
    max-width: 950px; margin: 0 auto;
}
.contact-split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-left h3, .contact-right h3 {
    font-size: 1.5rem; color: var(--primary); margin-bottom: 18px; font-weight: 700;
}
.contact-left p { color: var(--text-light); margin-bottom: 24px; font-size: 1.05rem; }
.contact-box {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-light); padding: 16px 20px;
    border-radius: 10px; margin-bottom: 14px;
    transition: all 0.3s; min-height: 48px;
}
.contact-box:hover {
    background: rgba(139,58,46,0.12); text-decoration: none; transform: translateX(4px);
}
.contact-box svg { fill: var(--primary); flex-shrink: 0; }
.contact-box span { color: var(--text); font-weight: 600; font-size: 1.05rem; }
.contact-company { color: var(--text-light) !important; margin-bottom: 10px; font-size: 1.05rem; font-weight: 500; }
.contact-address { color: var(--primary) !important; font-weight: 600; font-size: 1.1rem; margin-bottom: 20px; }
.btn-route {
    display: inline-block; background: var(--primary); color: var(--white);
    padding: 14px 30px; border-radius: 8px; font-weight: 600; font-size: 1.05rem;
    margin-top: 10px; transition: all 0.3s; min-height: 48px;
}
.btn-route:hover {
    background: var(--primary-dark); color: var(--white);
    text-decoration: none; transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* === SIDE CONTACT === */
.side-contact {
    position: fixed; right: 0; top: 50%;
    transform: translateY(-50%); z-index: 1000;
    display: flex; flex-direction: column; gap: 6px;
}
.side-tab {
    display: flex; align-items: center; justify-content: flex-start;
    width: 54px; height: 54px; background: var(--primary); color: var(--white);
    overflow: hidden; transition: width 0.35s; border-radius: 12px 0 0 12px;
    padding-left: 16px; cursor: pointer; min-height: 44px; text-decoration: none;
}
.side-tab:hover { width: 240px; text-decoration: none; background: var(--primary-dark); }
.side-icon { fill: var(--white); flex-shrink: 0; }
.side-label {
    white-space: nowrap; margin-left: 12px;
    font-size: 0.9rem; font-weight: 600;
    opacity: 0; transition: opacity 0.35s;
}
.side-tab:hover .side-label { opacity: 1; }

/* === BACK TO TOP === */
.back-to-top {
    position: fixed; bottom: 25px; right: 25px;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: var(--white);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: all 0.3s; box-shadow: 0 4px 16px rgba(0,0,0,0.25); min-height: 44px;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-4px); }
.back-to-top svg { fill: var(--white); }

/* === FOOTER === */
.main-footer {
    background: var(--dark); color: #bbb;
    padding: 45px 0 30px; border-top: 4px solid var(--primary);
}
.footer-inner {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px;
}
.footer-company {
    font-weight: 700; color: var(--white) !important;
    font-size: 1.15rem !important; margin-bottom: 18px !important;
}
.footer-text { line-height: 1.6; color: #ccc; margin-bottom: 8px; }
.footer-text a { color: #ddd; }
.footer-text a:hover { color: var(--white); text-decoration: underline; }

.footer-center h4, .footer-right h4 {
    color: var(--white); font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
}
.opening-hours { list-style: none; padding: 0; margin: 0; }
.opening-hours li {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 0.95rem;
}
.opening-hours li:last-child { border-bottom: none; }
.opening-hours .day { color: #ddd; font-weight: 500; }
.opening-hours .time { color: #bbb; text-align: right; min-width: 140px; }
.time.ruf { color: var(--primary-light); font-weight: 600; }

.btn-route-small {
    display: inline-block; background: var(--primary); color: var(--white);
    padding: 10px 20px; border-radius: 6px; font-weight: 600; font-size: 0.9rem;
    margin: 0 0 20px; text-decoration: none; transition: all 0.3s;
}
.btn-route-small:hover {
    background: var(--primary-dark); color: var(--white);
    text-decoration: none; transform: translateY(-2px);
}
.footer-legal { display: flex; flex-direction: column; gap: 10px; }
.footer-legal a { color: #ccc; font-size: 0.95rem; }
.footer-legal a:hover { color: var(--white); text-decoration: underline; }

.footer-copyright {
    text-align: center; margin-top: 35px;
    padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-copyright p { font-size: 0.9rem; color: #888; }
.footer-copyright a { color: #aaa; }
.footer-copyright a:hover { color: var(--white); }

/* === COOKIE BANNER === */
.cookie {
    position: fixed; left: 20px; right: 20px; bottom: 20px;
    z-index: 2000; background: var(--white);
    border: 1px solid var(--shadow); box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border-radius: 12px; padding: 20px; display: none;
}
.cookie-row {
    display: flex; justify-content: space-between;
    gap: 14px; align-items: flex-start;
}
.cookie p { margin: 5px 0; color: var(--text-light); font-size: 0.9rem; }
.cookie strong { color: var(--text); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.cookie-btn {
    min-height: 44px; padding: 12px 16px; border-radius: 8px;
    border: 1px solid var(--text-light); cursor: pointer;
    font-weight: 700; font-size: 0.9rem;
}
.cookie-btn.accept { background: var(--primary); color: var(--white); border-color: var(--primary); }
.cookie-btn.accept:hover { background: var(--primary-dark); }
.cookie-btn.decline { background: var(--white); color: var(--text); }
.cookie-btn.decline:hover { background: var(--bg-light); }

/* === RESPONSIVE === */
@media (max-width: 860px) {
    html { font-size: 15px; }
    .nav-toggle { display: block; }
    .menu {
        display: none; flex-direction: column;
        position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--primary); padding: 20px 15px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15); gap: 8px; z-index: 1049;
    }
    .menu.active, .menu.open { display: flex; }
    .topbar-inner { justify-content: center; gap: 15px; }
    .hero { padding: 55px 0; }
    .hero h1 { font-size: 1.7rem; }
    .hero p { font-size: 1.05rem; }
    .section { padding: 45px 0; }
    .card-intro { padding: 30px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .service-card { padding: 22px; }
    .contact-split { grid-template-columns: 1fr; gap: 30px; }
    .slides { flex: 0 0 240px; height: 170px; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .footer-right { text-align: left; }
    .opening-hours li { flex-direction: column; gap: 4px; }
    .opening-hours .time { text-align: left; min-width: auto; }
    .side-contact { display: none; }
    .modal-img { max-width: 95%; max-height: 75vh; }
    .modal-prev { left: 5px; }
    .modal-next { right: 5px; }
    .cookie-row { flex-direction: column; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .services-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
    .section-title h2 { font-size: 1.5rem; }
    .section { padding: 35px 0; }
    .card-intro { padding: 25px; }
    .logo-box { max-height: 48px; padding: 6px 10px; }
    .slides { flex: 0 0 200px; height: 140px; }
    .btn, .btn-route { padding: 12px 24px; font-size: 1rem; width: 100%; }
    .topbar-link { font-size: 0.8rem; padding: 5px 8px; }
}

@media (max-width: 360px) {
    .wrap { width: 95%; }
    .hero h1 { font-size: 1.35rem; }
    .slides { flex: 0 0 160px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .topbar, .site-shell, .side-contact, .back-to-top, .gallery-modal, .cookie { display: none !important; }
    body { background: var(--white); color: #000; }
    a { color: #000; text-decoration: underline; }
}
