/* php_app/public/css/style.css */

:root {
    --radius: 0.375rem;
    --font-sans: "Inter", system-ui, -apple-system, sans-serif;
    --font-display: "Newsreader", Georgia, "Times New Roman", serif;

    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --primary: #ea580c; /* NextNews Vibrant Orange */
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --muted: #f8fafc;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #ea580c;

    --sidebar-bg: #f8fafc;
    --sidebar-fg: #0f172a;
}

html.dark {
    --background: #090d16;
    --foreground: #f8fafc;
    --card: #111827;
    --card-foreground: #f8fafc;
    --primary: #f97316;
    --primary-foreground: #ffffff;
    --secondary: #1e293b;
    --secondary-foreground: #f8fafc;
    --muted: #1e293b;
    --muted-foreground: #94a3b8;
    --accent: #1e293b;
    --accent-foreground: #f8fafc;
    --border: #1f293d;
    --input: #1f293d;
    --ring: #f97316;

    --sidebar-bg: #111827;
    --sidebar-fg: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-color: var(--border);
}

html,
body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header & Navbar */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color 0.3s ease;
}

html.dark .sticky-header {
    background-color: rgba(9, 13, 22, 0.85);
}

.nav-wrapper {
    display: flex;
    height: 4rem;
    align-items: center;
    justify-content: space-between;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .desktop-only,
    .sections-bar,
    .nav-links.desktop-only,
    .search-container.desktop-only {
        display: none !important;
    }
}

.nav-link {
    color: var(--muted-foreground);
    transition: color 0.2s ease;
    position: relative;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--foreground);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 1px;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 17rem;
    transition: width 0.3s ease;
}

.search-container:focus-within {
    width: 21rem;
}

.search-input {
    width: 100%;
    padding: 0.45rem 2.5rem 0.45rem 2.2rem;
    font-size: 0.875rem;
    border-radius: calc(var(--radius) * 1.5);
    border: 1px solid var(--input);
    background-color: var(--muted);
    color: var(--foreground);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: calc(var(--radius) * 1.2);
    cursor: pointer;
}

/* Theme Switcher Button */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--card);
    color: var(--foreground);
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: var(--accent);
}

