/*
Theme Name: Taastrup Sortkrudtsskytter
Theme URI: https://taastrup-sortkrudt.dk
Author: Taastrup Sortkrudtsskytter
Description: Tema til Taastrup Sortkrudtsskytter - historisk skydning med sortkrudt
Version: 1.0.0
License: GPL v2 or later
Text Domain: sortkrudt
*/

/* ============================================
   Farvepalette - Skov & Kobber
   ============================================ */
:root {
    --color-forest: #1e3a2f;
    --color-pine: #2d4f3e;
    --color-moss: #3d6b4f;
    --color-sage: #5a8a6a;
    --color-copper: #b87333;
    --color-bronze: #cd7f32;
    --color-gold: #d4a03c;
    --color-ivory: #fdfbf7;
    --color-cream: #f7f3eb;
    --color-sand: #e8e0d0;
    --color-stone: #d5cbb8;
    --color-text: #2a2a28;
    --color-text-muted: #6b6860;
    --color-white: #ffffff;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --max-width: 1200px;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(30, 58, 47, 0.06);
    --shadow-md: 0 8px 24px rgba(30, 58, 47, 0.1);
    --shadow-lg: 0 16px 48px rgba(30, 58, 47, 0.15);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-ivory);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-pine);
    text-decoration: none;
    transition: all 0.25s ease;
}
a:hover { color: var(--color-copper); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.25;
    color: var(--color-forest);
    margin: 0 0 0.75em;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1.25em; }

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section { padding: var(--spacing-xl) 0; }
.section--cream { background: var(--color-cream); }
.section--forest { background: var(--color-forest); color: var(--color-ivory); }

/* Header */
.site-header {
    background: var(--color-ivory);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-sand);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-branding { display: flex; align-items: center; gap: var(--spacing-sm); }
.site-logo { width: 48px; height: 48px; }
.site-title {
    display: none;
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--color-copper); }
.site-tagline { display: none; }

.main-navigation { display: flex; align-items: center; }
.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
.nav-menu a {
    display: block;
    padding: 0.6rem 1.1rem;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.25s ease;
}
.nav-menu a:hover, .nav-menu .current-menu-item a {
    background: var(--color-forest);
    color: var(--color-white);
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--color-forest);
    color: var(--color-forest);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
}

