/* Messner-Automation — Theme-Stylesheet
   Basiert auf SpicePress / alte messner-automation.de */

:root {
    --primary: #ce1b28;
    --dark: #21202e;
    --dark-variant: #282737;
    --text-dark: #1b1b1b;
    --text-grey: #64646d;
    --text-light: #bbb;
    --white: #ffffff;
    --footer-bg: #171717;
    --border-dark: #363544;
    --overlay-hero: rgba(0, 0, 0, 0.30);
}

/* ===== Reset & Base ===== */

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

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

body {
    margin: 0;
    font-family: 'Roboto', 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Container & Grid ===== */

.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

@media (min-width: 1101px) {
    .container-fluid {
        max-width: 970px;
    }
}

@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1170px;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > [class*="col-"] {
    padding: 0 15px;
}

.col-md-3  { flex: 0 0 25%;      max-width: 25%; }
.col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-6  { flex: 0 0 50%;      max-width: 50%; }
.col-md-12 { flex: 0 0 100%;     max-width: 100%; }
.col-sm-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-sm-6  { flex: 0 0 50%;      max-width: 50%; }
.col-6     { flex: 0 0 50%;      max-width: 50%; }

@media (max-width: 768px) {
    .col-md-3,
    .col-md-4,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

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

.order-md-2 { order: 0; }
@media (min-width: 768px) {
    .order-md-2 { order: 2; }
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== HEADER / NAVBAR ===== */

.site-header {
    position: relative;
    z-index: 1000;
}

.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

.site-header.sticky .navbar-custom {
    min-height: 50px;
    background: var(--white);
    border-bottom-color: var(--primary);
}

.site-header.sticky .nav-link,
.site-header.sticky .navbar-nav li > a {
    color: var(--text-dark);
    padding: 14px 10px;
}

.site-header.sticky .nav-link:hover,
.site-header.sticky .navbar-nav li > a:hover {
    color: var(--primary);
}

.site-header.sticky .site-branding {
    display: none;
}

.site-header.sticky .navbar-logo img {
    width: 120px;
}

.navbar-custom {
    background-color: var(--white);
    border: 0;
    border-bottom: 10px solid var(--primary);
    border-radius: 0;
    z-index: 1000;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.navbar-custom .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 15px;
}

.navbar-header {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar-brand,
.navbar-logo {
    display: flex;
    align-items: center;
    padding: 20px 30px 20px 0;
    text-decoration: none;
}

.navbar-logo img,
.navbar-brand img {
    width: 250px;
    height: auto;
}

.site-branding,
.site-branding-text {
    padding: 10px 0px 10px 0;
    margin: 0px 10px 0px 10px;
    width: 430px;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.site-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.site-title a:hover {
    text-decoration: none;
}

.site-description {
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: var(--text-grey);
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.navbar-collapse {
    display: flex;
}

.nav,
.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-link,
.navbar-nav li > a {
    display: block;
    position: relative;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 16px;
    padding: 35px 17px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link:hover,
.navbar-nav li > a:hover {
    color: var(--primary);
    text-decoration: none;
}

.navbar-toggler {
    display: none;
    background: none;
    border: 1px solid #ddd;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    margin: 24px 0;
}

.navbar-toggler-icon::before {
    content: '\2630';
}

@media (max-width: 1100px) {
    .navbar-toggler {
        display: block;
    }
    .navbar-collapse {
        display: none;
    }
    .navbar-collapse.open {
        display: block;
    }
    .navbar-header {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .navbar-nav {
        flex-direction: column;
        background: var(--dark);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
    }
    .nav-link,
    .navbar-nav li > a {
        color: var(--text-light);
        padding: 12px 20px;
        border-bottom: 1px dotted var(--border-dark);
    }
    .nav-link:hover,
    .navbar-nav li > a:hover {
        color: var(--white);
        background: transparent;
    }
    .site-branding,
    .site-branding-text {
        padding: 13px 0 13px 0;
    }
}

@media (max-width: 500px) {
    .navbar-brand,
    .navbar-logo {
        display: block;
        text-align: center;
        padding: 20px 15px 12px;
    }
    .navbar-brand img,
    .navbar-logo img {
        margin: 0 auto;
    }
    .site-branding,
    .site-branding-text {
        text-align: center;
        padding: 10px 15px;
    }
}

/* ===== HERO / SLIDER SECTION ===== */

.hero-section,
.slider {
    position: relative;
    background-size: cover;
    background-position: center center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    z-index: 0;
}

.hero-overlay,
.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-content,
.hero-inhalt,
.format-standard {
    position: relative;
    z-index: 1;
    color: var(--white);
    width: 100%;
}

.hero-content h1,
.slide-text-bg1 h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
    color: var(--white);
}

.hero-subtitle,
.hero-untertitel,
.slide-text-bg1 p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.6;
    color: var(--white);
        padding: 20px;
    background: #17171779;
}

.btn-hero,
.slide-btn-sm {
    display: inline-block;
    padding: 14px 35px;
    background: var(--primary);
    color: var(--white);
    border-radius: 0;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s, background 0.2s;
}

.btn-hero:hover,
.slide-btn-sm:hover {
    opacity: 0.9;
    text-decoration: none;
    color: var(--white);
}

.slide-btn-area-sm {
    margin-top: 10px;
}

.item {
    width: 100%;
    background-position: center center;
    background-size: cover;
    display: flex;
    align-items: center;
    position: relative;
}

@media (max-width: 480px) {
    .hero-section,
    .slider {
        min-height: 40vh;
    }
    .hero-content h1,
    .slide-text-bg1 h1 {
        font-size: 1.6rem;
    }
    .hero-subtitle,
    .slide-text-bg1 p {
        font-size: 0.95rem;
    }
}

/* ===== PAGE TITLE ===== */

.page-title-section {
    background: var(--dark);
    color: var(--white);
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
}

.page-title-section .overlay {
    position: relative;
    inset: auto;
    display: block;
    padding: 50px 0 48px;
    width: 100%;
}

.page-title h1 {
    color: #ffffff;
    letter-spacing: 1px;
    margin: 0;
    word-wrap: break-word;
}

@media (min-width: 200px) and (max-width: 990px) {
    .page-title-section .overlay { padding: 25px 0 30px; }
}

.page-breadcrumb a:hover {
    color: var(--white);
}

@media (max-width: 768px) {
    .page-breadcrumb {
        justify-content: flex-start;
        margin-top: 8px;
    }
}

/* ===== SECTION HEADER ===== */

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.widget-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    color: var(--text-dark);
}

.widget-separator {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto 16px;
    border: none;
}

.widget-separator span {
    display: none;
}

.section-header p {
    color: var(--text-grey);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* ===== SERVICE / FEATURE GRID ===== */

.service-section {
    background-color: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    padding: 70px 0 30px;
}

.feature-card,
.feature-karte,
.service-section .post {
    background-color: #f9f9f9;
    border: 1px solid #e9e9e9;
    border-top: 3px solid #e9e9e9;
    margin: 0 0 40px;
    padding: 25px 20px 30px;
    text-align: center;
    transition: 0.3s;
}

.feature-card:hover,
.feature-karte:hover,
.service-section .post:hover {
    box-shadow: 0 30px 30px 0 rgba(0,0,0,0.1);
}

.feature-card figure,
.feature-karte figure,
.service-section .post-thumbnail {
    margin: 0 0 15px;
    width: 100%;
    overflow: hidden;
    position: relative;
    transform: perspective(1px) translateZ(0);
    transition-duration: 0.2s;
}

.feature-card:hover figure,
.feature-karte:hover figure,
.service-section .post:hover .post-thumbnail {
    transform: translateY(-5px);
}

.feature-card i.fa,
.feature-karte i.fa,
.service-section .post-thumbnail i.fa,
.service-section figure i.fa {
    font-size: 4.286rem;
    line-height: 105%;
    padding: 0;
    position: relative;
    color: var(--primary);
    display: inline-block;
}

.feature-card .feature-title,
.feature-card h4,
.feature-karte h4,
.service-section .entry-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px;
    padding: 0;
}

.feature-card .feature-title::after,
.feature-card h4::after,
.feature-karte h4::after,
.service-section .entry-title::after {
    content: '';
    background-color: #e9e9e9;
    font-size: 1rem;
    height: 2px;
    width: 5.5rem;
    display: block;
    margin: 0.8rem auto 0;
}

.feature-card p,
.feature-karte p,
.service-section .entry-content p {
    font-size: 0.9rem;
    color: var(--text-grey);
    line-height: 1.7;
}

.feature-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.txt-pink {
    color: var(--primary);
}

/* ===== PROJECTS SECTION (textblock embed, matches SpicePress portfolio) ===== */

.projects-section {
    background: transparent;
    margin: 0;
    padding: 60px 0 30px;
    width: 100%;
}

.project-card {
    background-color: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 0;
    margin-bottom: 40px;
    padding: 15px;
    transition: all 0.4s ease 0s;
}

.project-card:hover {
    box-shadow: 0 30px 30px 0 rgba(0,0,0,0.1);
}

.project-thumbnail {
    margin: 0 0 16px;
    width: 100%;
    overflow: hidden;
    position: relative;
    line-height: 0;
    font-size: 0;
}

.project-thumbnail img {
    width: 100%;
    border-radius: 0;
    transition: all 300ms ease-out;
    display: block;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.15);
}

.project-content p {
    font-size: 0.875rem;
    color: var(--text-grey);
    line-height: 1.6;
    margin: 0;
}

/* ===== PORTFOLIO / IMAGE GALLERY ===== */

.portfolio-section,
.image-gallery {
    background: transparent;
    margin: 0;
    padding: 60px 0 30px;
    width: 100%;
}

.portfolio-section .post,
.gallery-card {
    background-color: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 0;
    margin-bottom: 40px;
    padding: 15px;
    transition: all 0.4s ease 0s;
}

.portfolio-section .post:hover,
.gallery-card:hover {
    box-shadow: 0 30px 30px 0 rgba(0,0,0,0.1);
}

.portfolio-section .post-thumbnail,
.gallery-card .gallery-image {
    margin: 0 0 16px;
    width: 100%;
    overflow: hidden;
    position: relative;
    text-align: center;
    line-height: 0;
    font-size: 0;
    transition: all 200ms ease-out;
}

.portfolio-section .post-thumbnail img,
.gallery-card img {
    border-radius: 0;
    width: 100%;
    transition: all 300ms ease-out;
    opacity: 1;
}

.portfolio-section .post .post-thumbnail:hover img,
.gallery-card:hover .gallery-image img {
    transform: scale(1.15);
    opacity: 1;
}

.portfolio-section .entry-header,
.gallery-title {
    font-size: 1rem;
    margin: 12px 0 8px;
}

.portfolio-section .entry-header .entry-title {
    font-weight: 700;
    margin: 0 0 5px;
}

.portfolio-section .entry-header .entry-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.portfolio-section .entry-content p,
.gallery-description {
    font-size: 0.875rem;
    color: var(--text-grey);
    line-height: 1.6;
}

/* ===== SLIDER MODULE ===== */

.slider-module {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    overflow: hidden;
}

.slider-container {
    position: relative;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    padding: 12px 20px;
    font-size: 0.9rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: var(--white);
    border: none;
    padding: 16px 12px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: background 0.2s;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slider-prev { left: 0; }
.slider-next { right: 0; }

.slider-dots {
    text-align: center;
    padding: 12px 0;
}

.slider-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.slider-dot.active {
    background: var(--primary);
}

/* ===== CTA BLOCK ===== */

.cta-block {
    padding: 40px 0;
}

.cta-highlighted,
.cta-hervorgehoben {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0;
}

.cta-block h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.cta-block p {
    font-size: 1rem;
    margin: 0 0 16px;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    padding: 14px 35px;
    background: var(--primary);
    color: var(--white);
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-cta:hover {
    opacity: 0.9;
    text-decoration: none;
    color: var(--white);
}

/* ===== IMAGE + TEXT ===== */

.image-text,
.bild-text {
    padding: 40px 0;
}

.image-text-content,
.bild-text-inhalt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.image-text-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.image-text-content p {
    color: var(--text-grey);
    line-height: 1.7;
}

.image-text-figure img {
    border-radius: 4px;
}

/* ===== TEXTBLOCK ===== */

.textblock {
    padding: 40px 0;
}

.textblock .container {
    max-width: 1170px;
}

.textblock-content,
.textblock-inhalt {
    max-width: 800px;
    margin: 0 auto;
}

.textblock-content h2,
.textblock-content h3 {
    margin-top: 24px;
    font-weight: 600;
}

.textblock-content p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: var(--text-grey);
}

/* ===== CONTACT BLOCK ===== */

.contact-block {
    padding: 60px 0;
}

.contact-info h3 {
    font-weight: 700;
    margin: 0 0 16px;
}

.contact-info p {
    margin-bottom: 8px;
    color: var(--text-grey);
}

.contact-info a {
    color: var(--primary);
}

.contact-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 4px;
}

/* ===== FORM (frontend) ===== */

.cms-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.required {
    color: var(--primary);
}

/* ===== DIVIDER ===== */

.divider {
    border: none;
    margin: 20px 0;
}

.divider-simple {
    border-top: 1px solid #eee;
}

.divider-accent {
    border-top: 3px solid var(--primary);
}

.divider-dotted {
    border-top: 2px dotted #ccc;
}

/* ===== FOOTER ===== */

.site-footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: 40px 0 0;
}

.site-footer p {
    color: var(--white);
}

.footer-sidebar {
    padding-bottom: 30px;
}

.footer-widget {
    margin-bottom: 20px;
}

.footer-widget a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-widget a:hover {
    color: var(--white);
    text-decoration: none;
}

.footer-menu,
.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li,
.menu li {
    margin-bottom: 8px;
}

.footer-logo {
    margin-top: 10px;
}

.footer-logo img {
    max-width: 300px;
}

.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    font-size: 0.8rem;
    color: var(--text-light);
}

.site-info p {
    margin: 0;
    color: var(--text-light);
}

/* ===== BUTTONS ===== */

.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    text-decoration: none;
    color: var(--white);
}

/* ===== SCROLL TO TOP ===== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    z-index: 999;
    opacity: 0.8;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scroll-to-top:hover {
    opacity: 1;
}

/* ===== CONTENT MODULE (shared wrapper) ===== */

.content-module {
    padding: 40px 0;
}

.content-module .container {
    max-width: 1170px;
}

/* ===== REFERENCES MODULE ===== */

.references-module {
    padding: 60px 0;
}

.references-grid {
    align-items: center;
}

.reference-item {
    padding: 20px 15px;
    margin-bottom: 20px;
}

.reference-item img {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}

.reference-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ===== IMAGE GALLERY (overrides merged into PORTFOLIO section above) ===== */

/* ===== FORM EMBED ===== */

.form-embed {
    padding: 40px 0;
}

.form-embed .cms-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-embed .cms-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
}

.form-embed .cms-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* ===== HEADINGS (SpicePress Montserrat style) ===== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

/* ===== FA ICON COLORS (SpicePress style) ===== */

.txt-pink,
.feature-card .fa {
    color: var(--primary);
}

/* ===== SPACER MODULE ===== */

.spacer {
    display: block;
}

/* ===== ERROR PAGE ===== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary);
    margin-bottom: 16px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .footer-sidebar .col-md-4 {
        text-align: center;
        margin-bottom: 24px;
    }
    .footer-menu {
        display: inline-block;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .section-header {
        margin-bottom: 24px;
    }
    .section-header p {
        font-size: 0.9rem;
    }
    .reference-item img {
        max-height: 40px;
    }
}
