/* Light Theme Variables */
:root {
    --bg-body: #fdfaf6;
    /* Warm off-white */
    --bg-white: #ffffff;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --primary: #c2410c;
    /* Rusty Orange/Red for Construction/Roofing */
    --primary-hover: #9a3412;
    --secondary: #111827;
    /* Dark Grey/Black */
    --accent: #ca8a04;
    /* Gold/Yellow for guild details */

    --font-heading: 'Oswald', sans-serif;
    --font-heading-line-height: 1.2;
    --font-body: 'Manrope', sans-serif;

    --container-width: 1600px;
    --header-height: 90px;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Utils */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.center {
    text-align: center;
}

.text-accent {
    color: var(--primary);
}

.d-block {
    display: block;
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Content Section for Subpages */
.content-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

.content-section--alt {
    background: var(--bg-body);
}

.content-box {
    max-width: 900px;
    margin: 0 auto;
}

.content-box p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.content-box h2 {
    margin-bottom: 2rem;
}

.content-box h3 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
}

.btn--primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(194, 65, 12, 0.3);
}

.btn--primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn--white {
    background: white;
    color: var(--secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-left: 1rem;
}

.btn--white:hover {
    background: #f3f4f6;
}

.btn--outline-dark {
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    margin-top: 0;
}

.btn--outline-dark:hover {
    background: var(--secondary);
    color: white;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav__list {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav__link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
}

.nav__link:hover,
.nav__link.active {
    color: var(--secondary);
}

/* Red underline effect from screenshot */
.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.nav__toggle span {
    width: 30px;
    width: 30px;
    height: 3px;
    background: var(--secondary);
    display: block;
}

/* Hero Section */
.hero-classic {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg {
    width: 100%;
    height: 110%;
    /* Extra height for parallax */
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darkens bg for text readability */
}

.hero-content {
    color: white;
    z-index: 1;
}

.hero-title {
    color: white;
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}


.hero-sub {
    height: 50vh;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-height);
    background: var(--secondary);
}

/* Zunft Icon */
.zunft-icon {
    width: 60px;
    /* Vergrößert von 30px */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Nav Close Button (Mobile) */
.nav__close {
    display: none;
    /* Desktop hidden */
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--secondary);
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.nav__close:hover {
    transform: rotate(90deg);
    color: var(--primary);
}

/* Services Tiles Section */
.services-tiles {
    display: grid;
    /* Using min-content or specific height to match "screenshot" look */
    grid-template-columns: repeat(4, 1fr);
    min-height: 600px;
    /* Tall columns */
}

.tile {
    position: relative;
    overflow: hidden;
    color: white;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: flex 0.5s ease;
}

.tile-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
    z-index: 0;
    filter: brightness(0.7);
}

.tile-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center initially like screenshot? Actually screenshot text is top/middle. */
    align-items: center;
    padding: 2rem;
    text-align: center;
    background: rgba(31, 41, 55, 0.3);
    /* Slight tint */
    transition: background 0.3s ease;
}

.tile h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.tile-body {
    width: 100%;
    padding: 0 1rem;
    opacity: 0;
    /* Hidden by default for 'wow' reveal on hover */
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.tile p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.tile-link {
    color: white;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
}

/* Hover Effects for "Pepp" */
.tile:hover .tile-bg {
    transform: scale(1.1);
    filter: brightness(0.4);
    /* Darken more to read text */
}

.tile:hover .tile-content {
    background: rgba(194, 65, 12, 0.2);
    /* Red tint on hover */
}

.tile:hover h3 {
    transform: translateY(-20px);
}

.tile:hover .tile-body {
    opacity: 1;
    transform: translateY(-20px);
}

/* About Section */
.section {
    padding: 8rem 0;
}

.grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image-stack {
    position: relative;
    perspective: 1000px;
    /* For 3D tilt */
}

.img-front {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.img-back-decoration {
    position: absolute;
    top: 40px;
    right: -40px;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    border: 2px solid var(--primary);
    z-index: 1;
    border-radius: 4px;
}

.overline {
    display: block;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.section-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--secondary);
}

.feature-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* CTA */
.cta-section {
    background: var(--secondary);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #111;
    color: #9ca3af;
    padding: 5rem 0 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
    border-bottom: 1px solid #333;
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    filter: brightness(0) invert(1);
    opacity: 0.7;
    margin-bottom: 1rem;
    height: 50px;
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-links a {
    display: block;
    margin-bottom: 0.5rem;
}

.contact-links a:hover,
.footer-legal a:hover {
    color: var(--primary);
}

.footer__bottom {
    text-align: center;
    font-size: 0.9rem;
}

.heart {
    color: red;
}


/* Responsive */
@media (max-width: 1024px) {
    .services-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .services-tiles {
        grid-template-columns: 1fr;
    }

    .grid-split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image-stack {
        max-width: 400px;
        margin: 0 auto 3rem;
    }

    .feature-list li {
        justify-content: center;
    }

    .container {
        width: 95%;
        /* Increased from 90% for more breathing room */
        padding: 0 1rem;
    }

    .header__container {
        padding: 0 1rem;
    }

    .section {
        padding: 4rem 0;
        /* Reduced from 8rem */
        text-align: center;
    }

    .container.center {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Fix for Career Page Benefits Grid */
    .content-section div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        justify-items: center;
    }

    .content-section div[style*="display: grid"]>div {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 320px;
    }

    /* Fix for Job Cards in Career Page */
    .content-section div[style*="padding: 3rem"] {
        padding: 2rem 1.5rem !important;
        text-align: center;
    }

    .content-section div[style*="display: flex"] {
        justify-content: center !important;
        text-align: center;
    }


    .content-section {
        padding: 3rem 0;
        /* Reduced from 6rem */
    }

    .cta-section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
        /* Reduced from 3rem */
        word-wrap: break-word;
        /* Prevent overflow of long words */
        text-align: center;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero-classic,
    .hero-sub {
        height: auto;
        min-height: 500px;
        padding-bottom: 4rem;
    }

    .nav__toggle {
        display: flex;
        z-index: 1002;
        position: relative;
        padding: 10px;
        /* Increase touch target */
        transition: opacity 0.3s ease;
    }

    /* Hide hamburger when menu is open */
    .nav__list.active~.nav__toggle {
        opacity: 0;
        pointer-events: none;
    }

    .nav__list {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s ease;
        padding: 0;
        z-index: 1001;
    }

    .nav__list.active {
        transform: translateX(0);
        visibility: visible;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title {
        font-size: 2.2rem;
        /* Reduced from 2.5rem */
        word-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .about-image-stack {
        margin-bottom: 3rem;
    }

    .footer {
        padding: 3rem 0 2rem;
        /* Reduced from 5rem */
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 1.5rem;
    }

    .contact-links a {
        justify-content: center;
        text-align: center;
    }

    .footer-legal {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav__close {
        display: none;
    }

    /* Show close button on mobile ONLY when active - handled by visibility of parent */
    .nav__list.active .nav__close {
        display: block;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
        margin-left: 0;
    }

    .tile {
        min-height: 250px;
    }

    /* Fix image overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    .about-image-stack {
        max-width: 100%;
    }

    /* Ensure buttons don't overflow */
    .btn {
        font-size: 0.85rem;
        padding: 0.9rem 1.5rem;
        white-space: nowrap;
    }
}

/* Joomla / CMS Breakout Utility 
   Forces elements to take full viewport width even inside a container 
*/
@media (min-width: 769px) {

    /* Only use breakout on larger screens */
    .hero-classic,
    .services-tiles,
    .cta-section,
    .about-preview {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {

    /* Reset breakout for mobile */
    .hero-classic,
    .services-tiles,
    .cta-section,
    .about-preview {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        left: auto;
        right: auto;
    }
}

/* Ensure Nav is on top of everything in Joomla */
.header {
    z-index: 9999;
}

.nav__list {
    z-index: 10000;
}

.nav__toggle {
    z-index: 10001;
    position: relative;
}

/* Angebots-Generator Section */
.offer-generator {
    padding: 6rem 0;
    background: #f8fafc;
}

.generator-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.generator-header {
    background: #334155;
    color: white;
    padding: 2rem;
    text-align: center;
}

.generator-header h2 {
    font-size: 2rem;
    color: white;
    margin: 0;
}

.generator-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.generator-select {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    appearance: none;
    background: #f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 1.5rem center;
    background-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generator-select:hover {
    border-color: var(--primary);
}

.btn--generator {
    width: 100%;
    background: #0ea5e9;
    /* Teal/Blue from screenshot */
    color: white;
    padding: 1.2rem;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
    margin-top: 1rem;
}

.btn--generator:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

.generator-footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .offer-generator {
        padding: 4rem 0;
    }

    .generator-body {
        padding: 1.5rem;
    }

    .generator-header h2 {
        font-size: 1.6rem;
    }
}