/* ===== CSS Reset W3C-Compliant ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== VARIABLES CSS CUSTOM ===== */
:root {
    --primary-color: #1a5319;
    --secondary-color: #2e7d32;
    --accent-color: #4caf50;
    --light-bg: #f8fbf8;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #c8e6c9;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --radius: 8px;
}

/* ===== BASE STYLES ===== */
html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    position: relative;
    padding-bottom: 0.75rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* ===== LAYOUT COMPONENTS ===== */
.site-header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 3rem;
}

.site-main {
    flex: 1;
    margin-bottom: 3rem;
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
    margin-top: 3rem;
    color: #666;
}

/* ===== SECTIONS & CARDS ===== */
section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.passions-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.passions-list li {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #f9f9f9;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.project-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
}

.hike-article {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.hike-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ===== UTILITY CLASSES ===== */
.hike-meta {
    background: #f1f8e9;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid var(--accent-color);
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #555;
}

.hike-meta p {
    margin: 0.25rem 0;
}

.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;
}

/* ===== LINKS & BUTTONS ===== */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: var(--primary-color);
    text-decoration: underline;
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.button:hover,
.button:focus {
    background: var(--primary-color);
    text-decoration: none;
}

.navigation-actions {
    text-align: center;
    margin-top: 2rem;
}

/* ===== RESPONSIVE MEDIA CONTAINERS ===== */
.media-container {
    margin: 2rem 0;
}

/* Responsive iframe wrapper - FIX PER MAPPE */
.iframe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px var(--shadow-color);
}

.iframe-container::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Video styling */
video {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: #000;
}

/* Figure & Figcaption */
figure {
    margin: 1.5rem 0;
}

figcaption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 0 15px;
    }
    
    section {
        padding: 1.5rem;
    }
    
    .passions-list {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .iframe-container::before {
        padding-top: 75%; /* 4:3 per mobile */
    }
}

@media (min-width: 1200px) {
    body {
        padding: 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        color: black;
        max-width: 100%;
    }
    
    .site-header,
    .site-footer {
        border: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .iframe-container,
    video,
    .button {
        display: none;
    }
    
    .hike-meta {
        border: 1px solid #ccc;
    }
}