/* Reset & Global Styles */
:root {
    --primary-color: #0a7ea3;
    --secondary-color: #005c99;
    --accent-color: #f2a900;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-color: #495057;
    --white: #ffffff;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden; /* Zapobieganie poziomemu scrollbarowi przez AOS */
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    color: var(--dark-gray);
    margin-bottom: 0.8em;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1.2em;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

section {
    padding: 80px 0;
}

section:nth-of-type(even) {
    background-color: var(--light-gray);
}
#testimonials {
    background-color: #eef7fa;
}

.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-color);
    max-width: 700px;
    margin: -1.5em auto 3em auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    box-shadow: 0 4px 6px rgba(242, 169, 0, 0.2);
}

.cta-button:hover {
    background-color: #e09800;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(242, 169, 0, 0.3);
}

/* Header & Navigation */
header {
    background-color: var(--white);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: background-color 0.3s ease;
}

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

.logo a {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.logo span {
    color: var(--primary-color);
}

header nav ul {
    display: flex;
}

header nav li {
    margin-left: 25px;
}

header nav a {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
}
header nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

header nav a:hover::after,
header nav a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--dark-gray);
    cursor: pointer;
}


/* Hero Section */
#hero {
    background-image: linear-gradient(to right bottom, rgba(10, 126, 163, 0.85), rgba(0, 92, 153, 0.85)), url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1473&q=80');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 200px 0 150px;
    text-align: center;
    position: relative;
}

.hero-overlay {
}

.hero-content {
    position: relative;
    z-index: 1;
}

#hero h1 {
    color: var(--white);
    margin-bottom: 0.6em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 1.8em auto;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* About Section */
#about .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

#about .about-item i {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    padding: 18px;
    background-color: var(--white);
    border-radius: 50%;
    box-shadow: var(--box-shadow);
    width: 80px;
    height: 80px;
    line-height: 44px;
    transition: transform 0.3s ease, color 0.3s ease;
}
#about .about-item:hover i {
    transform: scale(1.1);
    color: var(--accent-color);
}
#about .about-item h3 {
    margin-bottom: 10px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}
.service-icon i {
    padding: 10px;
    background-color: var(--light-gray);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 40px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.service-card:hover .service-icon i {
    background-color: var(--primary-color);
    color: var(--white);
}


.service-card h3 {
    text-align: center;
    margin-bottom: 15px;
}

.service-card ul {
    padding-left: 0;
}

.service-card ul li {
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
    font-size: 0.95rem;
}

.service-card ul li::before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.9em;
}

/* Testimonials Section */
#testimonials {
    padding: 80px 0;
}

.testimonials-slider {
    position: relative;
    padding: 0 40px;
}

.testimonial-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-content p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 20px;
}
.testimonial-content p::before {
    content: '\f10d';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 10px;
    opacity: 0.5;
}
.testimonial-content p::after {
    content: '\f10e';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-left: 10px;
    opacity: 0.5;
}

.testimonial-author {
    margin-top: auto;
}

.testimonial-author .author-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.testimonial-author h4 {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Swiper Navigation & Pagination */
.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    color: var(--accent-color) !important;
}
.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 1.5rem !important;
}

.swiper-pagination-bullet {
    background: var(--primary-color) !important;
    opacity: 0.7 !important;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--accent-color) !important;
    opacity: 1 !important;
}


/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 18px;
}

.contact-details p i {
    color: var(--primary-color);
    margin-right: 12px;
    width: 22px;
}

.contact-details a {
    font-weight: 500;
}

.social-icons {
    margin-top: 25px;
}

.social-icons a {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-right: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.contact-form-container h3 {
    margin-bottom: 25px;
    color: var(--dark-gray);
    font-size: 1.7rem;
}

.contact-form-container input,
.contact-form-container textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-container input:focus,
.contact-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(10, 126, 163, 0.25);
}

.contact-form-container textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-container .cta-button {
    width: auto;
    margin-top: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 5px;
}
footer a {
    color: var(--primary-color);
}
footer a:hover {
    color: var(--accent-color);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-align: center;
    line-height: 45px;
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: scale(1.1);
}


/* Flash Messages - POPRAWIONA SEKCJA */
.flash-messages-container {
    position: fixed; /* Komunikaty zawsze na wierzchu */
    top: 0; /* Przyklejone do góry */
    left: 0;
    width: 100%;
    z-index: 1002; /* Bardzo wysoki z-index, wyższy niż header */
    padding-top: 70px; /* Margines od góry, by komunikaty były widoczne pod nagłówkiem */
    box-sizing: border-box; /* Ważne dla paddingu */
    pointer-events: none; /* Pozwala klikać przez kontener */
}

.flash-message {
    padding: 15px 20px;
    margin: 0 auto 15px auto; /* Centrowanie i dolny margines */
    max-width: 90%; /* Ogranicz szerokość */
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    opacity: 0.98;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Subtelniejszy cień */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: translateY(-20px); /* Początkowo lekko schowane */
    animation: slideInFlash 0.5s forwards ease-out; /* Animacja pojawiania */
    pointer-events: auto; /* Ponownie aktywuj zdarzenia myszy dla pojedynczych wiadomości */
}

/* Animacja pojawiania się */
@keyframes slideInFlash {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Kolory komunikatów Flash */
.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}


/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.6rem; }
    h2 { font-size: 2.1rem; }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .testimonials-slider {
        padding: 0 10px;
    }
    .swiper-button-next, .swiper-button-prev {
        /* display: none; */
    }
    .flash-messages-container {
        padding-top: 60px; /* Dopasowanie do mniejszych nagłówków na mobile */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--box-shadow);
        flex-direction: column;
        padding: 10px 0;
    }
    header nav.active {
        display: flex;
    }
    header nav ul {
        flex-direction: column;
        width: 100%;
    }
    header nav li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    header nav a {
        display: block;
        padding: 12px 15px;
        border-bottom: 1px solid var(--light-gray);
    }
    header nav a::after { display: none; }
    header nav li:last-child a {
        border-bottom: none;
    }
    .menu-toggle {
        display: block;
    }

    #hero {
        padding: 160px 0 100px;
    }
    #hero h1 { font-size: 2.2rem; }
    #hero p { font-size: 1.1rem; }

    .about-grid {
        grid-template-columns: 1fr;
    }
    #about .about-item { margin-bottom: 30px; }


    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-form-container {
        margin-top: 40px;
    }

    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
    .testimonials-slider {
        padding: 0;
    }
    .testimonial-item {
        min-height: auto;
        padding: 25px;
    }
    .flash-messages-container {
        padding-top: 55px; /* Mniejsze nagłówki na mobilnych */
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
    .section-subtitle { font-size: 1rem; }
    .cta-button {
        padding: 12px 22px;
        font-size: 0.95rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .service-card { padding: 25px 20px; }
}
