/**
 * Complete Main Styles for Święta na Starówce Theme
 * Header, Navigation, WCAG, Footer and Layout
 */

/* CSS Variables */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #3182ce;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #e53e3e;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* Reset */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
    margin: 0;
    font-size: 16px;
}

/* Skip Links */
.skip-links {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 10000;
    transition: top 0.3s ease;
}

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

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.site-logo img {
    max-height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.site-title a {
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.site-title a:hover {
    color: #e2e8f0;
}

.site-description {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.primary-menu li {
    margin: 0;
}

.primary-menu a {
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.primary-menu a:hover,
.primary-menu a:focus {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
}

.primary-menu .current-menu-item a {
    background: rgba(255, 255, 255, 0.3);
}

/* WCAG Accessibility Tools */
.accessibility-tools {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.accessibility-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accessibility-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.accessibility-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.accessibility-btn.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Font Size Enhancement */
.large-text {
    font-size: 1.25em;
}

.large-text h1 { font-size: 3.125rem; }
.large-text h2 { font-size: 2.5rem; }
.large-text h3 { font-size: 1.875rem; }
.large-text .btn { font-size: 1.25rem; padding: 1rem 2rem; }

/* High Contrast Mode */
.high-contrast {
    --primary-color: #000080;
    --secondary-color: #000080;
    --accent-color: #0000ff;
    --success-color: #008000;
    --warning-color: #ff8000;
    --error-color: #ff0000;
    --text-primary: #000000;
    --text-secondary: #000000;
    --bg-light: #ffffff;
    --bg-white: #ffffff;
    --border: #000000;
}

.high-contrast .site-header {
    background: #000080 !important;
    border-bottom: 3px solid #000000;
}

.high-contrast .accessibility-btn {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-secondary);
}

/* Enhanced Footer Design */
.site-footer {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    color: white;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.footer-main {
    padding: 4rem 0 2rem;
    position: relative;
}

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

.footer-section {
    text-align: center;
}

.footer-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

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

.footer-section p {
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.highlight {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.footer-address {
    font-style: normal;
}

.contact-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
}

.footer-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.city-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.footer-logo-img {
    max-height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.logo-text {
    text-align: left;
    margin: 0;
    line-height: 1.3;
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.footer-copyright p {
    margin: 0;
    opacity: 0.9;
}

.copyright-note {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.footer-legal a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-legal a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-tech {
    text-align: center;
}

.tech-info {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0 0 0.5rem 0;
}

.credit {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
}

.credit a {
    color: white;
    font-weight: 600;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-main {
        padding: 3rem 0 1.5rem;
    }

    .footer-highlights {
        flex-direction: column;
        align-items: center;
    }

    .city-logo {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-legal ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

*:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .site-branding {
        justify-content: center;
        text-align: center;
        margin-bottom: 1rem;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0.5rem 0;
    }

    .primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin: 1rem 0;
    }

    .primary-menu.active {
        display: flex;
    }

    .primary-menu a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        text-align: center;
    }

    .accessibility-tools {
        justify-content: center;
        margin-top: 1rem;
    }

    .footer-content {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.back-to-top:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.back-to-top:focus {
    outline: 3px solid white;
    outline-offset: 2px;
}

.back-to-top-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.back-to-top-text {
    font-size: 0.7rem;
    line-height: 1;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .back-to-top-text {
        display: none;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .back-to-top:hover {
        transform: none;
    }
}