/* =====================================================================
   Me-Ma-Tec Joomla Template - template.css
   Nachbau des Designs von mematec-industrie.de
   Primaerfarbe: #EAB912 | Dunkel: #484F53 | Schrift: Fira Sans
   ===================================================================== */

/* ---------- CSS-Variablen ---------- */
:root {
    --mematec-primary: #EAB912;
    --mematec-primary-dark: #d0a40c;
    --mematec-dark: #484F53;
    --mematec-dark-btn: #333333;
    --mematec-text: #666666;
    --mematec-heading: #000000;
    --mematec-link: #555555;
    --mematec-gray: #999999;
    --mematec-border: #eeeeee;
    --mematec-light: #f7f7f7;
    --mematec-light-gray: #e9e9e9;
    --mematec-white: #ffffff;
    --mematec-container: 1200px;
    --mematec-font: 'Fira Sans', Arial, 'Helvetica Neue', Helvetica, sans-serif;
    --mematec-radius: 4px;
    --mematec-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --mematec-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
    --mematec-transition: all 0.28s ease;
}

/* ---------- Reset / Basis ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--mematec-font);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--mematec-text);
    background: var(--mematec-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--mematec-font);
    color: var(--mematec-heading);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 600;
}

h1 { font-size: 2.6rem; font-weight: 700; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.2em; }

a {
    color: var(--mematec-link);
    text-decoration: none;
    transition: var(--mematec-transition);
}
a:hover, a:focus { color: var(--mematec-primary); }

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

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--mematec-container);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ---------- Skip-Link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--mematec-primary);
    color: var(--mematec-heading);
    padding: 10px 18px;
    z-index: 9999;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* =====================================================================
   TOPBAR
   ===================================================================== */
.mematec-topbar {
    background: var(--mematec-primary);
    color: var(--mematec-heading);
    font-size: 0.875rem;
    line-height: 1.4;
}
.topbar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    min-height: 40px;
    flex-wrap: wrap;
}
.topbar-contact {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mematec-heading);
    font-weight: 400;
}
.topbar-item i { font-size: 0.9em; }
.topbar-item:hover, .topbar-item:focus { color: var(--mematec-white); }
.topbar-modules { display: flex; align-items: center; gap: 16px; }
.topbar-modules a { color: var(--mematec-heading); }
.topbar-modules a:hover { color: var(--mematec-white); }

/* =====================================================================
   HEADER
   ===================================================================== */
.mematec-header {
    background: var(--mematec-white);
    box-shadow: var(--mematec-shadow);
    position: relative;
    z-index: 1000;
}
.mematec-header.sticky-enabled.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.35s ease;
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
    gap: 20px;
}
.header-logo .logo-img,
.header-logo img { max-height: 60px; width: auto; }
.logo-link { display: inline-block; }

/* ---------- Hauptnavigation ---------- */
.header-nav ul.mod-menu,
.header-nav ul.menu,
.header-nav ul.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-nav li { position: relative; }
.header-nav a,
.header-nav .nav-header,
.header-nav span.separator {
    display: block;
    padding: 12px 16px;
    color: var(--mematec-link);
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: none;
}
.header-nav a:hover,
.header-nav a:focus,
.header-nav li.active > a,
.header-nav li.current > a {
    color: var(--mematec-primary);
}
.header-nav li.active > a { font-weight: 600; }

/* Dropdown-Untermenue */
.header-nav li ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--mematec-white);
    box-shadow: var(--mematec-shadow-hover);
    border-top: 3px solid var(--mematec-primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--mematec-transition);
    z-index: 100;
}
.header-nav li:hover > ul,
.header-nav li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header-nav li ul li { display: block; }
.header-nav li ul a {
    padding: 10px 20px;
    border-bottom: 1px solid var(--mematec-border);
}
.header-nav li ul li:last-child a { border-bottom: none; }

/* Deeper level */
.header-nav li ul li ul { top: 0; left: 100%; }

/* ---------- Hamburger-Button ---------- */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--mematec-dark);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 8px 10px;
    line-height: 1;
}
.nav-toggle:hover { color: var(--mematec-primary); }

/* =====================================================================
   HERO
   ===================================================================== */
