/* ==========================================================================
   SR History - Joomla 5 Template
   Historical site template with dark header and Courier New font
   ========================================================================== */

/* ---------- Reset & Base ---------- */

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

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #1a0a0a;
}

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

a {
    color: #8b0000;
    text-decoration: underline;
}

a:hover {
    color: #cc0000;
}

/* ---------- Header ---------- */

.site-header {
    position: relative;
    background: #1a0000 url('../images/header.png') repeat-x center bottom;
    background-size: auto 100%;
    min-height: 180px;
    padding: 25px 20px 30px;
    text-align: left;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 0, 0, 0.7) 0%, rgba(80, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.header-inner {
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

.site-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(1.4rem, 5vw, 3.8rem);
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.site-title .title-prefix {
    display: block;
    font-size: clamp(0.65rem, 1.1vw, 1rem);
    font-weight: normal;
    letter-spacing: 5px;
    margin-bottom: 2px;
    line-height: 1.4;
}

.site-subtitle {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(0.85rem, 1.6vw, 1.35rem);
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: -4px;
    text-align: right;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.site-slogan {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(0.7rem, 1.1vw, 1rem);
    color: #e8c8c8;
    font-style: italic;
    text-align: right;
    margin-top: 2px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* ---------- Navigation ---------- */

.site-navigation {
    background: rgba(50, 50, 50, 0.85);
    border-top: 1px solid #555;
    border-bottom: 1px solid #555;
    text-align: center;
    padding: 0;
}

.site-navigation .nav,
.site-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.site-navigation li {
    position: relative;
    display: flex;
    align-items: center;
}

.site-navigation li + li::before {
    content: '|';
    color: #999;
}

.site-navigation a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: color 0.2s;
}

.site-navigation a:hover,
.site-navigation .active > a,
.site-navigation .current > a {
    color: #ff9999;
}

/* Dropdown submenu */
.site-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(50, 50, 50, 0.95);
    min-width: 200px;
    flex-direction: column;
    z-index: 100;
    border: 1px solid #555;
}

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

.site-navigation ul ul li + li::before {
    content: none;
}

.site-navigation ul ul a {
    padding: 8px 20px;
    text-transform: none;
    font-size: 0.85rem;
    border-bottom: 1px solid #444;
    width: 100%;
}

/* ---------- Container ---------- */

.container-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ---------- Content Wrapper ---------- */

.content-wrapper {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.content-area {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #999;
    padding: 20px 25px;
}

.content-wrapper.has-sidebar .content-area {
    flex: 1;
}

.sidebar-right {
    width: 240px;
    flex-shrink: 0;
}

.sidebar-right .moduletable {
    background: #fff;
    border: 1px solid #999;
    padding: 15px;
    margin-bottom: 15px;
}

/* ---------- Article Styling ---------- */

.content-area h1,
.content-area h2 {
    font-family: 'Courier New', Courier, monospace;
    color: #1a1a1a;
    margin-top: 0;
    line-height: 1.3;
}

.content-area h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.content-area .item-image {
    float: left;
    margin: 5px 15px 10px 0;
    max-width: 200px;
}

.content-area .item-image img {
    border: 1px solid #aaa;
}

.content-area p {
    text-align: justify;
    margin: 0 0 12px;
}

/* Joomla article info (date, author, etc) */
.content-area .article-info,
.content-area .category-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

/* Edit icons */
.content-area .icons {
    float: right;
}

/* Pagination */
.content-area .pagination {
    text-align: center;
    margin-top: 20px;
}

.content-area .pagination li {
    display: inline-block;
    margin: 0 3px;
}

.content-area .pagination a {
    padding: 4px 10px;
    border: 1px solid #999;
    color: #333;
    text-decoration: none;
}

.content-area .pagination a:hover,
.content-area .pagination .active a {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
}

/* ---------- Top / Bottom Rows ---------- */

.top-row,
.bottom-row {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.top-col,
.bottom-col {
    flex: 1;
    background: #fff;
    border: 1px solid #999;
    padding: 15px;
}

/* ---------- User Rows ---------- */

.user-row {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.user-col {
    flex: 1;
}

/* ---------- Banner Modules ---------- */

.module-banner {
    max-width: 960px;
    margin: 10px auto;
    padding: 0 10px;
    text-align: center;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb-row {
    padding: 8px 0;
    font-size: 0.85rem;
    color: #666;
}

.breadcrumb-row .breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb-row .breadcrumb li + li::before {
    content: ' / ';
    padding: 0 6px;
    color: #999;
}

.breadcrumb-row .breadcrumb a {
    color: #8b0000;
    text-decoration: none;
}

/* ---------- Footer ---------- */

.site-footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 10px 30px;
    text-align: center;
}

.footer-separator {
    border-top: 2px solid #cc0000;
    margin: 20px 0 15px;
}

.footer-copyright {
    color: #ccc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.footer-copyright p {
    margin: 5px 0;
}

.footer-copyright .copy-notice {
    font-size: 0.8rem;
    color: #999;
}

.footer-modules {
    margin: 10px 0;
    color: #ccc;
}

/* ---------- System Messages ---------- */

#system-message-container {
    margin-bottom: 15px;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-danger,
.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ---------- Clearfix ---------- */

.content-area::after {
    content: '';
    display: table;
    clear: both;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .site-subtitle {
        text-align: left;
    }

    .site-slogan {
        text-align: left;
    }

    .site-header {
        min-height: 120px;
        padding: 15px 10px;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar-right {
        width: 100%;
    }

    .top-row,
    .bottom-row {
        flex-direction: column;
    }

    .user-row {
        flex-direction: column;
    }

    .site-navigation a {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .content-area .item-image {
        float: none;
        max-width: 100%;
        margin: 0 0 15px;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 12px 15px;
    }
}
