/* ===================================
   AcademicNews - Professional News Portal
   Wagtail CMS Version
   =================================== */

/* CSS Variables - Light Theme (Default) */
:root {
    /* Primary Colors */
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2744;
    --accent-color: #e53e3e;
    --accent-light: #fc8181;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --bg-dark: #1a202c;

    /* Text Colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --text-inverse: #ffffff;

    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    --border-dark: #cbd5e0;

    /* Category Colors */
    --cat-politics: #1a365d;
    --cat-tech: #2b6cb0;
    --cat-world: #2f855a;
    --cat-academic: #6b46c1;
    --cat-culture: #b7791f;
    --cat-sports: #c53030;
    --cat-health: #00a0a0;
    --cat-environment: #276749;
    --cat-education: #dd6b20;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --container-max: 1400px;
    --header-height: 70px;
    --ticker-height: 40px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-tertiary: #4a5568;
    --bg-dark: #171923;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --text-light: #718096;
    --border-color: #4a5568;
    --border-light: #2d3748;
    --border-dark: #718096;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ===================================
   Reset & Base Styles
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: none;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
}

/* Container */
.container-xl {
    max-width: var(--container-max);
}

/* ===================================
   Top Bar
   =================================== */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--text-inverse);
    padding: 8px 0;
    font-size: 0.8125rem;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.8);
}

.top-bar a:hover {
    color: white;
}

.social-link {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color var(--transition-fast);
}

.social-link:hover {
    background-color: var(--accent-color);
}

/* ===================================
   Header
   =================================== */
.main-header {
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-normal);
}

.main-header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.logo-accent {
    color: var(--accent-color);
}

/* Navigation */
.main-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    border-radius: 4px;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.main-nav .nav-link i {
    font-size: 0.625rem;
    transition: transform var(--transition-fast);
}

.main-nav .nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

/* Live Link */
.live-badge {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    animation: pulse-badge 1.5s infinite;
    display: inline-block;
    margin-right: 4px;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mega Dropdown */
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: var(--z-dropdown);
    min-width: 700px;
    padding: 25px;
}

.nav-item.has-dropdown:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-column h4 {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--text-primary);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.dropdown-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-column ul li a {
    display: block;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.dropdown-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

/* Header Actions */
.action-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.action-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.member-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    transition: background-color var(--transition-fast);
}

.member-btn:hover {
    background-color: var(--primary-light);
    color: white;
}

/* ===================================
   Ticker Bar
   =================================== */
.ticker-bar {
    background-color: var(--primary-color);
    color: white;
    height: var(--ticker-height);
    overflow: hidden;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    background-color: var(--accent-color);
    height: 100%;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 30px;
    animation: ticker-scroll 30s linear infinite;
    padding: 0 20px;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.875rem;
}

.ticker-name {
    font-weight: 600;
    opacity: 0.9;
}

.ticker-value {
    font-weight: 700;
}

.ticker-change {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
}

.ticker-change.up {
    color: #48bb78;
}

.ticker-change.down {
    color: #fc8181;
}

/* ===================================
   Breaking News Bar
   =================================== */
.breaking-news-bar {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    color: white;
    height: 36px;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.breaking-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    background-color: #742a2a;
    height: 100%;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    animation: pulse-animation 1.5s ease-in-out infinite;
}