.mematec-hero {
    position: relative;
    overflow: hidden;
    background: var(--mematec-light-gray);
}
.mematec-hero img { width: 100%; }
/* Parallelogramm-Overlay-Element (gelb) */
.hero-parallelogram {
    position: absolute;
    top: 0;
    left: -5%;
    width: 45%;
    height: 100%;
    background: var(--mematec-primary);
    opacity: 0.92;
    transform: skewX(-12deg);
    transform-origin: top left;
    z-index: 2;
    pointer-events: none;
}
.mematec-hero .container,
.mematec-hero > div:not(.hero-parallelogram) { position: relative; z-index: 3; }

/* Hero-Text (falls Modul Text enthaelt) */
.mematec-hero .hero-content {
    position: relative;
    z-index: 3;
    padding: 60px 0;
    color: var(--mematec-white);
}

/* =====================================================================
   INTRO
   ===================================================================== */
.mematec-intro {
    padding: 60px 0;
    text-align: center;
}
.mematec-intro h1,
.mematec-intro h2 {
    color: var(--mematec-primary);
    font-size: 2rem;
    font-weight: 700;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
/* gelbe Trennlinie unter Intro-Headline */
.mematec-intro h1::after,
.mematec-intro h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: var(--mematec-primary);
    margin: 20px auto 0;
}
.mematec-intro p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--mematec-text);
}

/* =====================================================================
   LEISTUNGEN (Karten-Grid)
   ===================================================================== */
.mematec-leistungen {
    padding: 40px 0 70px;
    background: var(--mematec-light);
}
.leistungen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Karten-Stil (auch fuer mematec_card Modul-Chrome) */
.mematec-card {
    background: var(--mematec-white);
    border: 1px solid var(--mematec-border);
    border-radius: var(--mematec-radius);
    padding: 34px 28px;
    box-shadow: var(--mematec-shadow);
    transition: var(--mematec-transition);
    height: 100%;
}
.mematec-card:hover {
    border-color: var(--mematec-primary);
    box-shadow: var(--mematec-shadow-hover);
    transform: translateY(-4px);
}
.mematec-card .card-icon,
.mematec-card .fa,
.mematec-card .fa-solid {
    color: var(--mematec-primary);
}
.mematec-card h2, .mematec-card h3 { font-size: 1.25rem; }

/* Modul-Titel Standard */
.module-title,
.moduletitle,
.mematec-card > h3.module-title {
    font-size: 1.3rem;
    margin-bottom: 0.7em;
    position: relative;
}

/* =====================================================================
   HAUPTINHALT / LAYOUT
   ===================================================================== */
.mematec-main {
    padding: 50px 0;
}
.main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.site.has-sidebar .main-content-area { flex: 1 1 auto; min-width: 0; }
.site.no-sidebar .main-content-area { width: 100%; }

.mematec-sidebar {
    flex: 0 0 300px;
    width: 300px;
}

/* Breadcrumb */
.mematec-breadcrumb {
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--mematec-gray);
}
.mematec-breadcrumb a { color: var(--mematec-link); }
.mematec-breadcrumb a:hover { color: var(--mematec-primary); }

/* Zweispaltiger Content */
.content-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Artikel-Inhalt */
.component-content .page-header h1,
.component-content h1 { margin-bottom: 0.8em; }

/* Sidebar-Module */
.mematec-sidebar .mematec-sidebar-module {
    background: var(--mematec-light);
    border-left: 4px solid var(--mematec-primary);
    padding: 24px;
    margin-bottom: 24px;
    border-radius: var(--mematec-radius);
}
.mematec-sidebar .module-title {
    color: var(--mematec-heading);
    font-size: 1.1rem;
}

/* =====================================================================
   USP / FEATURE-BOXEN
   ===================================================================== */
.mematec-usp {
    padding: 60px 0;
}
.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.usp-box {
    text-align: center;
    padding: 20px;
}
.usp-box i,
.usp-box .fa-solid {
    font-size: 2.6rem;
    color: var(--mematec-primary);
    margin-bottom: 16px;
}

/* =====================================================================
   CALL-TO-ACTION
   ===================================================================== */
