/* ==========================================================================
   Radical Mind Daily — Main Stylesheet
   LGBTQ+-radical palette: Rose Red, Black, Electric Purple
   ========================================================================== */

:root {
    --blue: #E11D48;
    --blue-dark: #9F1239;
    --navy: #18181B;
    --navy-dark: #09090B;
    --navy-light: #3F3F46;
    --white: #FFFFFF;
    --teal: #A855F7;
    --teal-light: #C084FC;
    --light-gray: #FFF1F2;
    --medium-gray: #E4E4E7;
    --dark-text: #18181B;
    --muted-text: #71717A;
    --body-bg: #FFFBFC;
    --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--body-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

h1, h2, h3, h4, .section-heading, .site-logo, .hero-title, .article-title, .footer-brand {
    font-family: var(--font-heading);
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--blue);
}

/* Site Header — light, compact, with subtle color */
.site-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-bottom: 3px solid var(--teal);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.site-header::after {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--teal) 50%, var(--teal-light) 100%);
}

.site-header .container {
    padding-top: 0.6rem;
    padding-bottom: 0.5rem;
}

.header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white) !important;
    text-decoration: none;
}

.site-logo:hover {
    color: var(--teal-light) !important;
}

.site-logo-img {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    vertical-align: middle;
    background: linear-gradient(135deg, #E40303 0%, #FF8C00 17%, #FFED00 33%, #008026 50%, #24408E 67%, #732982 83%, #E40303 100%);
    -webkit-mask-image: url('../images/brain-mask.png');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url('../images/brain-mask.png');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.85rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
}

.header-tagline { font-style: italic; }
.header-date { font-weight: 500; }

.site-nav {
    padding-top: 0.45rem;
    padding-bottom: 0;
}

.site-nav .navbar-collapse {
    justify-content: flex-start;
}

.site-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    padding: 0.35rem 0.5rem;
}

.site-nav .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.site-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem !important;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
}

.site-nav .nav-link:hover {
    color: var(--teal-light) !important;
    background-color: rgba(255, 255, 255, 0.12);
}

.site-nav .nav-link.active {
    color: var(--navy) !important;
    background-color: var(--teal-light);
}

.site-nav .nav-link.active:hover {
    color: var(--navy) !important;
    background-color: var(--white);
}

/* Breaking News Strip (slim ticker under header) */
.breaking-strip {
    background: var(--teal);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
}

.breaking-badge {
    background-color: var(--blue);
    color: var(--white);
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 10px;
    display: inline-block;
}

.breaking-strip a {
    color: var(--white);
    font-weight: 600;
}

.breaking-strip a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Hero Section — image + content side by side, one card */
.hero-section {
    margin-bottom: 2rem;
}

.hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hero-image-wrap {
    flex: 0 0 42%;
    min-width: 0;
    display: block;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.hero-content {
    flex: 1 1 58%;
    min-width: 0;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-category {
    display: inline-block;
    background-color: var(--blue);
    color: var(--white);
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.hero-title a { color: inherit; }
.hero-title a:hover { color: var(--blue); }

.hero-meta {
    color: var(--muted-text);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.hero-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Article Cards */
.article-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.article-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-category {
    display: inline-block;
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.article-card-title a { color: inherit; }
.article-card-title a:hover { color: var(--blue); }

.article-card-excerpt {
    color: #666;
    font-size: 0.9rem;
    flex: 1;
}

.article-card-meta {
    color: var(--muted-text);
    font-size: 0.8rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--medium-gray);
}

/* Featured Grid (lead + 3) */
.featured-grid-lead-three .featured-lead .article-card {
    height: 100%;
}

.featured-grid-lead-three .featured-lead .article-card-img {
    height: 260px;
}

.featured-grid-lead-three .featured-lead .article-card-title {
    font-size: 1.25rem;
}

.featured-grid-lead-three .featured-lead .article-card-excerpt {
    font-size: 0.95rem;
}

.featured-grid .article-card-img {
    height: 180px;
}

.featured-grid-lead-three .col-lg-2 .article-card-img {
    height: 160px;
}

/* Section Headings */
.section-heading {
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--navy);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--blue);
    letter-spacing: 0.5px;
}

/* Category Block */
.category-block {
    margin-bottom: 2.5rem;
}

.category-block .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-block .view-all {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    color: var(--blue);
}

/* Category block — list layout (horizontal rows) */
.category-block-list .article-list-item {
    margin-bottom: 1rem;
}

.category-block-list .article-list-item:last-child {
    margin-bottom: 0;
}

/* Category block — lead-two layout (one large + two small) */
.category-block-lead-two .category-block-lead .article-card-img {
    height: 240px;
}

.category-block-lead-two .category-block-lead .article-card-title {
    font-size: 1.2rem;
}

.category-block-secondary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-block-lead-two .category-block-secondary .article-card-img {
    height: 140px;
}

.category-block-lead-two .category-block-secondary .article-card-title {
    font-size: 1rem;
}

.category-block-lead-two .category-block-secondary .article-card-excerpt {
    font-size: 0.85rem;
}

/* Main content + Sidebar (section treatment) */
.content-main-row .section-heading {
    margin-bottom: 1.25rem;
}

.content-sidebar {
    border-left: 1px solid var(--medium-gray);
    padding-left: 1.5rem;
}

.content-sidebar-left {
    border-left: none;
    border-right: 1px solid var(--medium-gray);
    padding-left: 0;
    padding-right: 1.5rem;
}

/* Latest news — card grid */
.latest-grid .article-card-img {
    height: 180px;
}

@media (max-width: 991.98px) {
    .content-sidebar {
        border-left: none;
        border-right: none;
        padding-left: 0;
        padding-right: 0;
        padding-top: 1rem;
        border-top: 1px solid var(--medium-gray);
        margin-top: 1.5rem;
    }
}

/* Trending Widget */
.trending-widget {
    background: var(--white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.trending-widget .section-heading {
    font-size: 1.1rem;
}

.trending-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--medium-gray);
}

.trending-item:last-child { border-bottom: none; }

.trending-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue);
    min-width: 35px;
    line-height: 1;
    margin-right: 0.75rem;
}

