/* ============================================================
   PROJECT: LawLug.com (site32-de)
   CSS ARCHITECTURE: SMACSS (Layout, Module, State)
   PALETTE: Legal/Trust (legal-navy, legal-cream, legal-gold, legal-charcoal, legal-slate, legal-parchment)
   EFFECT: Pattern Backgrounds (geometric subtle)
   TYPOGRAPHY: Classic Editorial (Merriweather + Source Sans Pro)
   BUTTON STYLE: 3D Effect
   HTML NAMESPACE: law-* (law-hero, law-card, etc.)
   ============================================================ */

:root {
    --legal-navy: #1a2744;
    --legal-cream: #f5f2eb;
    --legal-gold: #b8860b;
    --legal-charcoal: #2c2c2c;
    --legal-slate: #4a5568;
    --legal-parchment: #e8e4dc;
    --legal-text: #2c2c2c;
    --legal-muted: #5c5c5c;
    --legal-border: rgba(26, 39, 68, 0.12);
    --legal-shadow: rgba(26, 39, 68, 0.2);
    --header-height: 80px;
    font-size: clamp(15px, 1.05vw, 18px);
}

*, *::before, *::after {
    box-sizing: border-box;
    max-width: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100% !important;
    overflow-x: hidden !important;
    background: var(--legal-cream);
    color: var(--legal-text);
    font-family: 'Source Sans Pro', sans-serif;
    scroll-behavior: smooth;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Layout */
.layout-wrap {
    width: min(1140px, 92vw);
    margin: 0 auto;
}

.layout-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 242, 235, 0.97);
    border-bottom: 1px solid var(--legal-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem min(4vw, 2rem);
    height: var(--header-height);
}

.layout-header__brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.layout-header__home {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    color: var(--legal-navy);
}

.module-badge {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(46, 125, 50, 0.2);
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.module-burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--legal-border);
    border-radius: 8px;
    background: var(--legal-cream);
    color: var(--legal-navy);
    position: relative;
    cursor: pointer;
}

.module-burger span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--legal-navy);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.module-burger span:nth-child(1) { top: 14px; }
.module-burger span:nth-child(2) { top: 21px; }
.module-burger span:nth-child(3) { top: 28px; }

.module-burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.module-burger.is-open span:nth-child(2) {
    opacity: 0;
}

.module-burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.layout-nav {
    display: flex;
    align-items: center;
}

.layout-nav__list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.layout-nav__link {
    padding: 0.25rem 0;
    font-weight: 500;
    color: var(--legal-text);
    transition: color 0.2s ease;
}

.layout-nav__link:hover {
    color: var(--legal-gold);
}

main {
    padding-top: var(--header-height);
}

/* Pattern background */
.pattern-bg {
    background-color: var(--legal-cream);
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(26, 39, 68, 0.03) 40px, rgba(26, 39, 68, 0.03) 80px),
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(26, 39, 68, 0.03) 40px, rgba(26, 39, 68, 0.03) 80px);
}

.law-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(100px, 20vw, 180px) 0 clamp(70px, 14vw, 120px);
    background-color: var(--legal-parchment);
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(26, 39, 68, 0.03) 40px, rgba(26, 39, 68, 0.03) 80px),
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(26, 39, 68, 0.03) 40px, rgba(26, 39, 68, 0.03) 80px),
        linear-gradient(180deg, var(--legal-parchment) 0%, var(--legal-cream) 100%);
}

.law-hero__content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.law-hero__title {
    font-family: 'Merriweather', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--legal-navy);
    line-height: 1.2;
}

.law-hero__subtitle {
    color: var(--legal-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.law-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.law-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.module-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    margin-bottom: 1rem;
    color: var(--legal-navy);
}

.module-lead {
    margin: 0 0 2rem;
    color: var(--legal-muted);
    line-height: 1.7;
}

.module-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(184, 134, 11, 0.15);
    color: var(--legal-navy);
    font-size: 0.85rem;
}

.module-tag + .module-tag {
    margin-left: 0.5rem;
}

/* 3D Button */
.module-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 8px;
    border: none;
    background: var(--legal-gold);
    color: var(--legal-cream);
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
    box-shadow: 0 5px 0 #8b6914;
    transform: translateY(-1px);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: pointer;
}

.module-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 0 #8b6914;
}