/* Hero */
.hero {
    background: var(--color-forest);
    color: var(--color-ivory);
    padding: var(--spacing-md) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grain texture */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.18;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

/* Vignette */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 85% 65% at 50% 50%, transparent 30%, rgba(40, 30, 25, 0.35) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-logo {
    max-width: 550px;
    width: 100%;
    height: auto;
    margin-bottom: var(--spacing-xs);
    filter: drop-shadow(0 0 60px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
}

@media (max-width: 768px) {
    .hero-logo {
        max-width: 300px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xs);
}
.hero-badge::before { content: '⚜'; font-size: 0.9rem; }

.hero h1 {
    display: none;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    gap: 0.5rem;
}

.btn--primary {
    background: var(--color-copper);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(184, 115, 51, 0.35);
}
.btn--primary:hover {
    background: var(--color-bronze);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    margin-left: var(--spacing-sm);
}
.btn--outline:hover {
    background: var(--color-white);
    color: var(--color-forest);
}

/* Main Content Grid */
.main-content-section {
    background: var(--color-cream);
    padding: var(--spacing-md) 0 var(--spacing-lg);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    align-items: start;
}

.panel {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel__header {
    margin: 0;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-white);
}
.panel__header--calendar { background: var(--color-forest); }
.panel__header--news { background: var(--color-copper); }

.panel__empty {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--color-text-muted);
}
.panel__empty p { margin: 0; }

/* Skydekalender */
.skydekalender { display: flex; flex-direction: column; gap: 0; }

.skydedag {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.875rem 1.25rem;
    transition: all 0.25s ease;
    border-bottom: 1px solid var(--color-cream);
    border-left: 3px solid var(--color-moss);
}
.skydedag:last-child { border-bottom: none; }
.skydedag:hover { background: var(--color-cream); }

.skydedag--aflyst { border-left-color: #dc3545; opacity: 0.7; }
.skydedag--aflyst .skydedag__weekday,
.skydedag--aflyst .skydedag__location { text-decoration: line-through; opacity: 0.6; }
.skydedag--aendret { border-left-color: #ffc107; }

.skydedag__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 0.4rem;
    background: var(--color-forest);
    border-radius: var(--radius);
    color: var(--color-white);
}
.skydedag__day { font-size: 1.35rem; font-weight: 700; line-height: 1; font-family: var(--font-display); }
.skydedag__month { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }

.skydedag__info { flex: 1; }
.skydedag__weekday { font-weight: 600; font-size: 0.95rem; color: var(--color-forest); margin-bottom: 0.15rem; }
.skydedag__location { font-size: 0.85rem; color: var(--color-text-muted); }

.skydedag__note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: #856404;
}
.skydedag--aflyst .skydedag__note { background: #f8d7da; color: #721c24; }

.skydedag__status { display: flex; align-items: center; }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge--normal { background: #d4edda; color: #155724; width: 32px; height: 32px; padding: 0; }
.status-badge--aflyst { background: #f8d7da; color: #721c24; }
.status-badge--aendret { background: #fff3cd; color: #856404; }

/* News List */
.news-list { list-style: none; margin: 0; padding: 0; }

.news-item { border-bottom: 1px solid var(--color-cream); }
.news-item:last-child { border-bottom: none; }
.news-item:first-child .news-item__link { background: linear-gradient(90deg, rgba(184, 115, 51, 0.1), transparent); }

.news-item__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
}
.news-item__link:hover { background: var(--color-cream); color: var(--color-forest); }
.news-item__link:hover .news-item__arrow { transform: translateX(4px); color: var(--color-copper); }

.news-item__date {
    flex-shrink: 0;
    min-width: 55px;
    padding: 0.25rem 0.5rem;
    background: var(--color-pine);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    text-align: center;
}
.news-item:first-child .news-item__date { background: var(--color-copper); }

.news-item__title { flex: 1; font-weight: 500; font-size: 0.95rem; line-height: 1.3; }
.news-item:first-child .news-item__title { font-weight: 600; color: var(--color-forest); }

.news-item__arrow { flex-shrink: 0; font-size: 1rem; color: var(--color-stone); transition: all 0.2s ease; }

.news-item:first-child .news-item__title::after {
    content: 'NY';
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.35rem;
    background: var(--color-copper);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 3px;
    vertical-align: middle;
}

/* CTA Section */
.cta-section {
    background: var(--color-forest);
    color: var(--color-ivory);
    padding: var(--spacing-lg) 0;
    text-align: center;
}
.cta-section h2 { color: var(--color-white); font-size: 1.5rem; margin-bottom: 0.5em; }
.cta-section p { opacity: 0.9; max-width: 600px; margin: 0 auto var(--spacing-md); }

/* Page Content */
.page-header {
    background: linear-gradient(160deg, var(--color-forest), var(--color-pine));
    color: var(--color-ivory);
    padding: var(--spacing-lg) 0;
    text-align: center;
}
.page-header h1 { color: var(--color-white); margin-bottom: 0; }

.page-content { padding: var(--spacing-lg) 0 var(--spacing-xl); }
.page-content .container { max-width: 800px; }

.content-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

/* Tables */
.training-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.training-table th, .training-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--color-sand);
}
.training-table th {
    background: var(--color-forest);
    color: var(--color-white);
    font-family: var(--font-display);
    font-weight: 400;
}
.training-table tr:last-child td { border-bottom: none; }
.training-table tr:hover td { background: var(--color-cream); }

/* Footer */
.site-footer {
    background: var(--color-forest);
    color: var(--color-ivory);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    font-family: var(--font-display);
    color: var(--color-gold);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}
.footer-section p, .footer-section li { opacity: 0.75; font-size: 0.9rem; line-height: 1.6; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 0.4rem; }
.footer-section a { color: var(--color-ivory); opacity: 0.75; }
.footer-section a:hover { opacity: 1; color: var(--color-gold); }

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    :root { --spacing-lg: 3rem; --spacing-xl: 4rem; }
    body { font-size: 16px; }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .menu-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--color-sand);
        box-shadow: var(--shadow-md);
    }
    .nav-menu.is-open { display: flex; }
    .nav-menu a { padding: 0.875rem 1rem; }
    
    .btn--outline { margin-left: 0; margin-top: var(--spacing-sm); }
    
    .content-grid { grid-template-columns: 1fr; }
    
    .skydedag { flex-wrap: wrap; gap: 0.75rem; }
    .skydedag__date { min-width: 45px; }
    .skydedag__status { width: 100%; justify-content: flex-end; margin-top: -0.25rem; }
    .skydedag__weekday { font-size: 0.9rem; }
    .skydedag__location { font-size: 0.85rem; }
    
    .content-box { padding: var(--spacing-md); }
}

/* WordPress Core */
.alignleft { float: left; margin: 0 var(--spacing-md) var(--spacing-sm) 0; }
.alignright { float: right; margin: 0 0 var(--spacing-sm) var(--spacing-md); }
.aligncenter { display: block; margin: 0 auto var(--spacing-md); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--color-text-muted); font-style: italic; margin-top: var(--spacing-xs); }

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.7s ease forwards; opacity: 0; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.35s; }

a:focus, button:focus { outline: 2px solid var(--color-copper); outline-offset: 2px; }
::selection { background: var(--color-copper); color: var(--color-white); }
