/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #0a0a0a;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
    scroll-behavior: smooth;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'100\' height=\'100\' viewBox=\'0 0 100 100\'><filter id=\'noise\'><feTurbulence type=\'fractalNoise\' baseFrequency=\'0.8\' numOctaves=\'3\' stitchTiles=\'stitch\'/></filter><rect width=\'100\' height=\'100\' filter=\'url(%23noise)\' opacity=\'0.2\'/></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Link styles */
a {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Landing Page Styles */
.landing-page {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
    flex-direction: column;
}

.landing-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    overflow: hidden;
}

.landing-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.landing-carousel img.active {
    opacity: 1;
}

.magazine-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    padding-bottom: 15vh;
}

/* Info Button Styles */
.info-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background-color: transparent;
}

.info-btn::after {
    content: "Info";
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 5px;
    font-weight: 400;
    letter-spacing: 1px;
}

.info-btn:hover {
    transform: none;
    background-color: transparent;
}

.title-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.title {
    font-size: 15vw;
    font-weight: 900;
    letter-spacing: -5px;
    line-height: 0.8;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(20px);
    transition: transform 0.5s ease-out;
    margin-top: 0;
    margin-bottom: 10px;
}

.title span:first-child {
    color: #e74c3c;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 1);
    text-stroke: 1px rgba(255, 255, 255, 1);
}

.title span:last-child {
    color: #fff;
    -webkit-text-stroke: 1px rgba(231, 76, 60, 1);
    text-stroke: 1px rgba(231, 76, 60, 1);
    margin-bottom: 20px;
}

/* Scroll down indicator */
.scroll-down-indicator {
    margin-top: 5%;
    font-size: 32px;
    color: #fff;
    opacity: 0.7;
    position: relative;
    bottom: 0;
}

.issue-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 0;
    text-align: right;
}

.issue-label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0px;
    line-height: 1;
}

.issue-number {
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transform: translateY(0);
    line-height: 0.8;
    margin-top: 0;
}

/* Sticky Pre-order Button */
.sticky-pre-order {
    position: fixed;
    left: 1%;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    z-index: 1000;
    padding: 12px 24px;
    background-color: #e74c3c;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sticky-pre-order:hover {
    color: #fff;
    transform: translateY(-50%) rotate(-90deg) translateY(-3px);
}

/* Content Section Styles */
.content-section {
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.filter-nav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #333;
}

.filter-nav-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-buttons-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.filter-buttons-wrapper {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    width: max-content;
}

.search-container {
    width: 100%;
    padding: 0 10px;
    transition: all 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #333;
    background-color: #1a1a1a;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
}

.filter-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
}

.filter-buttons-container::-webkit-scrollbar {
    display: none;
}

/* Author Bio Section */
.author-header {
    margin: 40px 0;
    text-align: center;
    padding: 0 20px;
    grid-column: 1 / -1;
}

.author-bio {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 16px;
    color: #bbb;
    line-height: 1.6;
}

/* Content Card Styles */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin-top: 40px;
    opacity: 1;
}

.content-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.content-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 66.66%;
    overflow: hidden;
}

