/* ==========================================================================
   Hazmat.dk Template - Joomla 6
   Based on jsn_mini2_pro layout
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap");

/* ---------- CSS Custom Properties ---------- */
:root {
    --hazmat-accent: #dbb03f;
    --hazmat-primary: #FF9C00;
    --hazmat-secondary: #261C15;
    --hazmat-text: #333333;
    --hazmat-text-light: #666666;
    --hazmat-heading: #333333;
    --hazmat-border: #e5e5e5;
    --hazmat-bg: #ffffff;
    --hazmat-bg-light: #f8f9fa;
    --hazmat-bg-dark: #1f2f41;
    --hazmat-link: #dbb03f;
    --hazmat-link-hover: #c49a2e;
    --hazmat-footer-bg: #2c3e50;
    --hazmat-footer-text: #bdc3c7;
    --hazmat-font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--hazmat-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--hazmat-text);
    background-color: var(--hazmat-bg);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

a {
    color: var(--hazmat-link);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

a:hover,
a:focus {
    color: var(--hazmat-link-hover);
    text-decoration: underline;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--hazmat-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 { font-size: 33px; }
h2 { font-size: 28px; }
h3 { font-size: 23px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    margin-bottom: 1em;
}

/* ---------- Forms ---------- */
label {
    font-weight: normal;
}

label span.star {
    color: #F95050;
}

select,
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"] {
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    background-color: #fff;
    background-image: none;
    border: solid 1px var(--hazmat-border);
    border-radius: 100px;
    transition: border-color ease-in-out 0.15s;
    outline: 0;
    box-shadow: none;
    font-family: var(--hazmat-font);
    font-size: 14px;
}

select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
    border-color: var(--hazmat-accent);
    box-shadow: 0 0 0 0.2rem rgba(219, 176, 63, 0.15);
}

textarea {
    height: auto;
    line-height: 1.6;
    border-radius: 10px;
    padding: 10px 20px;
}

/* ---------- Buttons ---------- */
.btn {
    padding: 9.5px 25px;
    line-height: 1.5;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease-in-out;
}

.btn-primary,
.readmore a.btn {
    background-color: var(--hazmat-accent);
    border-color: var(--hazmat-accent);
    color: #fff;
}

.btn-primary:hover,
.readmore a.btn:hover {
    background-color: var(--hazmat-link-hover);
    border-color: var(--hazmat-link-hover);
    color: #fff;
}

/* ---------- Topbar ---------- */
.topbar {
    background-color: var(--hazmat-bg-dark);
    color: #fff;
    font-size: 12px;
    padding: 5px 0;
}

.topbar a {
    color: rgba(255, 255, 255, 0.8);
}

.topbar a:hover {
    color: #fff;
    text-decoration: none;
}

/* ---------- Header ---------- */
.site-header {
    background-color: var(--hazmat-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1030;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.site-header .container {
    position: relative;
}

.site-logo a {
    display: inline-block;
}

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

.site-logo .site-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--hazmat-heading);
}

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

/* ---------- Navigation ---------- */
.site-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    display: block;
    padding: 12px 18px;
    color: var(--hazmat-text);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.active > a,
.main-navigation ul li.current > a {
    color: var(--hazmat-accent);
    text-decoration: none;
}

/* Dropdown */
.main-navigation ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1050;
    flex-direction: column;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

.main-navigation ul li ul li a {
    padding: 8px 20px;
    font-size: 13px;
    text-transform: none;
    font-weight: 400;
}

.main-navigation ul li ul li a:hover {
    background-color: var(--hazmat-bg-light);
}

/* Sub-sub dropdown */
.main-navigation ul li ul li ul {
    top: 0;
    left: 100%;
}

/* Mobile toggle */
.navbar-toggler {
    background: none;
    border: 1px solid var(--hazmat-border);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 20px;
    color: var(--hazmat-text);
    cursor: pointer;
}

.navbar-toggler:hover {
    border-color: var(--hazmat-accent);
    color: var(--hazmat-accent);
}

/* Offcanvas mobile menu */
.offcanvas {
    max-width: 300px;
}

.offcanvas .offcanvas-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas .offcanvas-body ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--hazmat-text);
    font-weight: 600;
    border-bottom: 1px solid var(--hazmat-border);
}

.offcanvas .offcanvas-body ul li a:hover {
    color: var(--hazmat-accent);
    text-decoration: none;
    background-color: var(--hazmat-bg-light);
}