.mematec-cta {
    background: var(--mematec-dark);
    color: var(--mematec-white);
    padding: 60px 0;
    text-align: center;
}
.mematec-cta h1, .mematec-cta h2, .mematec-cta h3,
.mematec-cta p { color: var(--mematec-white); }
.mematec-cta h2 { font-size: 1.9rem; margin-bottom: 0.9em; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn,
.button,
.mematec-cta a.btn,
.readmore a,
a.btn-primary {
    display: inline-block;
    background: var(--mematec-primary);
    color: var(--mematec-heading) !important;
    padding: 14px 34px;
    border: none;
    border-radius: var(--mematec-radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--mematec-transition);
    text-decoration: none;
}
.btn:hover, .button:hover, a.btn-primary:hover {
    background: var(--mematec-primary-dark);
    color: var(--mematec-heading) !important;
    transform: translateY(-2px);
}
/* Dunkler Button-Variant */
.btn-dark, a.btn-dark {
    background: var(--mematec-dark-btn);
    color: var(--mematec-white) !important;
}
.btn-dark:hover {
    background: #000;
    color: var(--mematec-white) !important;
}
/* CTA-Sektion Button hell auf dunkel */
.mematec-cta .btn { background: var(--mematec-primary); color: var(--mematec-heading) !important; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.mematec-footer {
    background: var(--mematec-dark);
    color: var(--mematec-gray);
    padding-top: 60px;
}
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}
.mematec-footer .footer-col h3,
.mematec-footer .footer-col .module-title {
    color: var(--mematec-white);
    font-size: 1.15rem;
    margin-bottom: 1em;
    position: relative;
    padding-bottom: 10px;
}
.mematec-footer .footer-col .module-title::after,
.mematec-footer .footer-col h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--mematec-primary);
}
.mematec-footer .footer-col,
.mematec-footer .footer-col p { color: var(--mematec-gray); }
.mematec-footer a { color: var(--mematec-gray); }
.mematec-footer a:hover { color: var(--mematec-primary); }
.mematec-footer ul { list-style: none; padding: 0; margin: 0; }
.mematec-footer ul li { padding: 6px 0; }

/* Footer-Bottom / Copyright */
.mematec-footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 18px 0;
    font-size: 0.85rem;
}
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom-inner,
.footer-copyright { color: var(--mematec-gray); }
.mematec-footer-bottom ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* =====================================================================
   BACK-TO-TOP
   ===================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--mematec-primary);
    color: var(--mematec-heading);
    border: none;
    border-radius: var(--mematec-radius);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--mematec-transition);
    z-index: 900;
    font-size: 1.1rem;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--mematec-primary-dark); transform: translateY(-3px); }

/* =====================================================================
   JOOMLA SYSTEM / HILFSKLASSEN
   ===================================================================== */
.system-message-container { margin: 20px 0; }
.alert { padding: 14px 18px; border-radius: var(--mematec-radius); margin-bottom: 16px; border: 1px solid transparent; }
.alert-message, .alert-info { background: #eef6fb; border-color: #bee0f0; color: #2b6a8c; }
.alert-success { background: #eaf7ea; border-color: #bfe3bf; color: #2e7d32; }
.alert-warning { background: #fff8e6; border-color: var(--mematec-primary); color: #7a5c00; }
.alert-error, .alert-danger { background: #fdecec; border-color: #f3b6b6; color: #b02a2a; }

.pagination { display: flex; gap: 6px; list-style: none; padding: 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-block; padding: 8px 14px; border: 1px solid var(--mematec-border);
    border-radius: var(--mematec-radius); color: var(--mematec-link);
}
.pagination .active span { background: var(--mematec-primary); color: var(--mematec-heading); border-color: var(--mematec-primary); }

blockquote {
    border-left: 4px solid var(--mematec-primary);
    margin: 1.5em 0;
    padding: 10px 24px;
    font-style: italic;
    color: var(--mematec-dark);
    background: var(--mematec-light);
}

hr { border: none; border-top: 1px solid var(--mematec-border); margin: 2em 0; }

.text-center { text-align: center; }
.text-primary { color: var(--mematec-primary); }
