/* Style dla aplikacji "Gdzie Zupa?" - przyjazny, zielony design zgodny z WCAG */

:root {
    --primary-green: #2e7d32;
    --primary-green-dark: #1b5e20;
    --focus-yellow: #ffd600;
    --focus-yellow-dark: #ff8f00;
    --light-green: #66bb6a;
    --very-light-green: #e8f5e8;
    --text-dark: #1b5e20;
    --text-medium: #2e7d32;
    --bg-light: #f1f8e9;
    --bg-very-light: #f9fbe7;
    --border-green: #81c784;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--very-light-green) 100%);
    min-height: 100vh;
}

/* Header - ciepły, przyjazny zielony */
.header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: white;
    padding: 24px 0;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.3);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    pointer-events: none;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: "🥄";
    font-size: 32px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Nawigacja - ciepła i przyjazna */
.nav {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Hamburger menu button - ukryty na desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:focus {
    outline: 4px solid var(--focus-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--focus-yellow-dark);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Hamburger icon */
.menu-toggle::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    box-shadow: 
        0 -6px 0 white,
        0 6px 0 white;
    transition: all 0.3s ease;
}

.menu-toggle.menu-open::before {
    transform: rotate(45deg);
    box-shadow: 0 0 0 white;
}

.menu-toggle.menu-open::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    transform: rotate(-45deg);
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
    display: block;
    text-align: center;
}

.nav a:hover, .nav a:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Oznaczenie aktualnej strony */
.nav a.current-page {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.nav a.current-page::before {
    content: '👉 ';
}

/* Główny kontener */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Obszar treści - ciepły i przytulny */
.content {
    background: white;
    padding: 48px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.15);
    border: 3px solid var(--border-green);
    position: relative;
    overflow: hidden;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--light-green), var(--border-green), var(--light-green), var(--primary-green));
}

/* Typografia - przyjazna i czytelna */
.content h1 {
    color: var(--text-dark);
    margin-bottom: 24px;
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(46, 125, 50, 0.1);
}

.content h2 {
    color: var(--primary-green);
    margin: 36px 0 20px;
    font-size: 1.6em;
    font-weight: 600;
    border-left: 4px solid var(--light-green);
    padding-left: 20px;
}

.content h3 {
    color: var(--text-dark);
    margin: 28px 0 16px;
    font-size: 1.3em;
    font-weight: 600;
}

.content p {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.1em;
    line-height: 1.7;
}

.content a {
    color: var(--primary-green);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.content a:hover, .content a:focus {
    color: var(--text-dark);
    text-decoration-thickness: 2px;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 3px solid var(--border-green);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.2);
    margin: 20px 0;
}

/* Listy - uporządkowane i czytelne */
.content ul, .content ol {
    margin: 20px 0 20px 30px;
    color: var(--text-dark);
}

.content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Przyciski - przyjazne i dostępne */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn:hover, .btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
}

/* Stopka - ciepła i przyjazna */
.footer {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    color: white;
    text-align: center;
    padding: 32px 20px;
    margin-top: 60px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--light-green), var(--border-green), var(--primary-green), var(--border-green), var(--light-green));
}

.footer p {
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Responsywność */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        text-align: left;
        position: relative;
    }
    
    /* Pokaż hamburger button */
    .menu-toggle {
        display: flex;
    }
    
    /* Ukryj menu domyślnie na mobile */
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        padding: 20px;
        box-sizing: border-box;
    }
    
    /* Pokaż menu gdy otwarte */
    .nav.nav-open {
        transform: translateX(0);
    }
    
    .nav a {
        padding: 16px 24px;
        font-size: 1.2em;
        min-width: 200px;
        text-align: center;
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav a:hover, .nav a:focus {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.05);
    }
    
    .content {
        padding: 32px 24px;
        margin: 20px 10px;
    }
    
    .content h1 {
        font-size: 1.8em;
    }
    
    .content h2 {
        font-size: 1.4em;
    }
    
    .logo {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 16px 0;
    }
    
    .header .container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .nav a {
        min-width: 180px;
        font-size: 1.1em;
        padding: 14px 20px;
    }
    
    .content {
        padding: 24px 16px;
        margin: 15px 8px;
        border-radius: 16px;
    }
    
    .content h1 {
        font-size: 1.6em;
    }
    
    .content h2 {
        font-size: 1.3em;
    }
}

