/* ============================================
   UNCUFFED MV - Responsive Stylesheet
   Mobile-First Responsive Design
   WITH IMPROVED BACKGROUNDS & READABILITY
   ============================================ */

/* CSS Reset - from original theme
   -------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

/* Box sizing for easier responsive layouts */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Base Styles
   ------------ */
html {
    height: 100%;
    font-size: 16px; /* Base font size for rem units */
}

body {
    line-height: 1.6;
    color: #E5E5E5; /* Improved from #CCCCCC for better readability */
    /* IMPROVED: CSS-only background with texture and gradient */
    background:
        /* Subtle noise texture using SVG */
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="200" height="200" filter="url(%23noise)" opacity="0.05"/></svg>'),
        /* Dark radial gradient for vignette effect */
        radial-gradient(ellipse at center, #1a1a1a 0%, #0d0d0d 100%);
    background-attachment: fixed;
    font-family: 'Verdana', Arial, sans-serif;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

/* Typography
   ----------- */
h1, h2, h3, h4, h5, h6 {
    color: #F0F0F0; /* Brighter for better contrast */
    margin-bottom: 0.625rem;
    font-weight: normal;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Subtle shadow for readability */
}

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.25em; }
h4 { font-size: 1.1em; }
h5 { font-size: 1em; }

p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); /* Subtle shadow for readability */
}

/* Links */
a {
    color: #ff3333; /* Slightly brighter red for better visibility */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: #cc0000;
}

a:hover, a:focus {
    color: #ff5555;
    text-decoration: underline;
}

/* Lists */
ol, ul {
    list-style: none;
}

/* Utilities
   ---------- */
.clear {
    clear: both;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container & Layout - Mobile First
   ---------------------------------- */
#page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    position: relative;
    /* IMPROVED: CSS-only shadow effect using box-shadow on pseudo-element */
}

#page::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Header - Mobile First with Horizontal Layout
   ----------------------------------------------- */
#header {
    padding: 0;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.9);
    min-height: 60px;
}

#logo-block {
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

#logo-block img {
    max-width: 200px; /* Increased from 150px for better mobile visibility */
    height: auto;
    display: block;
}

#header-right {
    display: none; /* Empty now, hide it */
}

/* Navigation - Mobile First (Hamburger Menu)
   ------------------------------------------- */
#sidebar {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1000;
}

/* Mobile Menu Toggle Button - Flex Item in Header */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #E5E5E5;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: 'Verdana', Arial, sans-serif;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: #ff5555;
}

.menu-toggle::before {
    content: "☰";
    font-size: 2rem;
    line-height: 1;
}

.menu-toggle.active::before {
    content: "✕";
}

/* Main Menu */
#main-menu {
    display: none; /* Hidden by default on mobile */
    width: 100%;
}

#main-menu.active {
    display: block;
}

#main-menu ul {
    margin: 0;
    padding: 0;
}

#main-menu ul li {
    display: block;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #444;
}

#main-menu ul li:last-child {
    border-bottom: none;
}

#main-menu ul li a {
    display: block;
    color: white;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.3s ease, color 0.3s ease;
}

#main-menu ul li a:hover,
#main-menu ul li a:focus {
    background: #2D2D2D;
    color: #ff5555;
}

#main-menu ul li.active {
    background: url("../images/menu_active.png") no-repeat right center;
    background-size: contain;
}

#main-menu ul li.active a {
    color: #2D2D2D;
    background: rgba(204, 204, 204, 0.9);
}

/* Content Wrapper
   ---------------- */
#content-wrap {
    width: 100%;
    padding: 1rem;
}

/* Content Area - IMPROVED READABILITY */
#content {
    padding: 1.5rem;
    margin-bottom: 4rem; /* Space for footer */
    /* IMPROVED: Semi-transparent background for better text readability */
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

#content h1 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #666;
}

/* Footer
   ------- */
#footer {
    border-top: 1px solid #777777;
    color: #999999; /* Slightly brighter */
    padding: 1rem;
    text-align: center;
    font-size: 0.688rem;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
}

/* Social Links */
.social-links {
    text-align: center;
    margin: 1rem 0;
}

.social-links img {
    display: inline-block;
    margin: 0 0.5rem;
    width: 40px;
    height: 40px;
}

/* Search Box */
#site-search {
    background: url("../images/search.png") no-repeat scroll 0 0 transparent;
    background-size: contain;
    height: 23px;
    width: 100%;
    max-width: 212px;
    margin: 1rem auto;
}

