/* --- 1. GLOBAL & VARIABLES --- */
:root {
    --paper-bg: #fcf6de;
    --news-gray: #e5e5e5;
    --ink-black: #222222;
    --gold-premium: #d4af37;
    --plus-green: #2e7d32;
    --smlc-blue: #2ea3f2;
    --shadow: rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

body {
    background-color: var(--news-gray);
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
}

/* --- 2. DUAL-ROW NAVIGATION --- */
.top-nav-bar {
    background-color: var(--smlc-blue);
    padding: 10px 45px; /* Increased padding by 20px */
    text-align: right;
}

.top-nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    margin-left: 20px;
    font-family: Arial, sans-serif;
}

.main-nav-bar {
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 15px 25px 15px 15%; /* Custom 60px Logo Padding */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 9998;
}

.logo-area img { height: 60px; display: block; }

.main-menu-links { 
    margin-left: auto; 
    display: flex;
    align-items: center;
}

.main-menu-links a {
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    margin-left: 25px;
    font-size: 15px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

.main-menu-links a:hover, 
.main-menu-links a.active {
    color: var(--smlc-blue);
}

/* SEARCH */
.search-area { position: relative; margin-left: 20px; }
#search-toggle { background: none; border: none; font-size: 20px; cursor: pointer; }
#search-input-wrapper {
    position: absolute; right: 0; top: 45px;
    background: white; padding: 12px; border: 1px solid var(--ink-black);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 10000;
}

/* --- 3. MASTHEAD --- */
.main-title { text-align: center; padding: 20px 0; }
.main-title h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); margin: 10px 0 5px; text-transform: uppercase; letter-spacing: -2px; }
.masthead-towns { display: block; letter-spacing: 5px; text-transform: uppercase; font-size: 12px; color: var(--ink-black); font-weight: bold; margin-bottom: 25px; }

.newspaper-meta {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 3px solid var(--ink-black); border-bottom: 3px solid var(--ink-black);
    padding: 15px 0; margin-bottom: 30px;
}

.meta-item { flex: 1; text-align: center; font-weight: bold; font-size: 0.85rem; text-transform: uppercase; font-family: Arial, sans-serif; }
.left-meta { text-align: left; padding-left: 15px; }
.right-meta { text-align: right; padding-right: 15px; }

/* --- 4. CARDS & GRID --- */
.site-wrapper { max-width: 95%; margin: 0 auto; padding: 0 20px 40px 20px; }
#directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }

.card {
    background: var(--paper-bg); border: 2px solid var(--ink-black);
    padding: 20px; text-align: center; position: relative;
    overflow: hidden; box-shadow: 5px 5px 0px var(--shadow);
}

.card.plus { border-color: var(--plus-green); }
.card.premium { border-color: var(--gold-premium); border-width: 3px; }

/* Ribbons */
.card.plus::after, .card.premium::after {
    position: absolute; top: 15px; right: -30px;
    transform: rotate(45deg); padding: 5px 40px;
    font-size: 10px; font-weight: bold; color: white;
}
.card.plus::after { content: "PLUS"; background: var(--plus-green); }
.card.premium::after { content: "PREMIUM"; background: var(--gold-premium); }

.logo-box { height: 100px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }

.read-more-btn {
    background: linear-gradient(45deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    color: #222; border: 1px solid #222; padding: 10px 20px;
    font-weight: 900; font-size: 12px; text-transform: uppercase; cursor: pointer;
}

.town-bar { padding: 8px; margin: 15px -20px; font-weight: bold; text-transform: uppercase; font-size: 0.75rem; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.flora-bar { background: #ff6600; color: #fff; }
.louisville-bar { background: #cc0000; color: #fff; }
.clay-city-bar { background: #0044cc; color: #fff; }
.xenia-bar, .sailor-springs-bar { background: #000; color: #fff; }

/* --- 5. MODAL --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 99999; justify-content: center; align-items: center; }
.modal-content { background-color: var(--paper-bg); width: 90%; max-width: 600px; border: 3px solid #222; padding: 40px; box-shadow: 20px 20px 0px rgba(0,0,0,0.4); }

/* Tier Filter Container */
.tier-filter-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.tier-btn { padding: 10px 20px; border: 2px solid var(--ink-black); background: #fff; cursor: pointer; font-weight: bold; text-transform: uppercase; font-size: 0.8rem; }
.tier-btn.active { background: var(--ink-black); color: #fff; }

@media (max-width: 768px) {
    .main-nav-bar { flex-direction: column; padding: 15px; }
    .main-menu-links { margin-top: 15px; flex-wrap: wrap; justify-content: center; }
    .main-menu-links a { margin: 5px 10px; }
}


/* --- THE COUPON BADGE --- */
.coupon-badge {
    position: absolute;
    top: 12px;     
    left: 12px;    
    width: 80px; 
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.3));
    z-index: 100;
    pointer-events: none;

    /* ADD THE TRANSFORM HERE */
    transform: rotate(-8deg); 
}

/* Ensure the card container can hold absolute elements */
.card {
    position: relative;
}
