/* ./css/main.css */
:root {
    --primary-color: #00579c;     /* Główny granat z logo */
    --accent-color: #e67817;      /* Ciepły pomarańcz z logo */
    --accent-hover: #c9650e;      /* Ciemniejszy pomarańcz po najechaniu */
    --text-color: #2b2b2b;        /* Ciemny neutralny kolor tekstu */
    --bg-light: #f4f7fa;          /* Delikatne błękitno-szare tło */
    --border-color: #e2e8f0;      /* Obramowania kart i separatorów */
    --max-width: 1200px;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ebf0f5;
}

html {
    scroll-behavior: smooth;
}

#caly {
    max-width: var(--max-width);
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 87, 156, 0.08);
    display: flex;
    flex-direction: column;
}

/* Header & Top Bar */
header {
    border-bottom: 3px solid var(--accent-color);
    background: #ffffff;
}

.top-bar {
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-logo {
    height: 55px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Navigation */
nav {
    background: var(--primary-color);
}

#menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

#menu li {
    position: relative;
}

#menu a {
    display: block;
    padding: 0.85rem 1.3rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

#menu a:hover {
    background: var(--accent-color);
    color: #ffffff;
}


/* ZAMIAST TEGO:
#menu li:hover > .submenu {
    display: block;
}
*/

/* UŻYJ TEGO (Podejście klasowe/stanowe): */
#menu li:hover > .submenu,
#menu li.is-open > .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 270px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    list-style: none;
    z-index: 1000;
    border-top: 3px solid var(--accent-color);
}

.submenu a {
    color: var(--text-color) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.1rem !important;
}

.submenu a:hover {
    background: var(--bg-light) !important;
    color: var(--primary-color) !important;
}

/* Main Content Area */
main {
    padding: 2.5rem 2rem;
    flex: 1;
    transition: opacity 0.2s ease-in-out;
}

h1 {
    font-size: 2.1rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 0.5rem;
}

h2 {
    color: var(--primary-color);
}

.lead {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: #4a5568;
}

/* Layout Grids & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 1rem;
}

.margin-top {
    margin-top: 2rem;
}

.card {
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    border-color: rgba(0, 87, 156, 0.3);
    box-shadow: 0 6px 16px rgba(0, 87, 156, 0.08);
}

.card.bg-light {
    background: var(--bg-light);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.card ul {
    padding-left: 1.2rem;
}

.card ul li {
    margin-bottom: 0.4rem;
}

/* Action Buttons & CTA Banner */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff !important;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.cta-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003e70 100%);
    color: #ffffff;
    padding: 2.2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 87, 156, 0.15);
}

.cta-banner h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.cta-banner p {
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.cta-banner .btn-primary {
    background-color: var(--accent-color);
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.cta-banner .btn-primary:hover {
    background-color: var(--accent-hover);
}

/* Formularz kontaktowy i elementy interfejsu */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-light);
    color: var(--text-color);
}

.contact-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.contact-phone-link {
    color: var(--primary-color);
    font-weight: bold;
}

.form-subtext {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.form-submit-btn {
    margin-top: 0.5rem;
    width: auto;
}

.textarea-resizable {
    resize: vertical;
}

.map-card-wrapper {
    margin-bottom: 1.5rem;
}

.map-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.map-container {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-iframe {
    border: 0;
}

/* Komunikaty formularza kontaktowego */
.form-success-msg {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
}

.form-error-msg {
    background: #f8d7da;
    color: #842029;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #f5c2c7;
}

/* Footer & Copyright Section */
footer {
    background: var(--primary-color);
    color: #ffffff;
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    margin-top: auto;
    border-top: 4px solid var(--accent-color);
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #e0eafd;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #b0c4de;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.2rem;
    margin-top: 1.5rem;
}

.footer-credits {
    color: #d1e0f0;
}

.footer-credits a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-credits a:hover {
    color: #ff9d42;
    text-decoration: underline;
}

/* Responsywność */
@media (max-width: 768px) {
    main {
        padding: 1.5rem 1rem;
    }

    #menu {
        flex-direction: column;
    }

    .submenu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        background: rgba(0, 0, 0, 0.1);
        border-top: none;
    }

    .submenu a {
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cta-banner {
        padding: 1.5rem 1rem;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.6rem;
        text-align: center;
    }
}

/* Efekt ładowania zgodny z CSP */
#app-content.is-loading {
    opacity: 0.4;
    transition: opacity 0.2s ease-in-out;
}

.btn-primary.btn-sm {
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-label {
    font-weight: 700;
}

.contact-numbers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
