/* ===================================
   Café International Adliswil
   Base Styles
   =================================== */

/* CSS Variables - from STYLEGUIDE.md */
:root {
    /* Colors - Updated to align with parent church branding */
    --cream: #f8f9fa;           /* Light gray background */
    --brand-green: #1a4d7a;     /* Deep blue (primary color) */
    --terracotta: #d4a54a;      /* Warm gold (secondary accent) */
    --text-dark: #2B2B2B;
    --text-light: #FFF;
    --text-muted: #666;
    --gray-line: #E0E0E0;
    
    /* Typography */
    --font-heading: 'Poppins', 'Open Sans', -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
    --font-body: 'Roboto', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing scale (multiples of 8px) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    
    /* Layout */
    --max-width: 1200px;
    --gutter: 1.5rem;
    
    /* Breakpoints (used in media queries) */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
}

/* ===================================
   Reset & Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--cream);
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--space-2);
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--space-2);
}

a {
    color: var(--brand-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--terracotta);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--brand-green);
    outline-offset: 2px;
}

/* ===================================
   Layout
   =================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-green);
    color: var(--text-light);
    padding: var(--space-1) var(--space-2);
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ===================================
   Header & Navigation
   =================================== */

header[role="banner"] {
    background-color: var(--text-light);
    border-bottom: 2px solid var(--gray-line);
    padding: var(--space-3) 0;
}

.site-title {
    color: var(--brand-green);
    font-size: 1.75rem;
    margin-bottom: var(--space-2);
}

nav[aria-label="Hauptnavigation"] ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

nav[aria-label="Hauptnavigation"] a {
    color: var(--text-dark);
    font-weight: 500;
    padding: var(--space-1);
}

nav[aria-label="Hauptnavigation"] a:hover,
nav[aria-label="Hauptnavigation"] a:focus {
    color: var(--brand-green);
}

nav[aria-label="Hauptnavigation"] a[aria-current="page"] {
    color: var(--brand-green);
    font-weight: 600;
    border-bottom: 2px solid var(--brand-green);
}

/* ===================================
   Main Content Sections
   =================================== */

main {
    min-height: 60vh;
}

section {
    padding: var(--space-5) 0;
}

.content-section {
    margin-bottom: var(--space-4);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    background-color: var(--brand-green);
    color: var(--text-light);
    padding: var(--space-6) 0;
    margin-bottom: var(--space-4);
}

.hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.hero-text {
    padding: var(--space-3);
    background: linear-gradient(to bottom, rgb(26 77 122 / 90%), rgb(26 77 122 / 95%));
    text-align: center;
}

.hero-text h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 0;
    color: var(--text-light);
}

/* ===================================
   Events Section
   =================================== */

.events {
    background-color: var(--text-light);
}

#events-list {
    display: grid;
    gap: var(--space-2);
}

.event-item {
    padding: var(--space-3);
    border-left: 4px solid var(--brand-green);
    background-color: var(--cream);
}

.event-date {
    font-weight: 600;
    color: var(--brand-green);
    font-size: 1.1rem;
}

.event-title {
    font-size: 1.25rem;
    margin: var(--space-1) 0;
}

.event-time {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===================================
   Gallery
   =================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-3);
}

.gallery-grid figure {
    margin: 0;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.gallery-grid figcaption {
    padding: var(--space-1) 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===================================
   Forms
   =================================== */

.contact-form {
    max-width: 600px;
    margin-top: var(--space-4);
}

.form-group {
    margin-bottom: var(--space-3);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-2);
    border: 2px solid var(--gray-line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-green);
}

button[type="submit"] {
    background-color: var(--brand-green);
    color: var(--text-light);
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button[type="submit"]:hover,
button[type="submit"]:focus {
    background-color: var(--terracotta);
}

button[type="submit"]:focus {
    outline: 2px solid var(--brand-green);
    outline-offset: 2px;
}

/* ===================================
   Donation Section
   =================================== */

.donation-section {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background-color: var(--text-light);
    border-radius: 4px;
}

.twint-placeholder {
    padding: var(--space-4);
    background-color: var(--gray-line);
    text-align: center;
    border-radius: 4px;
    margin: var(--space-2) 0;
}

/* ===================================
   Footer
   =================================== */

footer[role="contentinfo"] {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: var(--space-5) 0 var(--space-3);
    margin-top: var(--space-6);
}

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

footer h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: var(--space-2);
}

footer address {
    font-style: normal;
    line-height: 1.6;
}

footer a {
    color: var(--text-light);
}

footer a:hover,
footer a:focus {
    color: var(--terracotta);
}

.footer-legal {
    text-align: center;
    padding-top: var(--space-3);
    border-top: 1px solid rgb(255 255 255 / 20%);
    font-size: 0.9rem;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet and below */
@media (width <= 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    nav[aria-label="Hauptnavigation"] ul {
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .hero-text h2 {
        font-size: 1.25rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (width <= 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Desktop - increase spacing */
@media (width >= 1024px) {
    .hero-text h2 {
        font-size: 2rem;
    }
}

/* ===================================
   Accessibility
   =================================== */

/* High contrast focus states are already defined above */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles */
@media print {
    header[role="banner"],
    footer[role="contentinfo"],
    .skip-link {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}