#site-search * {
    background: none repeat scroll 0 0 transparent;
    border: medium none;
}

#site-search .form-text {
    color: #2D2D2D;
    float: left;
    padding: 8px 6px 5px;
    text-transform: uppercase;
    width: calc(100% - 45px);
    font-size: 0.5rem;
}

#site-search .form-submit {
    color: #CCCCCC;
    cursor: pointer;
    float: left;
    padding: 5px 0;
    text-align: center;
    width: 45px;
    font-size: 0.625rem;
}

/* Messages */
.messages {
    background: url(../images/message.png);
    border: 3px solid white;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    box-shadow: inset 0px 0px 5px 0px #000;
}

/* Tablet Styles - 768px and up
   ============================= */
@media screen and (min-width: 768px) {
    #page {
        padding: 0 1rem;
    }

    #header {
        min-height: 70px; /* Slightly taller on tablet */
    }

    #logo-block img {
        max-width: 220px; /* Increased from 180px for better tablet visibility */
    }

    .menu-toggle::before {
        font-size: 2.5rem; /* Slightly larger on tablet */
    }

    #content {
        padding: 2rem;
    }
}

/* Desktop Styles - 1024px and up
   =============================== */
@media screen and (min-width: 1024px) {
    #page {
        width: 960px;
        padding: 0 10px;
        display: flex;
        flex-wrap: wrap;
    }

    /* Hide mobile menu toggle on desktop */
    .menu-toggle {
        display: none;
    }

    /* Sidebar - Desktop Layout */
    #sidebar {
        width: 25%;
        float: left;
        margin-top: 220px;
        background: transparent;
        position: relative;
    }

    /* Show menu by default on desktop */
    #main-menu {
        display: block !important;
        text-align: right;
    }

    #main-menu ul li {
        border-bottom: none;
        height: 26px;
        margin: 29px 0 0;
        padding-right: 20px;
    }

    #main-menu ul li a {
        padding: 0;
        font-size: 1.4rem;
        background: transparent;
    }

    #main-menu ul li a:hover {
        background: transparent;
    }

    #main-menu ul li.active {
        background: url("../images/menu_active.png") no-repeat scroll right center transparent;
    }

    #main-menu ul li.active a {
        color: #2D2D2D;
        background: transparent;
    }

    /* Content - Desktop Layout */
    #content-wrap {
        width: 75%;
        float: right;
        padding: 0;
    }

    #header {
        padding-top: 45px;
        background: transparent; /* Remove background on desktop */
        min-height: auto;
    }

    #logo-block {
        float: left;
        left: -212px;
        position: relative;
        text-align: left;
        margin-bottom: 0;
        padding: 0;
    }

    #logo-block img {
        max-width: none;
        margin: 0;
    }

    #header-right {
        display: none; /* Keep hidden on desktop too */
    }

    #content {
        margin: 80px 20px 10px;
        padding: 1.5rem 2rem 2rem;
    }

    #footer {
        position: absolute;
        bottom: 0;
        right: 0;
        text-align: right;
        margin: 10px 20px 10px 10px;
        padding: 10px;
        width: auto;
        background: rgba(0, 0, 0, 0.7);
    }

    .social-links {
        float: right;
        margin-top: 13px;
        text-align: right;
    }

    .social-links img {
        float: left;
        margin: 0 0 0 10px;
        width: auto;
        height: auto;
        display: block;
    }

    #site-search {
        margin: 0;
    }
}

/* Video Wrapper - Responsive YouTube Embeds
   ========================================== */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Accessibility - Focus States
   ============================= */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #ff3333;
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff3333;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Image Styling
   ============== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

#content img {
    border: 4px solid #CCCCCC;
    margin: 1rem 0;
}

/* Smooth Scroll Behavior
   ======================= */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Torture Cases Grid - Thumbnail Layout
   ======================================= */
.torture-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

.torture-case-item {
    position: relative;
    text-align: center;
}

.torture-case-item .case-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #000;
    border: 2px solid #CCCCCC;
}

.case-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
}

.torture-case-item:hover .case-overlay {
    opacity: 1;
}

.case-description {
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    text-align: left;
}

.case-description p {
    margin: 0;
}

.case-title {
    margin-top: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #E5E5E5;
}

/* Mobile - Stack to 2 columns */
@media screen and (max-width: 767px) {
    .torture-cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .case-description {
        font-size: 10px;
    }

    .case-title {
        font-size: 11px;
    }
}