.module-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #8b6914;
}

.module-btn--primary {
    background: var(--legal-navy);
    box-shadow: 0 5px 0 #0f1629;
}

.module-btn--primary:hover {
    box-shadow: 0 7px 0 #0f1629;
}

.module-btn--primary:active {
    box-shadow: 0 2px 0 #0f1629;
}

.module-btn--secondary {
    background: var(--legal-slate);
    box-shadow: 0 5px 0 #2d3748;
}

.module-btn--secondary:hover {
    box-shadow: 0 7px 0 #2d3748;
}

.module-btn:focus-visible {
    outline: 2px solid var(--legal-gold);
    outline-offset: 2px;
}

/* Age gate & Cookie (Module) */
.module-age {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 39, 68, 0.85);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.module-age.state-visible {
    opacity: 1;
    visibility: visible;
}

.module-age__window {
    background: var(--legal-cream);
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid var(--legal-border);
}

.module-age__header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--legal-border);
}

.module-age__title {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    margin: 0;
    color: var(--legal-navy);
}

.module-age__content {
    padding: 1.5rem;
}

.module-age__content p {
    margin: 0 0 0.8rem;
    color: var(--legal-text);
    line-height: 1.6;
}

.module-age__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.module-age__notice {
    font-size: 0.9rem;
    color: var(--legal-muted);
    margin-top: 1rem !important;
}

.module-cookie {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: var(--legal-navy);
    color: var(--legal-cream);
    padding: 1rem min(4vw, 2rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.module-cookie.state-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.module-cookie p {
    margin: 0;
    flex: 1 1 280px;
}

.module-cookie a {
    color: var(--legal-gold);
    text-decoration: underline;
}

.module-cookie__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Benefits */
.law-benefits {
    padding: clamp(60px, 12vw, 100px) 0;
    background: var(--legal-cream);
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(26, 39, 68, 0.02) 35px, rgba(26, 39, 68, 0.02) 70px);
}

.law-benefits__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.module-benefit-card {
    flex: 1 1 clamp(260px, 30vw, 320px);
    padding: 1.8rem;
    background: var(--legal-cream);
    border-radius: 16px;
    border: 1px solid var(--legal-border);
    box-shadow: 0 12px 28px var(--legal-shadow);
}

.module-benefit-card__title {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--legal-navy);
}

.module-benefit-card p {
    color: var(--legal-muted);
    line-height: 1.7;
    margin: 0;
}

/* Games grid */
.law-games {
    padding: clamp(70px, 14vw, 120px) 0;
    background: var(--legal-cream);
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(26, 39, 68, 0.02) 50px, rgba(26, 39, 68, 0.02) 100px);
}

.law-games__grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: clamp(1.2rem, 2.5vw, 2rem);
    flex-wrap: wrap;
}

.module-game-card {
    flex: 0 0 auto;
    width: clamp(280px, 28vw, 340px);
    background: var(--legal-cream);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--legal-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 16px 40px var(--legal-shadow);
}

.module-game-card__thumb {
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--legal-border);
    background: var(--legal-parchment);
}

.module-game-card__body {
    text-align: center;
}

.module-game-card__title {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    color: var(--legal-navy);
}