/* Cards & Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.col-span-12 {
    grid-column: span 12 / span 12;
}
.col-span-8 {
    grid-column: span 8 / span 12;
}
.col-span-6 {
    grid-column: span 6 / span 12;
}
.col-span-4 {
    grid-column: span 4 / span 12;
}
.col-span-3 {
    grid-column: span 3 / span 12;
}

@media (min-width: 768px) {
    .md-col-span-12 {
        grid-column: span 12 / span 12;
    }
    .md-col-span-9 {
        grid-column: span 9 / span 12;
    }
    .md-col-span-8 {
        grid-column: span 8 / span 12;
    }
    .md-col-span-6 {
        grid-column: span 6 / span 12;
    }
    .md-col-span-4 {
        grid-column: span 4 / span 12;
    }
    .md-col-span-3 {
        grid-column: span 3 / span 12;
    }
}

@media (max-width: 767px) {
    .grid,
    .grid-cols-12 {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1.25rem !important;
    }
    .grid-cols-12 > [class*="col-span-"],
    .grid-cols-12 > [class*="md-col-span-"] {
        width: 100% !important;
        grid-column: span 12 / span 12 !important;
    }
}

.card {
    background-color: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}

/* Featured Hero Section */
.featured-card {
    position: relative;
    height: 28rem;
    border-radius: calc(var(--radius) * 1.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .featured-card {
        height: 22rem;
    }
}

.featured-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.featured-card:hover > img {
    transform: scale(1.04);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}

.featured-content {
    position: relative;
    z-index: 10;
    padding: 1.75rem;
    color: #ffffff;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    background-color: var(--primary);
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.badge-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.title-hero {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .title-hero {
        font-size: 1.35rem;
    }
}

/* Horizontal Article Card */
.horizontal-card {
    position: relative;
    height: 13.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

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

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

/* Article Cards Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .article-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }
    .featured-card {
        height: 18rem;
    }
    .featured-content {
        padding: 1.25rem 1rem;
    }
    .title-hero {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    .horizontal-card {
        height: 10.5rem;
    }
}

/* Related Articles Responsive Grid (PC, Tablet, Mobile) */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 991px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .related-articles .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card-image {
    position: relative;
    width: 100%;
    height: 12rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    transition: color 0.2s ease;
}

.post-card-title:hover {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.author-avatar {
    width: 2rem;
    height: 2rem;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    object-fit: cover;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.btn-outline {
    border-color: var(--border);
    background-color: transparent;
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--accent);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background-color: var(--card);
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Mobile Menu Sheet */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}

.mobile-drawer.open {
    display: block;
}

.drawer-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.drawer-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 18rem;
    background-color: var(--card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    border-radius: var(--radius);
    border: 1px solid var(--input);
    background-color: var(--background);
    color: var(--foreground);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

/* Tailwind-style lg:hidden utility: hide hamburger menu on large screens.
   Kept at the end so it wins over .btn-icon's display rule (same specificity). */
@media (min-width: 1025px) {
    .lg\:hidden {
        display: none;
    }
}

/* Theme toggle: always show the icon matching the active theme (pure CSS, no JS flash).
   Use element-qualified selectors so they beat FontAwesome's .fa-solid display rule. */
i.theme-icon-sun {
    display: none;
}

html.dark i.theme-icon-moon {
    display: none;
}

html.dark i.theme-icon-sun {
    display: inline-block;
}

/* Drawer search: stretch to the full width of the mobile sheet */
.drawer-search,
.drawer-search:focus-within {
    width: 100%;
}

/* ============================================================
   NEWSPAPER LAYOUT (masthead, sections bar, ticker, rail)
   ============================================================ */

/* Date strip above the nameplate */
.utility-strip {
    background-color: var(--secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.utility-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 2rem;
    gap: 1rem;
}

.utility-date {
    font-weight: 600;
    white-space: nowrap;
}

.utility-tagline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .utility-tagline {
        display: none;
    }
}

/* Nameplate row */
.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 3.75rem;
}

.masthead-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.masthead-logo {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--foreground);
    line-height: 1;
    white-space: nowrap;
}

.masthead-logo:hover {
    color: var(--foreground);
}

.masthead-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Sections bar: newspaper nav under the nameplate (PC only, hidden on tab & mobile) */
.sections-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background-color: var(--card);
}

@media (max-width: 1024px) {
    .sections-bar {
        display: none !important;
    }
}

.sections-bar .nav-links {
    margin: 0;
    gap: 1.75rem;
    padding: 0.5rem 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.sections-bar .nav-links::-webkit-scrollbar {
    display: none;
}

.sections-bar .nav-link.active::after {
    bottom: -5px;
}

/* Breaking news ticker */
.ticker {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    background-color: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}

.ticker-label {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 0.9rem;
}

.ticker-links {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0.55rem 1rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.ticker-links::-webkit-scrollbar {
    display: none;
}

.ticker-links a {
    color: var(--foreground);
}

.ticker-links a:hover {
    color: var(--primary);
}

.ticker-links a + a::before {
    content: "\00b7";
    margin-right: 1.25rem;
    color: var(--primary);
    font-weight: 800;
}

/* Section header with newspaper double-rule */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-top: 2px solid var(--foreground);
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.section-head-label {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.section-head-link {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .section-head {
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1.15rem;
    }
    .section-head-label {
        font-size: 1.1rem;
    }
    .section-head-link {
        font-size: 0.78rem;
    }
}

/* Alternating shaded section band */
.news-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Secondary story headline (hero column) */
.secondary-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Byline / dateline helpers */
.byline {
    font-weight: 700;
    color: var(--foreground);
    font-size: 0.8rem;
}

.dateline {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.updated-marker {
    color: var(--primary);
    font-weight: 600;
}

/* Lead story meta row */
.featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    margin-top: 1rem;
    gap: 1rem;
}

.featured-meta .byline {
    color: #ffffff;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.featured-meta .dateline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

.featured-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Most Read rail */
.most-read {
    padding: 1.5rem;
}

.most-read-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--foreground);
    margin-bottom: 0.5rem;
}

.most-read-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.most-read-item {
    display: flex;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.most-read-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.most-read-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    min-width: 1.5rem;
}

.most-read-body {
    min-width: 0;
}

.most-read-link {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.most-read-link:hover {
    color: var(--primary);
}

.most-read-meta {
    font-size: 0.72rem;
    color: var(--muted-foreground);
    display: block;
    margin-top: 0.25rem;
}

/* Contributor strip */
.cta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, var(--card) 0%, var(--muted) 100%);
}

.cta-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.cta-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Editorial typography */
.page-heading {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.article-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.15;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.55rem;
    }
}

.article-content {
    font-family: var(--font-display);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Tighter article card footer for byline-based cards */
.post-card-footer {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

@media (max-width: 1024px) {
    .masthead-logo {
        font-size: 1.7rem;
    }
    .masthead {
        height: 3.25rem;
    }
}

/* SEO Editor & Live Social Previews */
.seo-tab-btn:hover {
    color: var(--primary) !important;
}
.seo-editor-container input:focus,
.seo-editor-container textarea:focus,
.seo-editor-container select:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

/* Form Controls & Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.375rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--foreground);
    background-color: var(--background);
    background-clip: padding-box;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--foreground);
    background-color: var(--background);
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

html.dark .form-control:focus {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.form-control::placeholder {
    color: var(--muted-foreground);
    opacity: 0.7;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--muted);
    opacity: 0.7;
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    padding-right: 2.25rem;
}

/* Button Utilities */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    filter: brightness(0.92);
}

.btn-outline {
    background-color: var(--card);
    color: var(--foreground);
    border-color: var(--border);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--foreground);
    border-color: var(--muted-foreground);
}

/* CTA Strip Component */
.cta-strip {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cta-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--foreground);
}

.cta-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

@media (max-width: 768px) {
    .cta-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
        gap: 1rem;
    }
    .cta-strip .btn {
        width: 100%;
    }
}

/* Most Read Rail Component */
.most-read {
    padding: 1.5rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.most-read-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.most-read-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.most-read-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.most-read-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    min-width: 1.5rem;
}

.most-read-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    word-break: break-word;
}

.most-read-link {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--foreground);
}

.most-read-link:hover {
    color: var(--primary);
}

.most-read-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Footer Bottom Legal Bar */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    white-space: nowrap;
    flex-wrap: nowrap;
}

@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    .footer-bottom-links {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
        font-size: 0.75rem;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
}