.content-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.content-card:hover img {
    transform: scale(1.1) rotate(0.5deg);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-category {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.card-blurb {
    font-size: 14px;
    color: #bbb;
    margin: 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-author {
    font-size: 14px;
    color: #bbb;
    margin-top: auto;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.3s ease;
}

.card-author:hover {
    color: #e74c3c;
    text-decoration-color: #e74c3c;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #bbb;
}

/* Article Overlay Styles */
.article-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    overflow-y: auto;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    -webkit-overflow-scrolling: touch;
}

.article-overlay.visible {
    transform: translateY(0);
}

.article-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    position: relative;
    top: 0;
}

.close-article {
    position: sticky;
    top: 20px;
    right: 20px;
    float: right;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 20px 20px 0 0;
    margin-top: -60px; /* Add this to pull it up slightly */
}

.close-article:hover {
    background-color: #c0392b;
    transform: rotate(90deg) scale(1.1);
}

.article-featured-image {
    width: 100%;
    height: calc(100vh - 0px);
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
    background-color: #0a0a0a;
    margin-top: -150px;
    border-radius: 12px 12px 0 0;
    z-index: 1;
    overflow: visible;
}

.article-title {
    font-size: 6vw;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.article-title-line {
    display: block;
    opacity: 1;
    transform: translateY(20px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    font-size: 14px;
    color: #bbb;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.article-meta span {
    opacity: 1 !important;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.article-category, .article-author {
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: underline;
    text-decoration-color: transparent;
}

.article-category:hover, .article-author:hover {
    color: #e74c3c;
    text-decoration-color: #e74c3c;
}

.article-date, .article-readtime {
    cursor: default !important;
    pointer-events: none !important;
    text-decoration: none !important;
}

.article-date:hover, .article-readtime:hover {
    text-decoration: none !important;
}

/* Clickable elements in article meta */
.clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.3s ease;
}

.clickable:hover {
    color: #e74c3c;
    text-decoration-color: #e74c3c;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    opacity: 1;
    transform: translateY(20px);
    overflow: visible;
    max-width: 800px;
    margin: 0 auto;
}

.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
    margin: 40px 0 20px;
    font-weight: 700;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content figure {
    margin: 40px 0;
}

.article-content img, .article-content video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.article-content .align-left {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 40%;
}

.article-content .align-right {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 40%;
}

.read-next {
    margin-top: 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
}

.read-next h3 {
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
}

.read-next-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.read-next-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.read-next-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.read-next-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
}

.read-next-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.read-next-card:hover img {
    transform: scale(1.05);
}

.read-next-content {
    padding: 15px;
}

.read-next-category {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.read-next-title {
    font-size: 18px;
    line-height: 1.2;
    margin: 0;
}

/* Article Footer */
.article-footer {
    background-color: #1a1a1a;
    padding: 60px 20px;
    margin-top: 80px;
    border-top: 1px solid #333;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #e74c3c;
    transform: translateY(-3px);
}

.copyright {
    font-size: 12px;
    color: #bbb;
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
}

.copyleft {
    display: inline-block;
    transform: rotate(180deg);
}

/* Modal Styles */
.info-modal, .preorder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.info-modal.visible, .preorder-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.info-modal.visible .modal-content,
.preorder-modal.visible .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #e74c3c;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.social-links {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-links a {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #e74c3c;
}

.policy {
    margin-top: 30px;
    font-size: 12px;
    color: #bbb;
    line-height: 1.5;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.modal-ok-btn {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.modal-ok-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Remove default focus outline and replace with custom style */
.article-overlay:focus, 
.article-content:focus {
    outline: none;
}

/* For all focusable elements inside the article */
.article-overlay [tabindex]:focus,
.article-overlay a:focus,
.article-overlay button:focus {
    outline: none;
}

/* Media Queries for responsiveness */
@media (min-width: 768px) {
    .filter-nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 15px 20px;
    }

    .search-container {
        width: auto;
        flex-shrink: 0;
    }

    .search-input {
        width: 200px;
    }

    .filter-buttons-container {
        flex-grow: 1;
        display: flex;
        justify-content: center;
    }

    .filter-buttons-wrapper {
        display: flex;
        gap: 10px;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .filter-nav {
        width: 100%;
        top: 0;
    }
    
     .sticky-pre-order {
        position: fixed; /* Changed from sticky to fixed for better mobile behavior */
        bottom: 0;      /* Changed from top: 0 */
        top: auto;      /* Explicitly reset top positioning */
        left: 0;
        transform: none;
        width: 100%;
        text-align: center;
        padding: 12px 0; /* Slightly increased padding for better thumb reach */
        border-radius: 0;
        z-index: 1000;
        font-size: 14px;
        letter-spacing: 0.5px;
        box-shadow: 0 -2px 10px rgba(231, 76, 60, 0.4); /* Shadow on top instead of bottom */
    }

    .sticky-pre-order:hover {
        transform: none;
    }
    
    .content-section {
        padding: 30px 15px;
    }
    
    .filter-nav-container {
        padding: 10px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .article-header-content {
        padding: 30px 15px;
        margin-top: -60px;
    }
    
    .article-title {
        font-size: 8vw;
    }
    
    .article-content {
        padding: 0 15px;
        font-size: 16px;
        text-align: left;
    }
    
    .article-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }
    
    .article-meta span {
        white-space: nowrap;
    }
    
    .close-article {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .read-next-grid {
        grid-template-columns: repeat(auto-fit, minmax(calc(50% - 10px), 1fr);
    }
    
    .read-next-card img {
        height: 200px;
    }
    
    .article-content .align-left,
    .article-content .align-right {
        float: none;
        max-width: 100%;
        margin: 20px auto;
    }
    
    .article-content figure {
        margin: 20px 0;
    }

    .article-header {
        padding: 10px 15px;
    }

    .title {
        font-size: 20vw;
        letter-spacing: -3px;
    }
    
    .scroll-down-indicator {
        font-size: 24px;
        opacity: 1;
    }
    
    .issue-label {
        font-size: 14px;
        margin-bottom: -8px;
    }
    
    .issue-number {
        font-size: 15vw;
    }
    
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .footer-content {
        gap: 20px;
    }

    /* Mobile modals */
    .info-modal .modal-content,
    .preorder-modal .modal-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 500px;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .title {
        font-size: 22vw;
    }
    
    .issue-number {
        font-size: 20vw;
    }
    
    .sticky-pre-order {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .content-grid {
        gap: 15px;
    }
    
    .article-title {
        font-size: 10vw;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .read-next h3 {
        font-size: 18px;
    }

    .modal-content {
        padding: 20px 15px;
    }

    .filter-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .title {
        font-size: 15vw;
    }
    
    
    .sticky-pre-order {
        padding: 8px 0;
        font-size: 12px;
    }
    .magazine-container {
        padding-bottom: 5vh;
    }
    
    .filter-nav {
        top: 0;
        padding: 5px 0;
    }
    
    .filter-buttons-wrapper {
        padding-bottom: 3px;
    }
    
    .article-meta {
        gap: 8px;
    }
    
    .footer-links {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .read-next-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 350px) {
    .title {
        font-size: 24vw;
        letter-spacing: -1px;
    }
    
     .sticky-pre-order {
        font-size: 11px;
        padding: 6px 0;
    }
    
    .filter-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .article-meta {
        font-size: 12px;
        gap: 5px;
    }
    
    .footer-links {
        gap: 8px;
        font-size: 12px;
    }
}