.module-game-card__text {
    color: var(--legal-muted);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.module-game-card__meta {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.module-game-card .module-btn {
    margin-top: auto;
}

/* FAQ */
.law-faq {
    padding: clamp(60px, 12vw, 100px) 0;
    background: var(--legal-parchment);
}

.law-faq__item {
    margin-bottom: 0.8rem;
    border: 1px solid var(--legal-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--legal-cream);
}

.law-faq__item summary {
    padding: 1rem 1.2rem;
    font-weight: 600;
    color: var(--legal-navy);
    cursor: pointer;
    list-style: none;
}

.law-faq__item summary::-webkit-details-marker {
    display: none;
}

.law-faq__item p {
    padding: 0 1.2rem 1rem;
    margin: 0;
    color: var(--legal-muted);
    line-height: 1.7;
}

/* Disclaimer */
.law-disclaimer {
    padding: clamp(60px, 12vw, 100px) 0;
    background: linear-gradient(180deg, var(--legal-parchment) 0%, rgba(232, 228, 220, 0.8) 100%);
    border-top: 1px solid var(--legal-border);
}

.law-disclaimer__title {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--legal-navy);
}

.law-disclaimer p {
    color: var(--legal-text);
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.law-disclaimer a {
    color: var(--legal-gold);
}

.law-disclaimer a:hover {
    text-decoration: underline;
}

.law-disclaimer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Footer */
.law-footer {
    background: var(--legal-navy);
    color: var(--legal-cream);
    padding: 2.5rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.law-footer .layout-wrap {
    padding-left: min(2vw, 1rem);
    padding-right: min(2vw, 1rem);
}

.law-footer__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3.5rem;
    margin-bottom: 2rem;
}

.law-footer__section {
    flex: 0 1 200px;
}

.law-footer__heading {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--legal-cream);
}

.law-footer__link {
    display: block;
    padding: 0.2rem 0;
    color: rgba(245, 242, 235, 0.85);
    transition: color 0.2s ease;
}

.law-footer__link:hover {
    color: var(--legal-gold);
}

.law-footer__section p {
    margin: 0.25rem 0;
    color: rgba(245, 242, 235, 0.9);
    font-size: 0.95rem;
}

.law-footer__logos-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.law-footer__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.law-footer__logo {
    height: 40px;
    background: var(--legal-cream);
    padding: 6px 10px;
    border-radius: 8px;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.law-footer__logo:hover {
    opacity: 1;
}

.law-footer__age {
    height: 36px;
    opacity: 0.9;
}

.law-footer__legal {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(245, 242, 235, 0.8);
    margin-top: 1.5rem;
}

/* Page layout */
.law-page .law-hero {
    padding: clamp(80px, 16vw, 140px) 0 clamp(50px, 10vw, 80px);
}

/* Blog/Reviews/Guides listing */
.law-cards {
    padding: clamp(50px, 10vw, 80px) 0;
}

.law-cards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.module-article-card {
    background: var(--legal-cream);
    border: 1px solid var(--legal-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--legal-shadow);
    display: flex;
    flex-direction: column;
}

.module-article-card__thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    background: var(--legal-parchment);
}

.module-article-card__body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.module-article-card__title {
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    color: var(--legal-navy);
    line-height: 1.3;
}

.module-article-card__title a:hover {
    color: var(--legal-gold);
}

.module-article-card__meta {
    font-size: 0.85rem;
    color: var(--legal-muted);
    margin-bottom: 0.6rem;
}

.module-article-card__text {
    color: var(--legal-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0 0 1rem;
    flex: 1;
}

/* Account tabs */
.layout-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--legal-border);
    margin-bottom: 1.5rem;
}

.layout-tabs__tab {
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    color: var(--legal-slate);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.layout-tabs__tab.state-active {
    color: var(--legal-navy);
    border-bottom-color: var(--legal-gold);
}

.module-panel {
    display: none;
    padding: 1rem 0;
}

.module-panel.state-visible {
    display: block;
}

.module-panel label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--legal-charcoal);
}

.module-panel input,
.module-panel textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--legal-border);
    border-radius: 8px;
    font-family: inherit;
}

/* Account block: center forms on screen */
.law-account-block .module-title,
.law-account-block .module-lead {
    text-align: center;
}
.law-account-block .layout-tabs {
    justify-content: center;
}
.law-account-block .module-panel form,
.law-account-block .module-panel > p {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.law-account-block .module-panel input,
.law-account-block .module-panel textarea {
    max-width: 100%;
}

.form-status {
    margin-top: 0.5rem;
    color: var(--legal-slate);
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-status.state-visible {
    opacity: 1;
}

/* Article/Guide/Review content */
.law-content {
    padding: 1.5rem 0 3rem;
}

.law-content h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    margin: 2rem 0 0.8rem;
    color: var(--legal-navy);
}

.law-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--legal-charcoal);
}

.law-content p {
    margin: 0 0 1rem;
    line-height: 1.75;
    color: var(--legal-text);
}

.law-content ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    line-height: 1.7;
}

/* Mobile */
@media (max-width: 960px) {
    .module-burger {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .layout-nav {
        position: fixed;
        top: calc(var(--header-height) - 1px);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--legal-cream);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 2rem;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .layout-nav.state-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .layout-nav__list {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .layout-nav__link {
        display: block;
        padding: 0.8rem 1rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .law-footer__grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .law-footer__section {
        flex: 1 1 auto;
    }
}
