/* Moghrey Mie Enhanced CSS - Better Responsive Design & Accessibility */
:root {
    /* Isle of Man Color Palette */
    --iom-red: #CE1126;
    --iom-gold: #B8860B;
    --iom-navy: #1a365d;
    --celtic-green: #228B22;
    --parchment: #F5F5DC;
    --slate: #2D3748;
    --text-gray: #4A5568;
    --border-light: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Georgia', 'Times New Roman', serif;
    --font-mono: 'Courier New', monospace;
    
    /* Breakpoints */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--slate);
    background: #fafafa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Skip to Main Content Link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--iom-red);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    top: 0;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--breakpoint-xl);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header Improvements */
.header {
    background: var(--iom-navy);
    color: white;
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(26, 54, 93, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
}

.logo:focus {
    outline: 2px solid var(--iom-gold);
    outline-offset: 4px;
    border-radius: 4px;
}

.triskelion {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--iom-gold);
    margin: 0;
}

.tagline {
    font-size: 0.9rem;
    color: #cbd5e0;
    margin-top: var(--space-xs);
}

/* Navigation Improvements */
.nav {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    background: var(--iom-gold);
    color: var(--iom-navy);
    transform: translateY(-2px);
}

.nav a:focus {
    outline: 2px solid var(--iom-gold);
    outline-offset: 2px;
    background: var(--iom-gold);
    color: var(--iom-navy);
}

.nav a.active {
    background: var(--iom-gold);
    color: var(--iom-navy);
    font-weight: bold;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--iom-red);
    border-radius: 50%;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: 4px;
}

.nav-toggle:focus {
    outline: 2px solid var(--iom-gold);
    outline-offset: 2px;
}

/* Hero Section Improvements */
.hero {
    background: linear-gradient(135deg, var(--iom-red), var(--iom-navy));
    color: white;
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '🇮🇲';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.1;
    transform: rotate(15deg);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-signup {
    display: inline-flex;
    gap: 1rem;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.newsletter-signup input {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    min-width: 250px;
}

.newsletter-signup button {
    background: var(--iom-gold);
    color: var(--iom-navy);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.newsletter-signup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Main content */
.main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 2rem 0;
}

.content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget h3 {
    color: var(--iom-navy);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.widget a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
}

.widget a:hover {
    color: var(--iom-gold);
}

/* Article styles */
.article {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

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

.article-header {
    margin-bottom: 1rem;
}

.article-category {
    display: inline-block;
    background: var(--iom-gold);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.article-title {
    font-size: 1.8rem;
    color: var(--iom-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: var(--iom-gold);
}

.article-meta {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.sources {
    background: var(--parchment);
    padding: 1rem;
    border-left: 4px solid var(--iom-gold);
    margin-top: 1rem;
    border-radius: 0 4px 4px 0;
}

.sources h4 {
    color: var(--iom-navy);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sources a {
    color: var(--iom-red);
    text-decoration: none;
    font-size: 0.9rem;
}

.sources a:hover {
    text-decoration: underline;
}

/* AdSense placeholders */
.ad-slot {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
    color: #999;
    font-style: italic;
    border-radius: 4px;
}

.ad-header { min-height: 90px; }
.ad-sidebar { min-height: 250px; }
.ad-footer { min-height: 90px; }
.ad-article { min-height: 150px; }

/* Footer */
.footer {
    background: var(--slate);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--iom-gold);
    margin-bottom: 1rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.footer-section a:hover {
    color: var(--iom-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .newsletter-signup {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-signup input {
        min-width: auto;
        width: 100%;
    }
    
    .article-title {
        font-size: 1.4rem;
    }
}