/* =====================================
   IMPORT GOOGLE FONTS
   ===================================== */
@import url('https://fonts.googleapis.com/css2?family=Allura&display=swap');

/* =====================================
   GLOBAL STYLES
   ===================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Calibri", sans-serif;
    background-color: #17344e;
    color: #ffffff;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Times New Roman", Times, serif;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout variables */
:root {
    --article-col: 350px;
    --grid-gap: 40px;
}

/* =====================================
   ENHANCED HEADER
   ===================================== */
.header-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #17344e 0%, #2a5278 100%);
}

.header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.05) 10px, rgba(255,255,255,.05) 20px);
}

.header-text {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 60px 20px;
}

.header-text h1 {
    font-family: "Times New Roman", Times, serif;
    font-size: 52px;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 2px;
    animation: fadeInDown 0.8s ease;
}

.header-tagline {
    font-size: 18px;
    color: #cba230;
    font-style: italic;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* =====================================
   STICKY NAVIGATION
   ===================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #cba230;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #17344e;
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 5px;
}

.nav-links a,
.nav-links button.dropbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 20px;
    color: whitesmoke;
    text-decoration: none;
    font-family: "Times New Roman", sans-serif;
    font-size: 16px;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    line-height: 1;
}

.nav-links a::after,
.nav-links button.dropbtn::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 3px;
    background: whitesmoke;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links button.dropbtn:hover {
    background-color: #705a1c;
}

.nav-links a:hover::after,
.nav-links button.dropbtn:hover::after {
    width: 80%;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a5278;
    min-width: 180px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
    z-index: 999;
    overflow: hidden;
}

.dropdown-content a {
    padding: 14px 18px;
    color: whitesmoke;
    text-decoration: none;
    display: block;
    font-size: 15px;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #17344e;
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: whitesmoke;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.search-box {
    padding: 8px 15px;
    border: 2px solid whitesmoke;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: whitesmoke;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    width: 250px;
}

.search-box::placeholder {
    color: rgba(255,255,255,0.7);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a5278;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    max-width: 400px;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 10px;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cba230;
    border-radius: 10px;
}

/* =====================================
   MAIN CONTENT
   ===================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.mission {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(203,162,48,0.1) 0%, rgba(203,162,48,0.05) 100%);
    border-radius: 15px;
    margin-bottom: 60px;
    animation: fadeIn 1s ease;
}

.mission h2 {
    font-family: "Times New Roman", Times, serif;
    font-size: 36px;
    font-weight: 300;
    color: #cba230;
    margin-bottom: 20px;
    line-height: 1.4;
}

.welcome {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(203,162,48,0.1) 0%, rgba(203,162,48,0.05) 100%);
    border-radius: 15px;
    margin: 0;
    animation: fadeIn 1s ease;
}

.welcome p {
    font-family: "Times New Roman", Times, serif;
    font-size: 25px;
    font-weight: 300;
    color: #cba230;
    margin-bottom: 20px;
    line-height: 1.4;
}

.welcome h3 {
    font-family: "Allura", cursive;
    font-size: 48px;
    font-weight: 400;
    color: #cba230;
    margin-bottom: 20px;
    line-height: 1.4;
}

.welcome h2 {
    font-family: "Times New Roman", Times, serif;
    font-size: 36px;
    font-weight: 300;
    color: #cba230;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* =====================================
   ARTICLES GRID
   ===================================== */
.articles-section {
    margin-bottom: 60px;
}

.section-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 42px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #cba230, transparent);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--article-col), 1fr));
    gap: var(--grid-gap);
    margin-top: 20px;
    margin-bottom: 40px;
}

/* On wide screens, lock the grid to exactly three columns so edges match the welcome/newsletter width */
@media (min-width: calc(3 * var(--article-col) + 2 * var(--grid-gap))) {
    .articles-grid {
        grid-template-columns: repeat(3, var(--article-col));
        width: calc(3 * var(--article-col) + 2 * var(--grid-gap));
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }
}

