/* Professional Newspaper Design - dagnytt */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');
 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Wider container for homepage news layout and article layout */
main.container:has(.news-layout) {
    max-width: 1270px;
}

/* Wider containers for header and navigation */
.site-header .container,
.category-nav .container {
    max-width: 1270px;
}

/* Header */
.site-header {
    background: #f8f9fa;
    background: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
    color: #1a1a1a;
    padding: 10px 0;
    border-bottom: 3px solid #c41e3a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.site-title {
    margin: 0;
    line-height: 1;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.site-title a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-title a:hover {
    opacity: 0.8;
}

.site-logo {
    height: 2.0em;
    width: auto;
    display: block;
}

.site-tagline {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-size: 0.9em;
    font-style: italic;
    color: #666;
    letter-spacing: 1px;
    font-weight: 400;
    text-transform: lowercase;
    margin: 0;
    line-height: 1.2;
    text-align: right;
}

/* Category Navigation */
.category-nav {
    background: #34495e;
    background: linear-gradient(180deg, #3d566e 0%, #2c3e50 100%);
    border-bottom: 1px solid #5d6d7e;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.category-toggle {
    display: none;
    width: 100%;
    background: #34495e;
    color: #ecf0f1;
    border: none;
    padding: 12px 20px;
    font-family: 'Arial', sans-serif;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.category-toggle:hover {
    background: #3d566e;
}

.category-toggle .toggle-icon {
    transition: transform 0.3s;
    display: inline-block;
}

.category-toggle.open .toggle-icon {
    transform: rotate(180deg);
}

.category-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    flex: 1;
}

.category-list li {
    margin: 0;
}

.category-list a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: #c41e3a;
    color: #fff;
}

/* Main Layout */
main {
    padding: 30px 0;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Featured Article */
.featured-article {
    border-bottom: 3px solid #1a1a1a;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.featured-article .article-image {
    width: 100%;
    max-width: 100%;
    height: 450px;
    object-fit: cover;
    margin-bottom: 20px;
}

.featured-article .article-title {
    font-size: 2.1em;
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: bold;
}

.featured-article .article-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.featured-article .article-title a:hover {
    color: #c41e3a;
}

.featured-article .article-summary {
    font-size: 1.25em;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-badge {
    background: #c41e3a;
    color: #fff;
    padding: 5px 12px;
    font-size: 0.75em;
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.category-badge.small {
    font-size: 0.7em;
    padding: 3px 8px;
}

.article-date {
    font-size: 0.85em;
    color: #666;
    font-family: 'Arial', sans-serif;
}

.article-author {
    font-size: 0.85em;
    color: #666;
    font-family: 'Arial', sans-serif;
}

.read-more {
    display: inline-block;
    color: #c41e3a;
    font-weight: bold;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    font-size: 0.9em;
}

.read-more:hover {
    text-decoration: underline;
}

/* Recent Articles Grid */
.recent-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.article-card {
    border: 1px solid #ddd;
    transition: box-shadow 0.3s;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-card .card-image {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card .card-content {
    padding: 20px;
}

.article-card .card-title {
    font-size: 1.4em;
    line-height: 1.3;
    margin-bottom: 10px;
}

.article-card .card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.article-card .card-title a:hover {
    color: #c41e3a;
}

.article-card .card-summary {
    font-size: 1.05em;
    color: #666;
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    border-left: 1px solid #ddd;
    padding-left: 30px;
}

.sidebar-section {
    margin-bottom: 40px;
}

.sidebar-title {
    font-size: 1.05em;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Arial', sans-serif;
}

.sidebar-article {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.sidebar-article:last-child {
    border-bottom: none;
}

.sidebar-article h4 {
    font-size: 1.1em;
    line-height: 1.4;
    margin-bottom: 8px;
}

.sidebar-article h4 a {
    color: #1a1a1a;
    text-decoration: none;
}

.sidebar-article h4 a:hover {
    color: #c41e3a;
}

.sidebar-categories {
    list-style: none;
}

.sidebar-categories li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.sidebar-categories li:last-child {
    border-bottom: none;
}

.sidebar-categories a {
    color: #333;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    display: block;
}

.sidebar-categories a:hover {
    color: #c41e3a;
    padding-left: 5px;
    transition: padding 0.2s;
}

/* Newsletter Subscription Box */
.newsletter-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.newsletter-label {
    font-size: 0.95em;
    font-weight: bold;
    margin-bottom: 12px;
    display: block;
    color: #1a1a1a;
}

.newsletter-input-wrapper {
    position: relative;
}

.newsletter-input-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Arial', sans-serif;
    background: #fff;
    transition: all 0.3s;
    box-sizing: border-box;
    color: #1a1a1a;
}

.newsletter-input-wrapper input.invalid {
    color: #999;
}

.newsletter-input-wrapper input:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.1);
}

.newsletter-input-wrapper input.error {
    border-color: #e74c3c;
}

.newsletter-input-wrapper input.success {
    border-color: #27ae60;
}

.newsletter-input-wrapper .email-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    font-size: 1.1em;
}

.newsletter-button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #c41e3a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Arial', sans-serif;
}

.newsletter-button:hover {
    background: #a01828;
}

.newsletter-button:disabled {
    background: #999;
    cursor: not-allowed;
}

.newsletter-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    display: none;
}

.newsletter-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.newsletter-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.newsletter-privacy {
    margin-top: 10px;
    font-size: 0.75em;
    color: #666;
    line-height: 1.4;
}

/* Sun and Moon Information Box */
.sun-moon-box {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.sun-moon-box .sidebar-title {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 0.95em;
    font-weight: bold;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.sun-moon-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sun-info, .moon-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sun-moon-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.sun-moon-icon {
    font-size: 1.2em;
    min-width: 30px;
    text-align: center;
    color: #666;
}

.sun-icon-large {
    font-size: 2em;
    color: #fbbf24;
    min-width: 40px;
}

.sun-moon-details {
    flex: 1;
}

.sun-moon-label {
    font-size: 0.75em;
    color: #666;
    font-weight: 500;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sun-moon-time {
    font-size: 1.1em;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

/* Combined Sun Times */
.sun-times-row {
    display: flex;
    gap: 16px;
}

.sun-time-item {
    flex: 1;
}

/* Moon Phase Emoji */
.moon-emoji {
    font-size: 1.5em;
    line-height: 1;
}

.moon-phase-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.moon-illumination {
    font-size: 1em;
    font-weight: 600;
    color: #1a1a1a;
}

.moon-direction {
    font-size: 0.75em;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.moon-direction i {
    font-size: 0.8em;
}

.moon-direction .fa-arrow-up {
    color: #10b981;
}

.moon-direction .fa-arrow-down {
    color: #f59e0b;
}

.location-selector-wrapper {
    position: relative;
    margin-top: 10px;
}

.sun-moon-location {
    font-size: 0.85em;
    text-align: center;
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Arial', sans-serif;
}

.sun-moon-location:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.sun-moon-location.active {
    border-color: #9ca3af;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.sun-moon-location i {
    font-size: 0.9em;
}

.change-location-icon {
    opacity: 0.5;
    transition: all 0.2s ease;
    font-size: 0.75em;
}

.sun-moon-location:hover .change-location-icon {
    opacity: 0.8;
}

.sun-moon-location.active .change-location-icon {
    transform: rotate(180deg);
}

/* Location Search Dropdown */
.location-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #9ca3af;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 320px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.location-dropdown.active {
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-search-box {
    padding: 12px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.location-search-box input {
    width: 100%;
    padding: 8px 32px 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Arial', sans-serif;
    transition: all 0.2s ease;
    background: #fff;
}

.location-search-box input:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.1);
}

.location-search-icon {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85em;
    color: #9ca3af;
    pointer-events: none;
}

.location-search-results {
    overflow-y: auto;
    max-height: 220px;
}

.location-result-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-result-item:hover {
    background: #f9fafb;
    border-left-color: #9ca3af;
}

.location-result-icon {
    font-size: 0.85em;
    color: #6b7280;
    min-width: 14px;
}

.location-result-name {
    font-size: 0.85em;
    color: #1f2937;
    font-weight: 500;
}

.location-no-results {
    padding: 30px 12px;
    text-align: center;
    color: #6b7280;
    font-size: 0.8em;
}

.location-search-loading {
    padding: 30px 12px;
    text-align: center;
    color: #6b7280;
}

.location-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #9ca3af;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Full Article Page */
.full-article {
    background: #fff;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Article layout (with sidebar) */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-layout .full-article {
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: 1.8em;
    line-height: 1.3;
    margin-bottom: 15px;
}

/* Style H2 article title to look like H1 for SEO compliance */
.article-title-main {
    font-size: 2.15em;
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: bold;
}

.article-lead {
    font-size: 1.3em;
    line-height: 1.7;
    color: #555;
    font-style: italic;
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 4px solid #c41e3a;
}

.article-image-container {
    margin: 0 0 30px 0;
}

.article-main-image {
    width: 100%;
    max-width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.article-image-caption {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    padding: 12px 20px;
    background: #f9f9f9;
    border-left: 3px solid #c41e3a;
    margin-top: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.5;
}

.article-body {
    font-size: 1.2em;
    line-height: 1.8;
    color: #333;
    max-width: 800px;
}

.article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
}

/* Category Page */
.category-header {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.category-header p {
    color: #666;
    font-family: 'Arial', sans-serif;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* When articles-grid is inside a two-column layout with sidebar, use 2 columns */
.news-layout .articles-grid {
    grid-template-columns: repeat(2, 1fr);
}

.articles-grid .card-title {
    font-size: 1.46em;
}

.articles-grid .card-summary {
    font-size: 1.18em;
}

.no-articles {
    background: #fff;
    padding: 40px;
    text-align: center;
    font-size: 1.2em;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    transition: background 0.3s;
}

.btn:hover {
    background: #c41e3a;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    font-family: 'Arial', sans-serif;
}

.site-footer a {
    color: #c41e3a;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    font-size: 0.75em;
    color: #888;
    margin-top: 15px;
    line-height: 1.6;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Terms Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    position: relative;
}

.modal-close {
    color: #666;
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 32px;
    font-weight: bold;
    padding: 10px 20px;
    background: #fff;
    z-index: 10;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover,
.modal-close:focus {
    color: #c41e3a;
}

.legal-document {
    padding: 40px 50px;
    font-family: 'Georgia', serif;
    line-height: 1.8;
    color: #1a1a1a;
}

.legal-document-title {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-document .document-date {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.legal-document h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-document h4 {
    font-size: 1.05em;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 12px;
    color: #1a1a1a;
    letter-spacing: 0.3px;
}

.legal-document p {
    margin-bottom: 15px;
    text-align: justify;
}

.legal-document a {
    color: #c41e3a;
    text-decoration: none;
}

.legal-document a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .legal-document {
        padding: 30px 20px;
    }

    .legal-document-title {
        font-size: 1.4em;
    }

    .legal-document h3 {
        font-size: 1.1em;
    }
    
    .legal-document h4 {
        font-size: 1.0em;
    }
}

/* Share Button */
.article-share {
    text-align: right;
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
}

.share-button {
    background: #c41e3a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-family: 'Arial', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.share-button:hover {
    background: #a01730;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.share-button:active {
    transform: translateY(0);
}

.share-button i {
    font-size: 1.1em;
}

.share-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    display: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    overflow: hidden;
}

.share-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #333;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.share-option:last-child {
    border-bottom: none;
}

.share-option:hover {
    background: #f8f9fa;
    padding-left: 22px;
}

.share-option:first-child {
    border-radius: 10px 10px 0 0;
}

.share-option:last-child {
    border-radius: 0 0 10px 10px;
}

.share-option i {
    width: 22px;
    text-align: center;
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.share-option:hover i {
    transform: scale(1.15);
}

/* Platform-specific colors */
.share-option[data-platform="facebook"]:hover {
    background: rgba(24, 119, 242, 0.08);
}

.share-option[data-platform="facebook"] i {
    color: #1877F2;
}

.share-option[data-platform="twitter"]:hover {
    background: rgba(0, 0, 0, 0.05);
}

.share-option[data-platform="twitter"] i {
    color: #000;
}

.share-option[data-platform="linkedin"]:hover {
    background: rgba(0, 119, 181, 0.08);
}

.share-option[data-platform="linkedin"] i {
    color: #0077B5;
}

.share-option[data-platform="whatsapp"]:hover {
    background: rgba(37, 211, 102, 0.08);
}

.share-option[data-platform="whatsapp"] i {
    color: #25D366;
}

.share-option[data-platform="telegram"]:hover {
    background: rgba(0, 136, 204, 0.08);
}

.share-option[data-platform="telegram"] i {
    color: #0088CC;
}

.share-option[data-platform="reddit"]:hover {
    background: rgba(255, 69, 0, 0.08);
}

.share-option[data-platform="reddit"] i {
    color: #FF4500;
}

.share-option[data-platform="email"]:hover {
    background: rgba(196, 30, 58, 0.08);
}

.share-option[data-platform="email"] i {
    color: #c41e3a;
}

.share-option[data-platform="copy"]:hover {
    background: rgba(108, 117, 125, 0.08);
}

.share-option[data-platform="copy"] i {
    color: #6c757d;
}

.share-option.copied {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.share-option.copied i {
    color: #28a745;
}

/* Share dropdown responsive styles */
@media (max-width: 768px) {
    .article-share {
        text-align: center;
    }

    .share-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 240px;
    }

    .share-dropdown.show {
        animation: slideDownMobile 0.3s ease-out forwards;
    }

    @keyframes slideDownMobile {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }

    .share-option {
        padding: 16px 20px;
        font-size: 1em;
    }

    .share-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Hide Google Translate toolbar and all related elements */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate,
body > .skiptranslate iframe.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-menu-value,
.goog-te-menu-value span,
div#goog-gt-,
.goog-te-spinner-pos {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Prevent Google Translate from adding top margin to body */
body {
    top: 0 !important;
    position: static !important;
}

/* Google Translate element container */
#google_translate_element {
    display: none !important;
    visibility: hidden !important;
}

/* Override any iframe styles from Google Translate */
iframe.goog-te-banner-frame,
iframe.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: flex;
    align-items: center;
}

.language-btn {
    background: transparent;
    border: none;
    color: #ecf0f1;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    font-size: 0.95em;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    cursor: pointer;
    background: #fff;
    border: none;
    width: 100%;
    text-align: left;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option:first-child {
    border-radius: 6px 6px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 6px 6px;
}

.language-option.active {
    background: #c41e3a;
    color: #fff;
}

.language-flag {
    font-size: 1.3em;
    width: 24px;
    text-align: center;
}

.language-name {
    flex: 1;
}

/* Search Box */
.search-container {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* RSS Icon */
.rss-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rss-icon:hover {
    color: #fff;
    transform: scale(1.1);
}

.rss-icon i {
    font-size: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 250px;
    padding: 8px 35px 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Arial', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.5);
    background: #fff;
}

.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    font-size: 0.9em;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 500px;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-title {
    font-weight: bold;
    font-size: 0.95em;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.search-result-meta {
    font-size: 0.75em;
    color: #666;
    margin-bottom: 4px;
}

.search-result-snippet {
    font-size: 0.85em;
    color: #555;
    line-height: 1.4;
}

.search-result-snippet mark {
    background: #fff59d;
    padding: 2px 0;
    font-weight: bold;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.search-view-all {
    padding: 12px 16px;
    text-align: center;
    background: #f9f9f9;
    border-top: 2px solid #ddd;
    font-weight: bold;
    color: #c41e3a;
    cursor: pointer;
    border-radius: 0 0 6px 6px;
}

.search-view-all:hover {
    background: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 968px) {
    .news-layout,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-left: none;
        border-top: 2px solid #ddd;
        padding-left: 0;
        padding-top: 30px;
    }

    .articles-grid,
    .news-layout .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile category navigation */
    .category-nav .container {
        flex-direction: column;
        gap: 10px;
    }

    .category-toggle {
        display: flex;
        width: 100%;
    }

    .category-list {
        display: none;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .category-list.open {
        display: flex;
        max-height: 500px;
        transition: max-height 0.3s ease-in;
    }

    .category-list li {
        width: 100%;
        border-top: 1px solid #444;
    }

    .category-list a {
        width: 100%;
        text-align: left;
    }

    .search-container {
        width: 100%;
    }

    .language-selector {
        order: -1;
    }

    .language-dropdown {
        left: 0;
        right: auto;
    }

    .rss-icon {
        width: 36px;
        height: 36px;
    }

    .rss-icon i {
        font-size: 18px;
    }

    .search-box input {
        width: 100%;
    }

    .search-dropdown {
        left: 0;
        right: 0;
        min-width: auto;
    }
}

@media (max-width: 640px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }

    .header-content {
        flex-direction: column;
        gap: 3px;
    }

    .site-logo {
        height: 1.8em;
    }

    .site-tagline {
        font-size: 0.65em;
        letter-spacing: 1px;
        text-align: center;
    }

    .site-header {
        padding: 6px 0 3px 0;
    }

    .news-layout {
        padding: 15px;
    }

    .category-header {
        padding: 15px;
        margin-bottom: 15px;
    }

    .category-header h2 {
        font-size: 1.8em;
    }

    .recent-articles-grid,
    .articles-grid,
    .news-layout .articles-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .featured-article .article-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 300px;
    }

    .featured-article .article-title {
        font-size: 1.3em;
        line-height: 1.3;
    }

    .article-card .card-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 250px;
    }

    .category-list {
        flex-direction: column;
    }

    .full-article {
        padding: 20px 15px;
    }

    .article-layout {
        padding: 15px;
    }

    .article-layout .full-article {
        padding: 0;
    }

    .article-header h1 {
        font-size: 1.5em;
    }

    .article-main-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
    }

    .article-share {
        text-align: center;
    }

    .share-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Lazy Loading Styles */
.articles-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.articles-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 1em;
    font-family: 'Georgia', serif;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c41e3a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.articles-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
}
