/* About Page Mobile Styles */
@media screen and (max-width: 768px) {
    .about-container {
        padding: 1rem;
    }

    .about-header {
        margin-bottom: 2rem;
    }

    .about-header h1 {
        font-size: 2rem;
    }

    .about-header .subtitle {
        font-size: 1rem;
    }

    .about-section {
        margin-bottom: 2rem;
    }

    .about-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .value-card {
        padding: 1.25rem;
    }
    .back-button {
        display: none;
    }
    .cover-image {
        border-radius: 0;
    }
}

@media screen and (max-width: 480px) {
    .about-container {
        padding: 1rem 0;
    }

    .about-header h1 {
        font-size: 1.75rem;
    }

    .about-section h2 {
        font-size: 1.3rem;
    }

    .about-section p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .value-card {
        padding: 1rem;
    }

    .value-card h3 {
        font-size: 1.1rem;
    }

    .value-card p {
        font-size: 0.9rem;
    }
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* Tablet Styles (768px and below) */
@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 105px;
        left: 0;
        right: 0;
        background-color: var(--surface-color);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
        z-index: 1000;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-top: 2rem;
    }

    /* Featured Section Adjustments */
    .featured-section {
        margin: -2rem -20px 2rem;
    }

    .featured-main {
        border-radius: 0;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .featured-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .featured-content .article-meta {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .featured-content .article-excerpt {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .featured-content .article-tags {
        margin-bottom: 0.75rem;
    }

    .logo {
        height: 35px;
    }

    .footer-brand .logo {
        height: 30px;
    }

    .logo-link {
        gap: 0.75rem;
    }
}

/* Mobile Styles (480px and below) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Featured Section Mobile Adjustments */
    .featured-section {
        margin: -2rem -15px 1.5rem;
    }

    .search-button {
        margin-left: 0;
    }

    .featured-content {
        padding: 1.25rem;
        background: linear-gradient(transparent, rgba(0,0,0,0.8) 30%, rgba(0,0,0,0.95));
    }

    .featured-content h2 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .featured-content .article-meta {
        font-size: 0.8rem;
    }

    .featured-content .article-excerpt {
        -webkit-line-clamp: 2;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .featured-content .tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
        margin-bottom: 0.25rem;
    }

    .article-card {
        margin-bottom: 1.5rem;
    }

    .article-content {
        padding: 1rem;
    }

    .article-content h2 {
        font-size: 1.1rem;
    }

    .article-meta {
        font-size: 0.8rem;
    }

    .article-excerpt {
        font-size: 0.9rem;
    }

    .article-tags {
        flex-wrap: wrap;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
    }

    .sidebar-section {
        padding: 1rem;
    }

    .recent-post-image {
        width: 60px;
        height: 60px;
    }

    .recent-post-content h4 {
        font-size: 0.85rem;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .single-article {
        padding: 1rem;
    }

    .cover-image {
        height: 200px;
    }

    .logo {
        height: 30px;
    }

    .footer-brand .logo {
        height: 25px;
    }

    .logo-link {
        gap: 0.5rem;
    }
}

/* Intro Banner Mobile Styles */
@media screen and (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%;
    }

    .banner-text {
        text-align: center;
    }

    .intro-banner ul {
        max-width: none;
    }

    .intro-banner ul li {
        text-align: left;
        padding-left: 2rem;
    }

    .intro-banner ul li::before {
        left: 1rem;
    }

    .banner-logo {
        width: 200px;
        height: 200px;
        right: -100px;
        bottom: 0;
        top: auto;
        transform: translate(0, 50%);
    }

    .dismiss-banner {
        top: 0.25rem;
        right: 0.25rem;
    }
}

@media screen and (max-width: 480px) {
    .intro-banner {
        margin: 1rem 0;
        padding: 1rem;
    }

    .banner-logo {
        width: 160px;
        height: 160px;
        right: -80px;
    }

    .intro-banner h2 {
        font-size: 1.2rem;
    }

    .intro-banner p {
        font-size: 0.95rem;
    }

    .intro-banner ul li {
        font-size: 0.9rem;
    }
}

/* Header Responsive Styles */
@media screen and (max-width: 768px) {
    header {
        padding: 0.75rem 0;
    }

    nav {
        flex-wrap: wrap;
        min-height: 40px;
    }

    .brand {
        flex: 1;
        flex-direction: column;
        gap: 0.25rem;
        transition: gap 0.3s ease;
    }

    .logo-link {
        gap: 0.75rem;
        height: 40px;
        align-items: center;
    }

    .logo {
        width: 36px;
        height: 36px;
    }

    .brand h1 {
        font-size: 1.3rem;
        line-height: 1;
    }

    .tagline {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .mobile-hide-on-scroll {
        max-height: 2.8em;
        opacity: 1;
        margin-bottom: 0.25rem;
        transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
        overflow: hidden;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 40px;
        padding: 0.5rem;
        margin: 0;
    }

    .mobile-menu-toggle span {
        margin: 2px 0;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background-color: var(--surface-color);
        border-bottom: 1px solid var(--border-color);
        padding: 0;
        margin: 0;
        flex-direction: column;
        align-items: center;
        transition: top 0.3s ease;
    }

    nav ul.active {
        display: flex;
    }

    /* Collapsed state */
    .mobile-hide-on-scroll[style*="max-height: 0"] {
        margin-bottom: 0;
    }

    .mobile-hide-on-scroll[style*="max-height: 0"] ~ .logo-link {
        margin-bottom: 0;
    }

    /* When tagline is hidden, remove gap */
    .brand[data-collapsed="true"] {
        gap: 0;
    }
    .cookie-banner #cookie-initial-view {
        flex-direction: column;
        gap: 0;
        padding: 0 .5rem;
        align-items: flex-end;
    }
    .cookie-banner .cookie-footer {
        font-size: 0.8em;
        left: .5rem;
        right: auto;
    }
    .search-container {
        margin: 1rem auto 3rem auto;
    }
    .cookie-option input {
        padding: .8rem;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 0.5rem 0;
    }

    .brand h1 {
        font-size: 1.2rem;
    }

    .logo {
        width: 32px;
        height: 32px;
    }

    .tagline {
        font-size: 0.8rem;
    }

    .mobile-hide-on-scroll {
        max-height: 3em;
    }
}

/* Landscape Mode */
@media screen and (max-height: 480px) and (orientation: landscape) {
    nav ul {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .featured-main {
        aspect-ratio: 21/9;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .featured-content h2 {
        font-size: 1.4rem;
    }

    .featured-content .article-excerpt {
        -webkit-line-clamp: 2;
    }
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .brand-header {
        justify-content: center;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-links li {
        margin-bottom: 0;
    }
}

/* Privacy & Terms Pages Responsive */
@media (max-width: 768px) {
    .privacy-container,
    .terms-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .privacy-header,
    .terms-header {
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
    }

    .privacy-header h1,
    .terms-header h1 {
        font-size: 2rem;
    }

    .privacy-section,
    .terms-section {
        padding: 0;
    }

    .privacy-section h2,
    .terms-section h2 {
        font-size: 1.3rem;
    }

    .privacy-section ul,
    .terms-section ul {
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .privacy-container,
    .terms-container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .privacy-header h1,
    .terms-header h1 {
        font-size: 1.75rem;
    }

    .privacy-section h2,
    .terms-section h2 {
        font-size: 1.2rem;
    }
}

/* Article Sources Responsive */
@media (max-width: 768px) {
    .article-sources {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .article-sources h2 {
        font-size: 1.5rem;
    }

    .source-group {
        padding: 1rem;
    }

    .main-source h3 {
        font-size: 1.2rem;
    }

    .source-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .subsources {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .subsources h4 {
        font-size: 1rem;
    }

    .subsource-item {
        padding-left: 0.5rem;
    }

    .subsource-item .source-meta,
    .subsource-item .source-description {
        margin-left: 1rem;
    }

    .source-journey {
        flex-direction: column;
    }

    .journey-path {
        opacity: .3;
    }
    .source-card {
        z-index: 1;
    }

}

@media (max-width: 480px) {
    .article-sources {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .source-group {
        padding: 1rem;
    }

    .main-source h3 {
        font-size: 1.1rem;
    }

    .source-description {
        font-size: 0.9rem;
    }
}


/* Reactions Page Responsive */
@media (max-width: 768px) {
    .article-reactions {
        padding: 1rem;
    }

    .reactions-title {
        font-size: 1.2rem;
    }    
}