/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #8b7355;
    --text-color: #2c2c2c;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #fafafa;
    --border-color: #e5e5e5;
    --link-color: #8b7355;
    --link-hover: #6b5a42;
    --spacing-unit: 1.25rem;
    --max-width: 1200px;
    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --bg-color: #1a1a1a;
        --bg-light: #2d2d2d;
        --border-color: #404040;
    }
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

/* Typografia */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    text-rendering: optimizeLegibility;
}

h1 { 
    font-size: 3rem; 
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.2;
}

h2 { 
    font-size: 2.25rem; 
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
}

h3 { 
    font-size: 1.75rem; 
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 400;
    line-height: 1.35;
}

h4 { 
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.4;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.9;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

@media (max-width: 768px) {
    p {
        text-align: left;
        font-size: 1.05rem;
        line-height: 1.85;
    }
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover, a:focus {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
    outline: none;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 70px;
    overflow: visible;
    height: auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.75rem;
    font-weight: 400;
    color: white;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
    border-bottom: none;
}

.logo::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.logo:hover {
    color: white;
    border-bottom: none;
    outline: none;
}

.logo:hover::before {
    background-color: white;
}

/* Nawigacja */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
}

nav > ul > li {
    position: relative;
    height: auto;
}

nav a, nav .submenu-trigger {
    color: white;
    font-weight: 400;
    font-size: 1rem;
    border-bottom: none;
    cursor: pointer;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s ease, opacity 0.3s ease;
    position: relative;
    box-sizing: border-box;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

nav .submenu-trigger {
    user-select: none;
    padding-right: 1.2rem;
    position: relative;
}

nav .submenu-trigger::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
    line-height: 1;
    display: inline-block;
    width: auto;
    height: auto;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.has-submenu:hover .submenu-trigger::after {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

nav a:hover, nav a:focus, nav .submenu-trigger:hover {
    color: #e0e0e0;
    outline: none;
    opacity: 0.9;
}

nav a:hover::before, nav a:focus::before {
    background-color: #e0e0e0;
}

nav .submenu-trigger::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 1.2rem;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

nav .submenu-trigger:hover::before {
    background-color: #e0e0e0;
}

/* Подменю */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background-color: var(--primary-color);
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease 0.15s, visibility 0.2s ease 0.15s, transform 0.2s ease 0.15s;
    padding: 0.5rem 0;
    border-radius: 4px;
    z-index: 1001;
    margin-top: 0;
    pointer-events: none;
}

.has-submenu:hover .submenu,
.has-submenu .submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

/* Задержка перед скрытием подменю */
.has-submenu:not(:hover) .submenu {
    transition-delay: 0.2s;
}

/* Создаем невидимую область для плавного перехода к подменю */
.has-submenu::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
    z-index: 1000;
    pointer-events: none;
}

/* Улучшаем область наведения для подменю */
.has-submenu:hover::before {
    pointer-events: auto;
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: white;
    border-bottom: none;
    white-space: nowrap;
}

.submenu a:hover {
    background-color: rgba(255,255,255,0.1);
    border-bottom: none;
    color: #e0e0e0;
}

/* Burger menu */
.burger-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
    width: 30px;
    height: 24px;
    min-height: 24px;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    position: relative;
    outline: none;
}

.burger-menu:focus,
.burger-menu:active,
.burger-menu:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    min-height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 2px;
    flex-shrink: 0;
    position: absolute;
}

.burger-menu span:nth-child(1) {
    top: 0;
}

.burger-menu span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.burger-menu span:nth-child(3) {
    bottom: 0;
}

.burger-menu.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.burger-menu.active span:nth-child(3) {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 400;
    font-size: 1.25rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #d0d0d0;
    border-bottom: none;
}

.footer-section a:hover {
    color: white;
    border-bottom: 1px solid white;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    color: #b0b0b0;
    font-size: 0.95rem;
}

/* Karty i sekcje */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Artykuły */
.article-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.article-content p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

@media (max-width: 768px) {
    .article-content p {
        text-align: left;
    }
}

.article-meta {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-style: italic;
}

/* Obrazy w artykułach */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-content figure {
    margin: 3rem 0;
    display: block;
}