/* ---------- Promo / Slider ---------- */
.promo-section {
    position: relative;
}

.promo-section .container {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs-section {
    padding: 25px 0;
    border-bottom: 1px solid var(--hazmat-border);
    margin-bottom: 25px;
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.breadcrumb li a {
    color: var(--hazmat-text-light);
}

.breadcrumb li a:hover {
    color: var(--hazmat-accent);
}

.breadcrumb li + li::before {
    content: "/";
    color: #394a5c;
    padding: 0 8px;
}

/* ---------- Content Sections ---------- */
.content-top-section,
.content-top-below-section {
    padding: 20px 0;
}

.main-content-section {
    padding: 30px 0 60px;
    min-height: 400px;
}

.content-bottom-section,
.content-bottom-below-section {
    padding: 30px 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
    padding-bottom: 80px;
}

.sidebar .card {
    margin-bottom: 20px;
}

.sidebar-left .card {
    background-color: #2b2b2b;
    color: #c0c0c0;
    border-radius: 6px;
    padding: 20px;
}

.sidebar-left .card .card-header {
    border-bottom: none;
}

.sidebar-left .card .card-header h3,
.sidebar-left .card .card-header .module-title {
    color: var(--hazmat-accent);
    font-size: 16px;
}

.sidebar-left .card .card-body {
    color: #c0c0c0;
    font-size: 22px;
}

/* ---------- Module Card Style ---------- */
.card {
    border: none;
    margin-bottom: 20px;
}

.card .card-header {
    background: transparent;
    border-bottom: 2px solid var(--hazmat-accent);
    padding: 10px 0;
}

.card .card-header h3,
.card .card-header .module-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--hazmat-heading);
}

.card .card-body {
    padding: 15px 0;
}

/* ---------- Joomla Component Styles ---------- */
.item-page .page-header h2,
.blog .page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hazmat-accent);
}

.readmore {
    margin-top: 15px;
}

.readmore a {
    display: inline-block;
}

/* Pagination */
.pagination {
    margin: 30px 0;
    justify-content: center;
}

.pagination .page-link {
    font-size: 16px;
    font-weight: 500;
    border: none;
    padding: 8px 12px;
    color: var(--hazmat-accent);
    background: transparent;
}

.pagination .page-item.active .page-link {
    background-color: var(--hazmat-accent);
    color: #fff;
    border-radius: 4px;
}

.pagination .page-link:hover {
    background-color: var(--hazmat-bg-light);
    color: var(--hazmat-link-hover);
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: #eff3f6;
    color: #8f99a0;
}

.footer-top {
    padding: 50px 0 40px;
}

.footer-top h3,
.footer-top h4,
.footer-top .module-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-top a {
    color: var(--hazmat-footer-text);
}

.footer-top a:hover {
    color: var(--hazmat-accent);
    text-decoration: none;
}

.footer-top p {
    font-size: 13px;
    line-height: 1.8;
}

.footer-top ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-top ul li {
    margin-bottom: 8px;
}

.footer-top ul li a {
    font-size: 13px;
}

.footer-top img {
    max-width: 200px;
}

.footer-bottom {
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    text-align: center;
}

.footer-bottom a {
    color: var(--hazmat-accent);
}

/* ---------- Joomla System Messages ---------- */
#system-message-container {
    margin-bottom: 20px;
}

.alert {
    border-radius: 4px;
    padding: 12px 20px;
}

/* ---------- Module Styles (for jdoc style="card") ---------- */
.mod-wrapper {
    margin-bottom: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .site-header {
        padding: 8px 0;
    }

    .site-logo .logo-img {
        max-height: 45px;
    }

    .main-content-section {
        padding: 20px 0 40px;
    }

    .sidebar {
        padding-bottom: 30px;
        margin-top: 30px;
    }

    .footer-top {
        padding: 30px 0;
    }

    .footer-top .col-12 {
        margin-bottom: 20px;
    }
}

@media (max-width: 767.98px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }

    body {
        font-size: 13px;
    }

    .main-navigation ul li a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .site-logo .logo-img {
        max-height: 40px;
    }

    .footer-top .row > div {
        margin-bottom: 25px;
    }
}

/* ---------- Print ---------- */
@media print {
    .site-header,
    .topbar,
    .site-footer,
    .sidebar,
    .breadcrumbs-section,
    .promo-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