@keyframes pulse-animation {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.breaking-news-track {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    white-space: nowrap;
}

.breaking-news-track.scrolling {
    animation: breaking-scroll linear infinite;
}

.breaking-news-track:hover {
    animation-play-state: paused;
}

@keyframes breaking-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.breaking-news-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

a.breaking-news-item {
    text-decoration: none;
    color: white;
}

.breaking-news-item:hover {
    opacity: 0.85;
    color: #ffd700;
    transform: scale(1.02);
}

.news-time {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.news-title {
    font-weight: 500;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-source {
    font-size: 0.6875rem;
    opacity: 0.7;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.news-divider {
    opacity: 0.3;
    font-size: 0.75rem;
}

.loading-news {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ===================================
   Ad Banners
   =================================== */
.ad-banner {
    padding: 15px 0;
    background-color: var(--bg-secondary);
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    height: 90px;
    max-width: 728px;
    margin: 0 auto;
}

.sidebar-ad .ad-placeholder {
    height: 250px;
    max-width: 100%;
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    margin-bottom: 40px;
}

.hero-image-wrapper {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: white;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.category-badge.small {
    padding: 4px 10px;
    font-size: 0.6875rem;
}

.category-badge.tech { background-color: var(--cat-tech); }
.category-badge.world { background-color: var(--cat-world); }
.category-badge.academic { background-color: var(--cat-academic); }
.category-badge.culture { background-color: var(--cat-culture); }
.category-badge.sports { background-color: var(--cat-sports); }
.category-badge.health { background-color: var(--cat-health); }
.category-badge.environment { background-color: var(--cat-environment); }
.category-badge.education { background-color: var(--cat-education); }

/* Source Badge for RSS Articles */
.source-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--text-muted);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 4px;
    margin-left: 5px;
    margin-bottom: 10px;
}

.source-badge.small {
    padding: 3px 8px;
    font-size: 0.625rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.hero-excerpt {
    font-size: 1.0625rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 800px;
}

.hero-meta {
    display: flex;
    gap: 20px;
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===================================
   Category Sections
   =================================== */
.category-block {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2,
.section-header h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-header h2 i,
.section-header h3 i {
    color: var(--accent-color);
}

.see-all {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.see-all:hover {
    color: var(--primary-color);
}

.featured-article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.featured-article h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0;
    color: var(--text-primary);
}

.featured-article p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    border-bottom: 1px solid var(--border-light);
}

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

.article-list li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    transition: all var(--transition-fast);
}

.article-list li a:hover {
    background-color: var(--bg-secondary);
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 4px;
}

.list-number {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 25px;
}

.list-title {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-primary);
}

/* ===================================
   Live Wars Section
   =================================== */
.live-wars-section {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
}

.section-header.live {
    border-bottom-color: var(--accent-color);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.live-map {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.live-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
}

.conflict-zone {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zone-marker {
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.3);
    animation: pulse-marker 1.5s infinite;
}

@keyframes pulse-marker {
    0%, 100% { box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.3); }
    50% { box-shadow: 0 0 0 10px rgba(229, 62, 62, 0.1); }
}

.zone-label {
    margin-top: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

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

.timeline-time {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 45px;
}

.timeline-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.timeline-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.urgency-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
    animation: pulse-badge 1.5s infinite;
}

/* ===================================
   News Cards
   =================================== */
.news-card {
    background-color: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    height: 100%;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

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

.news-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 10px 0;
}

.news-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.news-card .meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ===================================
   Sidebar
   =================================== */
.sidebar-section {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

/* Opinion Section */
.opinion-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: background-color var(--transition-fast);
    margin-bottom: 10px;
}

.opinion-item:hover {
    background-color: var(--bg-secondary);
}

.opinion-item:last-child {
    margin-bottom: 0;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.opinion-content h4 {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}

/* Trending Section */
.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: trending;
}

.trending-list li {
    border-bottom: 1px solid var(--border-light);
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-list li a {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 0;
}

.trending-list li a:hover {
    background-color: var(--bg-secondary);
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 4px;
}

.trend-rank {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--border-dark);
    min-width: 30px;
}

.trending-list li:nth-child(-n+3) .trend-rank {
    color: var(--accent-color);
}

.trend-title {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Authors Grid */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
    border-radius: 8px;
    transition: background-color var(--transition-fast);
}

.author-card:hover {
    background-color: var(--bg-secondary);
}

.author-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.author-card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.newsletter-content {
    text-align: center;
}

.newsletter-content i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.newsletter-content h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: 10px;
    color: white;
}

.newsletter-content p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    margin-bottom: 10px;
}

.newsletter-form button {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.newsletter-form button:hover {
    background-color: var(--accent-light);
}

/* ===================================
   Footer
   =================================== */
.main-footer {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    margin-top: 40px;
}

.footer-main {
    padding: 50px 0 40px;
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.footer-column ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    margin-right: 10px;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-apps {
    padding: 25px 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    transition: background-color var(--transition-fast);
}

.app-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.app-btn i {
    font-size: 1.75rem;
}

.app-btn small {
    display: block;
    font-size: 0.6875rem;
    opacity: 0.8;
}

.app-btn strong {
    font-size: 0.9375rem;
}

.footer-bottom {
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-right: 25px;
}

.footer-links a:hover {
    color: white;
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: var(--z-sticky);
    border: none;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* ===================================
   Wagtail Specific Overrides
   =================================== */
.wagtail-userbar {
    z-index: 9999 !important;
}

/* Article Body from Wagtail */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-body blockquote {
    font-style: italic;
    color: var(--text-secondary);
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 1.5rem 0;
}

.article-body h2, .article-body h3, .article-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Wagtail Card Styles */
.card {
    background-color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
}

.card-text {
    color: var(--text-secondary);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1200px) {
    .hero-image {
        height: 400px;
    }
}

@media (max-width: 992px) {
    .top-bar {
        display: none;
    }

    .hero-image {
        height: 350px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-excerpt {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero-image {
        height: 300px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-overlay {
        padding: 20px;
    }

    .ticker-bar,
    .breaking-news-bar {
        display: none;
    }

    .member-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-image {
        height: 250px;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .main-header,
    .ticker-bar,
    .ad-banner,
    .main-footer,
    .back-to-top,
    .sidebar-section {
        display: none !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