.article-content section {
    clear: both;
}

.article-content section h2,
.article-content section h3 {
    clear: both;
}

.article-content section ul,
.article-content section ol,
.article-content section .checklist {
    clear: both;
}

.article-content figure.image-center {
    margin: 3rem auto;
    max-width: 80%;
    width: 100%;
    text-align: center;
    clear: both;
}

.article-content figure img {
    margin: 0;
    display: block;
}

.article-content figure.image-center img {
    margin: 0 auto;
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
}

.article-content figcaption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    line-height: 1.6;
}

/* Общие стили для figure вне article-content */
figure {
    margin: 3rem 0;
    display: block;
}

figure img {
    margin: 0;
    display: block;
}

figcaption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    line-height: 1.6;
}

/* Obrazy z tekstem */
.image-left {
    float: left;
    margin: 2.5rem 3rem 3rem 0;
    padding-right: 1.5rem;
    max-width: 45%;
    clear: left;
    display: block;
    box-sizing: border-box;
}

.image-left img {
    margin: 0 auto;
    display: block;
    width: 100%;
    height: auto;
}

.image-left figcaption {
    text-align: center;
    width: 100%;
    margin-top: 1rem;
    max-width: 100%;
}

.image-right {
    float: right;
    margin: 2.5rem 0 3rem 3rem;
    padding-left: 1.5rem;
    max-width: 45%;
    clear: right;
    display: block;
    box-sizing: border-box;
}

.image-right img {
    margin: 0 auto;
    display: block;
    width: 100%;
    height: auto;
}

.image-right figcaption {
    text-align: center;
    width: 100%;
    margin-top: 1rem;
    max-width: 100%;
}

.image-center {
    display: block;
    margin: 3rem auto;
    max-width: 80%;
    width: 100%;
    text-align: center;
    clear: both;
    box-sizing: border-box;
}

.image-center img {
    margin: 0 auto;
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
}

.image-center figcaption {
    text-align: center;
    margin-top: 1rem;
    max-width: 100%;
    width: 100%;
}

@media (max-width: 768px) {
    .image-left,
    .image-right {
        float: none;
        max-width: 100%;
        margin: 3rem auto;
        padding-left: 0;
        padding-right: 0;
        display: block;
        text-align: center;
        clear: both;
    }
    
    .image-left img,
    .image-right img {
        width: 100%;
        margin: 0 auto;
    }
    
    .image-left figcaption,
    .image-right figcaption {
        text-align: center;
        max-width: 100%;
    }
    
    .article-content img {
        margin: 2rem auto;
    }
    
    .image-center {
        max-width: 100%;
        margin: 3rem auto;
    }
}

.table-of-contents {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 4px;
    margin: 3rem 0;
    border-left: 3px solid var(--accent-color);
}

.table-of-contents h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.table-of-contents li:before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.table-of-contents a {
    color: var(--text-color);
    border-bottom: none;
}

.table-of-contents a:hover {
    color: var(--link-color);
    border-bottom: 1px solid var(--link-color);
}

/* Słownik */
.term-card {
    border-left: 4px solid var(--accent-color);
    padding: 2rem 0 2rem 2rem;
    margin: 3rem 0;
    background: var(--bg-light);
    border-radius: 0 4px 4px 0;
}

.term-definition {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    line-height: 1.6;
    font-style: italic;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 4px;
}

.alphabet-nav a {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    border-bottom: none;
}

