/* ============================================
   GRAZ.magazin Theme
   Layout: Magazine Blocks
   Colors: Fresh Green
   Fonts: IBM Plex Serif + IBM Plex Sans
   ============================================ */

/* Variables */
:root {
    --font-display: 'IBM Plex Serif', Georgia, serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --bg: #f8faf8;
    --bg-alt: #eef3ee;
    --text: #1a2e1a;
    --text-muted: #5a6b5a;
    --accent: #2d7a3a;
    --accent-hover: #236b2e;
    --border: #d4e5d4;
    --white: #ffffff;
    --dark: #1a2e1a;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --container: 1200px;
    --gap: 3px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

ul, ol {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.site-logo {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.site-logo span {
    color: var(--accent);
    margin-left: 0.15em;
}

.site-logo:hover {
    color: var(--text);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent);
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s ease;
}

.search-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.search-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    transition: all 0.2s ease;
}

/* ============================================
   HERO BLOCKS (Homepage)
   ============================================ */
.hero-blocks {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--gap);
    padding: var(--gap);
    background: var(--accent);
}

.hero-block {
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.hero-block a {
    display: block;
    height: 100%;
}

.hero-block-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.hero-block:hover .hero-block-img {
    transform: scale(1.03);
}

.hero-block-content {
    position: relative;
    z-index: 1;
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.hero-block.main {
    grid-row: 1 / 3;
    min-height: 500px;
}

.hero-block.secondary {
    min-height: 248px;
}

.hero-block .category-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    opacity: 0.85;
}

.hero-block .block-title {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--white);
}

.hero-block.main .block-title {
    font-size: 2.25rem;
}

.hero-block.secondary .block-title {
    font-size: 1.375rem;
}

.hero-block .block-excerpt {
    margin-top: 12px;
    font-size: 0.9375rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ============================================
   TICKER BAR
   ============================================ */
.ticker-bar {
    padding: 14px 24px;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--accent);
    color: var(--white);
    overflow: hidden;
}

.ticker-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0.7;
}

.ticker-divider {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.ticker-items {
    display: flex;
    gap: 32px;
    overflow: hidden;
}

.ticker-items span {
    white-space: nowrap;
}

/* ============================================
   CONTENT BLOCKS
   ============================================ */
.content-section {
    padding: 48px 24px;
    max-width: var(--container);
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

.section-title {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
}

.section-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
}

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

/* Block Row */
.block-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.block-row.reverse {
    grid-template-columns: 1fr 2fr;
}

/* Block Main (Featured Article) */
.block-main {
    
}

.block-main .article-image {
    height: 300px;
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

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

.block-main:hover .article-image img {
    transform: scale(1.03);
}

.block-main .category-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 8px;
}

.block-main .article-title {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 12px;
}

.block-main .article-title a:hover {
    color: var(--accent);
}

.block-main .article-excerpt {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Block List */
.block-list-header {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--accent);
    color: var(--text);
}

.block-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

.block-list-item .item-image {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.block-list-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-list-item .category-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 4px;
}

.block-list-item .item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.block-list-item .item-title a:hover {
    color: var(--accent);
}

/* ============================================
   ARTICLE CARDS (Grid)
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.article-card {
    
}

.article-card .card-image {
    height: 200px;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

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

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

.article-card .category-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 8px;
}

.article-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.article-card .card-title a:hover {
    color: var(--accent);
}

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

/* ============================================
   SINGLE ARTICLE
   ============================================ */
.article-header {
    text-align: center;
    padding: 48px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.article-header .category-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: 2.75rem;
    margin-bottom: 20px;
}

.article-header .article-meta {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.article-header .article-meta span {
    margin: 0 8px;
}

.article-featured-image {
    max-width: 1000px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.article-featured-image img {
    width: 100%;
    border-radius: var(--radius-md);
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 48px 0 24px;
}

.article-content h3 {
    font-size: 1.375rem;
    margin: 36px 0 16px;
}

.article-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.article-content a {
    color: var(--accent);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--accent-hover);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-content img {
    border-radius: var(--radius-md);
    margin: 32px 0;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-tags a {
    padding: 6px 14px;
    background: var(--bg-alt);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.article-tags a:hover {
    background: var(--accent);
    color: var(--white);
}

/* Related Articles */
.related-articles {
    background: var(--bg-alt);
    padding: 64px 24px;
}

.related-articles .container {
    max-width: var(--container);
    margin: 0 auto;
}

.related-articles h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

/* ============================================
   CATEGORY / ARCHIVE
   ============================================ */
.archive-header {
    padding: 48px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.archive-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.archive-header .archive-description {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.archive-content {
    padding: 48px 24px;
    max-width: var(--container);
    margin: 0 auto;
}

/* ============================================
   SEARCH
   ============================================ */
.search-header {
    padding: 48px 24px;
    text-align: center;
    background: var(--bg-alt);
}

.search-header h1 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.search-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.search-form input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--white);
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-form button {
    padding: 14px 28px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-form button:hover {
    background: var(--accent-hover);
}

.search-results {
    padding: 48px 24px;
    max-width: var(--container);
    margin: 0 auto;
}

.search-results-count {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.no-results {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
    padding: 64px 24px;
    text-align: center;
    background: var(--dark);
    color: var(--white);
}

.newsletter-section h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.newsletter-section p {
    opacity: 0.8;
    margin-bottom: 28px;
}

.newsletter-form {
    display: flex;
    max-width: 450px;
    margin: 0 auto;
    gap: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9375rem;
}

.newsletter-form button {
    padding: 16px 32px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    padding: 64px 24px 40px;
    background: var(--bg-alt);
    color: var(--text);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .site-logo {
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    color: var(--text-muted);
}

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

.footer-col a {
    font-size: 0.875rem;
    color: var(--text);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* ============================================
   PAGE (Static)
   ============================================ */
.page-header {
    padding: 64px 24px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
}

.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.page-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-page {
    text-align: center;
    padding: 100px 24px;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.error-page h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.error-page .btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s ease;
}

.error-page .btn:hover {
    background: var(--accent-hover);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    padding: 16px 24px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: var(--container);
    margin: 0 auto;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs span {
    margin: 0 8px;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .block-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .block-row.reverse {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --gap: 2px;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-blocks {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .hero-block.main {
        grid-row: auto;
        min-height: 350px;
    }
    
    .hero-block.secondary {
        min-height: 200px;
    }
    
    .hero-block.main .block-title {
        font-size: 1.75rem;
    }
    
    .ticker-bar {
        padding: 12px 16px;
        font-size: 0.75rem;
        gap: 16px;
    }
    
    .content-section {
        padding: 32px 16px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-block.main .block-title {
        font-size: 1.5rem;
    }
    
    .hero-block.secondary .block-title {
        font-size: 1.125rem;
    }
    
    .block-list-item {
        flex-direction: column;
    }
    
    .block-list-item .item-image {
        width: 100%;
        height: 160px;
    }
    
    .search-form {
        flex-direction: column;
    }
}