.trending-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
    line-height: 1.3;
}

.trending-title a { color: inherit; }
.trending-title a:hover { color: var(--blue); }

.trending-meta {
    font-size: 0.75rem;
    color: var(--muted-text);
    margin-top: 2px;
}

/* Article Page */
.article-header { margin-bottom: 2rem; }

.article-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted-text);
    font-size: 0.9rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-gray);
    margin-bottom: 2rem;
}

.article-meta-bar i { color: var(--blue); }

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2,
.article-content h3 {
    color: var(--navy);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.article-content blockquote {
    border-left: 4px solid var(--blue);
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    margin: 1.5rem 0;
    font-style: italic;
}

.article-content a { color: var(--blue); text-decoration: underline; }

/* Badge styles */
.badge-featured {
    background-color: var(--teal);
    color: var(--white);
}

.badge-breaking {
    background-color: var(--blue);
    color: var(--white);
}

.badge-category {
    background-color: var(--navy);
    color: var(--white);
}

/* Category Page */
.category-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.category-header h1 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Gallery */
.gallery-grid .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-grid .gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    padding: 2rem 1rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Lightbox — move close button to top-right of viewport */
.lb-close {
    position: fixed !important;
    top: 16px;
    right: 16px;
    width: 40px !important;
    height: 40px !important;
    opacity: 0.9 !important;
    z-index: 10003;
    background-size: contain !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}
.lb-close:hover {
    opacity: 1 !important;
}

/* Lightbox — Back to Gallery button */
.gallery-back-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10003;
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s, border-color 0.2s;
}
.gallery-back-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
}
.gallery-back-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .gallery-back-btn {
        padding: 12px 20px;
        font-size: 1rem;
        top: 12px;
        left: 12px;
    }
}

/* Contact Form */
.contact-form {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Legal / Static Pages */
.static-page {
    background: var(--white);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.static-page h1 {
    color: var(--navy);
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--blue);
}

/* Pagination */
.pagination .page-link {
    color: var(--navy);
    border-color: var(--medium-gray);
}

.pagination .page-item.active .page-link {
    background-color: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.pagination .page-link:hover {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* Footer — light, with subtle color and gradient accents */
.site-footer {
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
    border-top: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal-light) 0%, var(--teal) 50%, var(--blue) 100%);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-brand-block {
    flex: 1 1 280px;
    max-width: 360px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white) !important;
    text-decoration: none;
    margin-bottom: 0.35rem;
}

.footer-brand:hover {
    color: var(--teal-light) !important;
}

.footer-logo-img {
    display: inline-block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    vertical-align: middle;
    background: linear-gradient(135deg, #E40303 0%, #FF8C00 17%, #FFED00 33%, #008026 50%, #24408E 67%, #732982 83%, #E40303 100%);
    -webkit-mask-image: url('../images/brain-mask.png');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url('../images/brain-mask.png');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.footer-tagline {
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.5rem 0;
}

.footer-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 2.5rem;
}

.footer-nav-group {
    min-width: 120px;
}

.footer-heading {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--teal-light);
    margin-bottom: 0.75rem;
}

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

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--teal-light);
}

.footer-links a:focus-visible {
    outline: 2px solid var(--teal-light);
    outline-offset: 2px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1.25rem;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal-light);
    margin: 0;
}

/* Utility */
.text-navy { color: var(--navy); }
.text-blue { color: var(--blue); }
.bg-navy { background-color: var(--navy); }
.bg-blue { background-color: var(--blue); }

/* Article list (horizontal card) */
.article-list-item {
    display: flex;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.article-list-img {
    width: 200px;
    min-height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-list-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-list-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.article-list-title a { color: var(--dark-text); }
.article-list-title a:hover { color: var(--blue); }

/* Related articles sidebar */
.related-articles .article-card-img {
    height: 140px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .header-top .site-logo { font-size: 1.2rem; }
    .header-meta { font-size: 0.75rem; }
}

@media (max-width: 768px) {
    .hero-inner { flex-direction: column; }
    .hero-image-wrap { flex: none; width: 100%; }
    .hero-image { min-height: 200px; height: 200px; }
    .hero-content { padding: 1.25rem 1.5rem; }
    .hero-title { font-size: 1.35rem; }
    .article-title { font-size: 1.6rem; }

    .article-list-item { flex-direction: column; }
    .article-list-img { width: 100%; height: 180px; }

    .latest-grid .article-card-img { height: 200px; }

    .featured-grid-lead-three .featured-lead .article-card-img { height: 220px; }

    .header-top .site-logo { font-size: 1.1rem; }
    .site-nav .nav-link {
        font-size: 0.88rem;
        padding: 0.4rem 0.65rem !important;
    }

}

@media (max-width: 576px) {
    .hero-image { min-height: 160px; height: 160px; }
    .hero-content { padding: 1rem 1.25rem; }
    .breaking-strip { font-size: 0.85rem; padding: 6px 0; }
    .breaking-badge { font-size: 0.65rem; padding: 2px 8px; }
}