.alphabet-nav a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Miasta */
.city-plan {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.time-block {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 4px;
    border-top: 3px solid var(--accent-color);
}

.time-block h3 {
    color: var(--accent-color);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

/* Poradniki */
.checklist {
    list-style: none;
    padding-left: 0;
    margin: 2rem 0;
    clear: both;
}

.checklist li {
    padding: 0 0 0 1.5rem;
    position: relative;
    line-height: 1.8;
    margin: 0.75rem 0;
}

.checklist li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.error-block {
    background: #fef9e7;
    border-left: 4px solid #d4a017;
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 0 4px 4px 0;
}

.error-block h3 {
    color: #8b6914;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Formularz */
.contact-form-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: var(--bg-light);
}

.contact-form-section h2 {
    margin-top: 0;
    text-align: center;
}

.contact-form-section > .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form-section p {
    text-align: center;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.contact-form {
    margin: 2rem 0 0;
    max-width: 600px;
    width: 100%;
    padding: 2.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 400;
    font-size: 1.05rem;
}

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

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

.form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.7;
}

.form-group .error {
    color: #c0392b;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error .error {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #c0392b;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.3rem;
}

.btn {
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.02em;
}

.btn:hover, .btn:focus {
    background-color: var(--link-hover);
    outline: none;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    display: none;
    max-width: 400px;
    font-size: 1rem;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.toast.error {
    background: #c0392b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    z-index: 10000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
    line-height: 1.7;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.875rem 1.75rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cookie-btn:hover, .cookie-btn:focus {
    background: white;
    color: var(--primary-color);
    outline: none;
}

.cookie-btn.accept {
    background: white;
    color: var(--primary-color);
}

.cookie-btn.accept:hover {
    background: #f0f0f0;
}

.cookie-settings {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 4px;
    margin: 3rem 0;
}

.cookie-category {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.cookie-category h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: var(--accent-color);
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

section {
    margin: 3rem 0;
    clear: both;
}

section:first-of-type {
    margin-top: 0;
}

section figure.image-center {
    margin: 3rem auto;
    max-width: 80%;
    width: 100%;
    text-align: center;
    clear: both;
    display: block;
}

section figure.image-center img {
    margin: 0 auto;
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
}

section h2,
section h3 {
    clear: both;
}

section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.9;
    text-align: justify;
}

@media (max-width: 768px) {
    section p {
        text-align: left;
        font-size: 1.05rem;
        line-height: 1.85;
    }
}

ul, ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    list-style-position: outside;
    clear: both;
}

ul li, ol li {
    margin: 0.75rem 0;
    line-height: 1.8;
    padding-left: 0;
    text-indent: 0;
    padding-top: 0;
    padding-bottom: 0;
}

ul.checklist, ol.checklist {
    list-style: none;
    padding-left: 0;
}

ul.checklist li {
    padding: 0 0 0 1.5rem;
    position: relative;
    margin: 0.75rem 0;
}

ul.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

@media (max-width: 768px) {
    ul, ol {
        padding-left: 1.25rem;
    }
    
    ul li, ol li {
        margin: 0.5rem 0;
        line-height: 1.75;
        padding-left: 0.5rem;
    }
    
    ul.checklist li {
        padding-left: 1.5rem;
    }
    
    ul.checklist li::before,
    .checklist li:before {
        top: 0.5em;
    }
    
    ul li, ol li {
        padding-left: 0;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 1.5rem;
    }
    
    header {
        padding: 1.5rem 0;
    }
    
    .burger-menu {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--primary-color);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
        box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    }
    
    nav.active {
        right: 0;
    }
    
    /* Затемнение фона при открытом меню */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 1000;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    nav > ul > li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav a, nav .submenu-trigger {
        padding: 1rem 0;
        display: block;
        width: 100%;
    }
    
    /* Подменю на мобильных */
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: rgba(0,0,0,0.2);
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-radius: 0;
    }
    
    .has-submenu.active .submenu {
        max-height: 1000px;
    }
    
    .submenu li {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .submenu a {
        padding: 0.75rem 1.5rem;
        padding-left: 2.5rem;
    }
    
    .submenu-trigger::after {
        content: '▼';
        float: right;
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }
    
    .has-submenu.active .submenu-trigger::after {
        transform: rotate(180deg);
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .city-plan {
        grid-template-columns: 1fr;
    }
    
    .cookie-banner-content {
        flex-direction: column;
    }
    
    .cookie-banner-buttons {
        width: 100%;
    }
    
    .cookie-btn {
        flex: 1;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    main {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    main {
        padding: 1.5rem 0;
    }
    
    h1 {
        font-size: 1.875rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.625rem;
        line-height: 1.35;
    }
    
    h3 {
        font-size: 1.375rem;
        line-height: 1.4;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    nav {
        width: 90%;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}