/* Dodatkowe style dla dostępności mobile menu */
@media (max-width: 768px) {
    /* Animacja fade in dla menu items */
    .nav.nav-open a {
        animation: fadeInUp 0.3s ease forwards;
        opacity: 0;
        transform: translateY(20px);
    }
    
    .nav.nav-open a:nth-child(1) { animation-delay: 0.1s; }
    .nav.nav-open a:nth-child(2) { animation-delay: 0.2s; }
    .nav.nav-open a:nth-child(3) { animation-delay: 0.3s; }
    .nav.nav-open a:nth-child(4) { animation-delay: 0.4s; }
    .nav.nav-open a:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dostępność - wyraźny żółty focus zgodny z WCAG */
*:focus {
    outline: 4px solid var(--focus-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--focus-yellow-dark);
}

/* Specjalny focus dla przycisków i linków */
.nav a:focus,
.btn:focus,
.form-submit:focus,
.form-input:focus,
.form-select:focus {
    outline: 4px solid var(--focus-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--focus-yellow-dark), 0 0 8px rgba(255, 214, 0, 0.6);
    border-color: var(--focus-yellow-dark);
}

/* Focus dla checkboxów */
.form-checkbox:focus {
    outline: 4px solid var(--focus-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--focus-yellow-dark);
}

/* Wysokie kontrasty dla lepszej czytelności */
@media (prefers-contrast: high) {
    body {
        background: #f5f5f5;
        color: #000;
    }
    
    .content {
        border-color: var(--primary-green);
        border-width: 2px;
    }
    
    .content h1, .content h2, .content h3, .content p {
        color: #000;
    }
    
    .content a {
        color: var(--primary-green-dark);
        text-decoration-thickness: 2px;
    }
    
    /* Jeszcze wyraźniejszy focus w trybie wysokiego kontrastu */
    *:focus {
        outline: 5px solid var(--focus-yellow);
        outline-offset: 3px;
        box-shadow: 0 0 0 3px var(--focus-yellow-dark);
    }
}

/* Animacje dla przyjazności */
@keyframes gentle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.logo:hover {
    animation: gentle-pulse 2s ease-in-out infinite;
}

/* Dodatkowe klasy użytkowe */
.text-center { text-align: center; }
.text-green { color: var(--primary-green); }
.bg-light-green { 
    background-color: var(--very-light-green); 
    padding: 20px; 
    border-radius: 12px; 
    margin: 20px 0; 
}
.highlight { 
    background-color: var(--very-light-green); 
    padding: 2px 6px; 
    border-radius: 4px; 
}

/* Specjalne style dla ważnych informacji */
.info-box {
    background: linear-gradient(135deg, var(--very-light-green) 0%, var(--bg-light) 100%);
    border: 2px solid var(--light-green);
    border-radius: 15px;
    padding: 24px;
    margin: 0; /* usuń margin, grid się tym zajmuje */
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
    width: 100%; /* wypełnij kolumnę grida */
}

.info-box h3 {
    color: var(--text-dark);
    margin-top: 0;
}

/* Breadcrumbs - jeśli potrzebne */
.breadcrumb {
    background: none;
    padding: 16px 0;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-green);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ======================================
   GRID LAYOUT DLA 4 SEKCJI SMS
   ====================================== */

/* Grid container dla 4 sekcji */
.sms-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 kolumny na desktop */
    gap: 30px;
    margin: 40px 0;
}

/* Na mobile - 1 kolumna, 100% szerokość */
@media (max-width: 768px) {
    .sms-sections-grid {
        grid-template-columns: 1fr; /* 1 kolumna na mobile */
        gap: 20px;
        margin: 20px 0;
    }
}

/* Responsywność dla bardzo małych ekranów */
@media (max-width: 480px) {
    .sms-sections-grid {
        gap: 15px;
        margin: 15px 0;
    }
}

/* ======================================
   STYLE FORMULARZY SMS
   ====================================== */

