/**
 * @package GO Medical Rechner Framework
 * @version 2.0 (Clean-HTML Edition)
 * Logic: Targeting the article container directly to allow free-standing readmore tags.
 */

:root {
    --gm-major-color: #38b2e4;
    --gm-bg-deep: #020617;
    --gm-text-body: #e2e8f0;
    --gm-border-alpha: rgba(56, 178, 228, 0.2);
}

/* --- AUTO-WRAPPER LOGIC --- */
/* Findet den Joomla-Artikel, der einen Rechner-Header enthält und wendet das Design an */
article.item-page:has(.formula-header),
article.article-details:has(.formula-header),
.article-list .article:has(.formula-header) {
    background-color: var(--gm-bg-deep) !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.25) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 1) 0px, transparent 50%) !important;
    padding: 40px !important;
    border-radius: 24px;
    color: var(--gm-text-body);
    margin-bottom: 40px;
    border: 1px solid var(--gm-border-alpha);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* --- TYPOGRAPHY --- */
.formula-header {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff, var(--gm-major-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gm-text-body);
    max-width: 750px;
}

/* --- MODULE WRAPPER --- */
.rechner-module-wrap {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--gm-border-alpha);
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
}

/* --- INTERPRETATION BOX --- */
.interpretation-box {
    margin-top: 40px;
    background: rgba(56, 178, 228, 0.05);
    border-left: 4px solid var(--gm-major-color);
    padding: 25px;
    border-radius: 0 12px 12px 0;
}

/* --- BIBLIOGRAPHY --- */
.bibliography {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--gm-border-alpha);
}

.bib-list {
    list-style: none;
    padding: 0;
}

.bib-link {
    color: var(--gm-major-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.bib-link:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--gm-major-color);
}

/* --- CLEANUP FOR HELIX/JOOMLA --- */
/* Versteckt Standard-Elemente des Templates innerhalb der Rechner-Ansicht */
article:has(.formula-header) .entry-header,
article:has(.formula-header) .article-info,
article:has(.formula-header) .icons {
    display: none !important;
}

/* Fix für den Weiterlesen-Abstand */
hr#system-readmore {
    display: none; /* Versteckt die physische Linie in der Vollansicht */
}

/* Responsive Anpassung */
@media (max-width: 768px) {
    article:has(.formula-header) {
        padding: 20px !important;
    }
    .formula-header {
        font-size: 22px;
    }
}