.article-card {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(203,162,48,0.2);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: #cba230;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.article-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* ARTICLE IMAGE BACKGROUNDS - Updated with correct paths */
.KirkImage {
    background-image: url("../images/President_Donald_Trump_attends_the_Memorial_Service_for_Charlie_Kirk.jpg");
}

.ShutdownImage {
    background-image: url("../images/Capitol_Building.jpg");
}

.NewJerseyElectionImage {
    background-image: url("../images/NewJersey.jpg");
}

.Mamdani {
    background-image: url("../images/Mamdani.jpg");
}

.Thanksgiving {
    background-image: url("../images/Thanksgiving.jpg");
}

.Epstein {
    background-image: url("../images/Epstein.jpeg");
}

.ChristianImage {
    background-image: url("../images/Stoning_of_stephen_icon.jpeg");
}

.TexasImage {
    background-image: url("../images/Greg_Abbott.jpg");
}

.PolarizationImage {
    background-image: url("../images/January6.png");
}

.VenezuelaImage {
    background-image: url("../images/Maduro.png");
}

.BushInstituteImage {
    background-image: url("../images/McKenzieWilliam.jpg");
}

.TrumpImage {
    background-image: url("../images/Trump.jpg");
}

.IranImage {
    background-image: url("../images/iran.jpg");
}

.America250 {
    background-image: url("../images/TrumpBiden.jpg");
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #cba230;
    color: #17344e;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.article-content {
    padding: 30px;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #cba230;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 24px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: #cba230;
}

.article-excerpt {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cba230;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: gap 0.3s ease;
}

.article-card:hover .read-more {
    gap: 12px;
}

/* =====================================
   ARTICLE PAGE STYLES
   ===================================== */
.article-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-page-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 48px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-author {
    font-size: 18px;
    color: #cba230;
    margin-bottom: 10px;
}

.article-author a {
    color: #cba230;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.article-author p {
    color: #cba230;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.article-author a:hover {
    border-bottom-color: #cba230;
}

.article-featured-image {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.image-credit {
    color: #cba230;
    font-size: 14px;
    font-style: italic;
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
} 

.image-credit a {
    color: #cba230;
    text-decoration: none !important;
}

a[href*="flickr"] {
    text-decoration: none !important;
}

.article-body {
    color: #ffffff;
    font-size: 19px;
    line-height: 1.8;
    margin-top: 40px;
}

.article-body p {
    margin-bottom: 25px;
}

.article-citations {
    text-align: center;
    margin: 60px auto 40px;
    padding-top: 40px;
    border-top: 2px solid #cba230;
}

.article-citations a {
    color: #cba230;
    font-size: 24px;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.article-citations a:hover {
    color: #e5c04a;
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

/* Backwards-compatible class used on some pages */
.share-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    background: rgba(203,162,48,0.2);
    color: #cba230;
    border: 2px solid #cba230;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: "Calibri", sans-serif;
}

.share-btn:hover {
    background: #cba230;
    color: #17344e;
    transform: translateY(-2px);
}

/* =====================================
   NEWSLETTER SECTION
   ===================================== */
.newsletter {
    background: linear-gradient(135deg, #cba230 0%, #705a1c 100%);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    margin: 0;
}

.newsletter h3 {
    font-family: "Times New Roman", Times, serif;
    font-size: 36px;
    font-weight: 300;
    color: #17344e;
    margin-bottom: 15px;
}

.newsletter p {
    color: rgba(23,52,78,0.9);
    font-size: 16px;
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* Stack welcome and newsletter vertically with a 40px gap, centered to three-column width */
.welcome-and-newsletter {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: stretch;
    margin-bottom: 40px;
    width: calc(3 * var(--article-col) + 2 * var(--grid-gap));
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.welcome-and-newsletter .welcome,
.welcome-and-newsletter .newsletter {
    flex: 1 1 50%;
    min-height: 240px;
}

.welcome-and-newsletter .newsletter {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-and-newsletter .welcome p,
.welcome-and-newsletter .welcome h3,
.welcome-and-newsletter .welcome h2 {
    width: 100%;
}

.newsletter-input {
    flex: 1 1 auto;
    width: 100%;
}

.newsletter-btn {
    flex: 1 1 auto;
    min-width: 140px;
}

@media (max-width: 768px) {
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-btn { width: 100%; }
}

@media (max-width: 768px) {
    .welcome-and-newsletter {
        flex-direction: column;
        gap: 40px;
    }
    .welcome-and-newsletter .welcome,
    .welcome-and-newsletter .newsletter {
        width: 100%;
        flex: none;
    }
}
@media (min-width: 769px) {
    /* no extra margin - use flex gap to control spacing */
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid rgba(23,52,78,0.3);
    border-radius: 30px;
}

/* =====================================
   LOGIN / REGISTER MODAL
   ===================================== */

/* Overlay */
.login-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

/* Show state — JS sets display:block; we override to flex so it centres */
.login-modal[style*="display: block"],
.login-modal[style*="display:block"] {
    display: flex !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Card */
.login-modal-content {
    position: relative;
    background: linear-gradient(160deg, #1e3f5c 0%, #17344e 100%);
    border: 1px solid rgba(203, 162, 48, 0.35);
    border-radius: 16px;
    padding: 40px 36px 32px;
    width: min(420px, 92vw);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
    animation: cardSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Close button */
.login-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 22px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.login-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Title */
.login-modal-content h2 {
    font-family: "Times New Roman", Times, serif;
    font-size: 26px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Tab toggle row */
.auth-toggle {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(203, 162, 48, 0.3);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    transition: background 0.2s, color 0.2s;
}
.auth-tab.active {
    background: #cba230;
    color: #17344e;
}
.auth-tab:not(.active):hover {
    background: rgba(203, 162, 48, 0.12);
    color: #cba230;
}

/* Form inputs */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#loginForm input[type="email"],
#loginForm input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-family: "Calibri", sans-serif;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
#loginForm input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
#loginForm input:focus {
    border-color: #cba230;
    background: rgba(203, 162, 48, 0.07);
}

/* Submit button */
#submitBtn {
    margin-top: 4px;
    padding: 13px;
    background: #cba230;
    color: #17344e;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
}
#submitBtn:hover:not(:disabled) {
    background: #d4aa38;
    transform: translateY(-1px);
}
#submitBtn:active:not(:disabled) {
    transform: translateY(0);
}
#submitBtn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Error / success message */
.login-error {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
    color: #ff6b6b;
    transition: color 0.2s;
}

/* Divider line above the gold accent at modal bottom */
.login-modal-content::after {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, #cba230, transparent);
    border-radius: 0 0 16px 16px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* =====================================
   RESPONSIVE
   ===================================== */
@media (max-width: 480px) {
    .login-modal-content {
        padding: 32px 22px 28px;
    }
    .login-modal-content h2 {
        font-size: 22px;
    }
}