/* Tablet - 3 columns */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .torture-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop - 3 columns */
@media screen and (min-width: 1024px) {
    .torture-cases-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 600px;
    }
}

/* Large Desktop - 1200px and up
   ============================== */
@media screen and (min-width: 1200px) {
    #page {
        width: 1100px;
    }
}

/* Print Styles
   ============= */
@media print {
    /* Reset background for printing */
    body {
        background: white;
        color: black;
    }

    /* Hide non-essential elements */
    #sidebar,
    .menu-toggle,
    #site-search,
    .social-links,
    #footer,
    .video-wrapper {
        display: none;
    }

    /* Full width content */
    #content-wrap {
        width: 100%;
        float: none;
        margin: 0;
        padding: 0;
    }

    #content {
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
    }

    /* Keep logo visible */
    #logo img {
        max-width: 200px;
    }

    /* Better link visibility */
    a {
        color: black;
        text-decoration: underline;
    }

    /* Show URLs after links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    /* Prevent page breaks inside elements */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, li {
        page-break-inside: avoid;
    }
}

/* Evan Naseem Interviews - Vertical Thumbnail Layout
   =================================================== */
.evan-interviews-list {
    margin: 2rem 0;
}

.evan-interview-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #555; /* Brighter border */
    /* IMPROVED: Individual item backgrounds */
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.evan-interview-item:hover {
    background: rgba(0, 0, 0, 0.5);
}

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

.interview-link {
    display: flex;
    gap: 1.5rem;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.interview-link:hover {
    text-decoration: none;
}

.interview-thumbnail {
    flex-shrink: 0;
    width: 200px;
    border: 2px solid #CCCCCC;
    overflow: hidden;
    background: #000;
}

.interview-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.interview-link:hover .interview-thumbnail img {
    opacity: 0.8;
}

.interview-content {
    flex: 1;
}

.interview-summary {
    color: #E5E5E5; /* Improved readability */
    line-height: 1.8; /* Better line spacing */
    margin: 0;
    font-size: 1rem;
}

.interview-link:hover .interview-summary {
    color: #ff5555;
}

/* Mobile - Stack vertically */
@media screen and (max-width: 767px) {
    .interview-link {
        flex-direction: column;
        gap: 1rem;
    }

    .interview-thumbnail {
        width: 100%;
        max-width: 300px;
    }
}

/* Tablet - Keep horizontal but smaller thumbnail */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .interview-thumbnail {
        width: 150px;
    }
}

/* Research Page - Two-Column Layout
   =================================== */
.research-columns {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.research-column {
    flex: 1;
    min-width: 280px;
}

.research-column h2 {
    color: #ff3333;
    border-bottom: 2px solid #ff3333;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.research-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #444;
}

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

.research-item h3 {
    margin-bottom: 0.75rem;
}

.research-item h3 a {
    color: #ff3333;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.research-item h3 a:hover {
    color: #ff5555;
    text-decoration: underline;
}

.research-summary {
    color: #E5E5E5;
    line-height: 1.6;
    font-size: 0.95rem;
}

.research-summary a {
    color: #ff3333;
    text-decoration: underline;
}

.research-summary a:hover {
    color: #ff5555;
}

/* Mobile - Stack columns */
@media screen and (max-width: 767px) {
    .research-columns {
        flex-direction: column;
        gap: 3rem;
    }
}

/* Media Coverage Page
   ==================== */
.media-videos-section {
    margin: 2rem 0;
}

.media-item {
    margin-bottom: 2rem;
}

.media-link {
    display: flex;
    gap: 1.5rem;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.media-link:hover {
    text-decoration: none;
}

.media-thumbnail {
    flex-shrink: 0;
    width: 200px;
    border: 2px solid #CCCCCC;
    overflow: hidden;
    background: #000;
}

.media-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.media-link:hover .media-thumbnail img {
    opacity: 0.8;
}

.media-title {
    color: #ff3333;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.media-link:hover .media-title {
    color: #ff5555;
    text-decoration: underline;
}

.media-links-section {
    margin-top: 3rem;
}

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

.media-link-item {
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid #444;
}

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

.media-link-item a {
    color: #ff3333;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.media-link-item a:hover {
    color: #ff5555;
    text-decoration: underline;
}

/* Mobile - Stack video items */
@media screen and (max-width: 767px) {
    .media-link {
        flex-direction: column;
        gap: 1rem;
    }

    .media-thumbnail {
        width: 100%;
        max-width: 300px;
    }
}