/* Panel informacyjny dla bezdomnych */
.homeless-info-panel {
    background: linear-gradient(135deg, var(--very-light-green) 0%, var(--bg-light) 100%);
    border: 3px solid var(--light-green);
    border-radius: 20px;
    padding: 32px;
    margin: 0; /* usuń margin, grid się tym zajmuje */
    text-align: center;
    width: 100%; /* wypełnij kolumnę grida */
}

.homeless-info-panel h1 {
    color: var(--text-dark);
    font-size: 1.8em;
    margin-bottom: 20px;
}

.homeless-info-panel p {
    font-size: 1.2em;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.big-phone-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-green);
    margin: 20px 0;
    letter-spacing: 3px;
}

/* Formularze - przyjazne i dostępne */
.form-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.15);
    border: 3px solid var(--border-green);
    margin: 0; /* usuń margin, grid się tym zajmuje */
    width: 100%; /* wypełnij kolumnę grida */
}

/* Layout telefon + przycisk - pole na całą szerokość, przycisk wyśrodkowany */
.phone-submit-row {
    display: flex;
    flex-direction: column; /* zawsze pionowo */
    gap: 20px;
    margin-bottom: 24px;
}

.phone-group {
    width: 100%; /* pole telefonu na całą szerokość */
    margin-bottom: 0;
}

.submit-group {
    display: flex;
    justify-content: center; /* wyśrodkowanie przycisku */
    width: 100%;
}

.submit-group .form-submit {
    width: auto; /* przycisk auto-szerokość */
    min-width: 180px; /* minimalna szerokość */
    padding: 16px 32px;
    margin-top: 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-green);
    border-radius: 12px;
    font-size: 1.1em;
    color: var(--text-dark);
    background: var(--bg-very-light);
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: 4px solid var(--focus-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--focus-yellow-dark), 0 0 8px rgba(255, 214, 0, 0.6);
    border-color: var(--focus-yellow-dark);
    background: white;
}

.form-input::placeholder {
    color: var(--light-green);
    opacity: 0.8;
}

/* Instrukcja dla pola telefonu */
.phone-instruction {
    background: var(--bg-very-light);
    border: 1px solid var(--border-green);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-size: 0.9em;
    color: var(--text-dark);
    line-height: 1.4;
}

.form-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7d32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
    appearance: none;
    cursor: pointer;
}

.form-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-green);
    border-radius: 4px;
    background: var(--bg-very-light);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-checkbox:checked {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.form-checkbox-label {
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1.5;
}

.form-submit {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    width: 100%;
    margin-top: 20px;
}

.form-submit:hover, .form-submit:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Komunikaty błędów i sukcesów */
.message {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-success {
    background: var(--very-light-green);
    color: var(--text-dark);
    border: 2px solid var(--light-green);
}

.message-error {
    background: #fef2f2;
    color: #7f1d1d;
    border: 2px solid #fca5a5;
}

.message-info {
    background: var(--very-light-green);
    color: var(--text-dark);
    border: 2px solid var(--border-green);
}

/* Karty informacyjne */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 0; /* usuń margin, grid się tym zajmuje */
    border: 2px solid var(--border-green);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
    transition: all 0.3s ease;
    width: 100%; /* wypełnij kolumnę grida */
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.15);
}

.card-header {
    border-bottom: 2px solid var(--very-light-green);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.card-title {
    color: var(--text-dark);
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
}

.card-subtitle {
    color: var(--primary-green);
    font-size: 1em;
    margin: 8px 0 0 0;
    font-weight: 400;
}

/* Lista z ikonami */
.icon-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.icon-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.icon-list.food li::before {
    flex-shrink: 0;
    margin-top: 2px;
}

.icon-list.help li::before {
    content: '🤝';
    font-size: 1.2em;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-green);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Błędy walidacji */
.field-error {
    color: #d32f2f;
    font-size: 0.9em;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-input.field-error,
.form-select.field-error {
    border-color: #d32f2f;
}

/* Responsywność formularzy */
@media (max-width: 480px) {
    .form-container {
        padding: 24px 16px;
    }
    
    .card {
        padding: 20px 16px;
    }
    
    .big-phone-number {
        font-size: 2em;
        letter-spacing: 2px;
    }
    
    .homeless-info-panel {
        padding: 24px 16px;
    }
}