/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #2c3e50; /* Darker, more muted gray */
    --secondary-color: #3498db; /* Existing blue */
    --accent-color: #e74c3c; /* A contrasting accent, e.g., for CTAs if needed */
    --text-color: #34495e; /* Slightly softer than pure black */
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50; /* Matched to primary for consistency */
    --white: #ffffff;
    --gray: #7f8c8d; /* Softer gray */
    --border-color: #bdc3c7; /* Softer border color */
    --font-family-headings: 'Montserrat', sans-serif;
    --font-family-body: 'Open Sans', sans-serif;
    --box-shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-dark: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: var(--secondary-color); /* Changed default link color to secondary */
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color); /* Use accent for hover, or a darker shade of secondary */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents bottom space under images */
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px; /* Increased bottom margin */
    line-height: 1.3;
    font-family: var(--font-family-headings);
    font-weight: 600; /* Default weight for headings */
}

h1 {
    font-size: 2.8rem; /* Slightly increased */
    font-weight: 700;
}

h2 {
    font-size: 2.2rem; /* Slightly increased */
    text-align: center;
    margin-bottom: 40px; /* Increased */
}

h3 {
    font-size: 1.6rem; /* Slightly increased */
}

p {
    margin-bottom: 20px; /* Increased */
}

section {
    padding: 100px 0; /* Increased padding */
}

section:nth-child(even) {
    background-color: var(--light-bg);
}

.btn {
    display: inline-block;
    padding: 14px 28px; /* Increased padding */
    border-radius: 50px; /* Pill-shaped buttons */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-family-headings);
}

.btn.primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    min-width: 260px; /* Base min-width for all primary buttons */
}

.btn.primary:hover {
    background-color: #2980b9; /* Darker shade of secondary */
    color: var(--white);
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.btn.secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn.secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--box-shadow-light);
    padding: 20px 0; /* Increased padding */
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* flex-wrap: wrap; */ /* Generally not needed for the main header items */
}

.logo {
    flex-shrink: 0; /* Prevent logo container from shrinking */
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem; /* Increased */
    font-weight: 700;
    color: var(--primary-color);
    /* letter-spacing: -0.5px; */ /* Removed global negative letter-spacing */
    white-space: nowrap; /* Ensure text stays in one line */
    display: inline-block; /* Adjust display for better width control */
}

nav ul {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping */
    white-space: nowrap; /* Keep text in one line */
}

nav ul li {
    margin-left: 15px; /* Reduced spacing */
}

nav ul li a {
    font-weight: 600;
    padding: 8px 10px; /* Reduced padding */
    position: relative;
    color: var(--primary-color);
    font-size: 0.9rem; /* Slightly smaller font */
}

/* Fix for specific menu items that might be breaking */
nav ul li a[href="#whatsapp"],
nav ul li a[href="#o-nas"],
nav ul li a[href="#opinie"] {
    white-space: nowrap;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

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

nav ul li a.active {
    color: var(--secondary-color);
}

/* Hide mobile-specific LIs by default (desktop) */
header nav > ul li.mobile-menu-close-li {
    display: none;
}
header nav > ul li.language-switch-mobile-container {
    display: none;
}

/* NEW: Ensure mobile toggle is hidden by default (desktop-first) and only shown on mobile */
.mobile-nav-toggle {
    display: none;
    /* Basic styling for the toggle button itself, if needed */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px; 
    font-size: 1.5rem; /* Adjust size as needed */
    color: var(--primary-color);
    z-index: 1005; /* Above other header elements, below menu */
}

/* Dropdown Menu Styles */
nav ul li.dropdown {
    position: relative; /* Context for absolute positioning of dropdown-menu */
}

nav ul li .dropdown-icon {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

nav ul li.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position below the parent li */
    left: 0;
    background-color: var(--white);
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
    box-shadow: var(--box-shadow-light);
    min-width: 220px; /* Adjust as needed */
    z-index: 1001; /* Ensure it's above other content */
    padding: 10px 0; /* Add some padding */
    list-style: none; /* Remove default list styling */
}

nav ul li.dropdown:hover .dropdown-menu {
    display: block; /* Show on hover of parent li */
}

.dropdown-menu li {
    margin: 0 !important; /* Override general li margin if any */
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--primary-color);
    font-size: 0.85rem; /* Slightly smaller than main nav items */
    white-space: nowrap;
    font-weight: normal; /* Normal weight for dropdown items */
}

.dropdown-menu li a:hover {
    background-color: var(--light-bg);
    color: var(--secondary-color);
}

.dropdown-menu li a::after { /* Remove the underline effect from main nav */
    display: none;
}

.language-switch {
    display: flex;
    gap: 8px; /* Adjusted gap */
    /* margin-left: auto; */ /* Ensure it's not pushing everything else if not intended */
}

.language-switch a {
    padding: 8px 12px; /* Consistent padding */
    border-radius: 20px; /* Pill shape */
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.language-switch a.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.language-switch a:not(.active):hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background-color: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 120px 0 150px; /* Increased padding, more bottom padding */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.7) 0%, rgba(44, 62, 80, 0.9) 100%);
    z-index: -1;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(0, 0, 0, 0) 50%);
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem; /* Increased */
    margin-bottom: 25px; /* Increased */
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem; /* Slightly increased */
    max-width: 750px; /* Adjusted max-width */
    margin: 0 auto 40px; /* Increased bottom margin */
    font-weight: 400; /* Lighter for contrast */
    line-height: 1.8;
}

/* Services Section */
.services {
    padding: 80px 0; /* Adjusted padding */
}

.services h2 {
    margin-bottom: 60px; /* More space for section title */
}

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

.service-card {
    position: relative;
    height: 400px; /* Increased height */
    border-radius: 12px; /* More rounded corners */
    overflow: hidden;
    box-shadow: var(--box-shadow-light);
    color: var(--white);
    text-decoration: none;
    background-size: cover;
    background-position: center;
    display: block;
    will-change: transform; /* Optimize browser rendering */
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-30px) scale(1.05);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.service-card:hover .service-card-content h3,
.service-card:hover .service-card-content p {
    color: var(--white); /* Keep text white on hover */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.85) 100%); /* Adjusted gradient for better text visibility at bottom */
    z-index: 1;
}

.service-card-content {
    position: relative;
    z-index: 2;
    padding: 25px;
    color: var(--white);
    height: 100%;
}

.service-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.service-card-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    position: absolute;
    left: 25px;
    right: 25px;
    bottom: 25px;
    height: 97px;
    overflow-y: auto;
}

/* Specific style for the AI service card using hero-bg.jpg */
.service-card-ai {
    background-image: url('hero-bg.jpg'); /* Assuming hero-bg.jpg is in the root or accessible path */
    background-size: cover;
    background-position: center;
}

/* Benefits Section Styles (shared across service pages) */
.benefits-section {
    padding: 60px 0;
    background-color: var(--white); /* Or var(--light-bg) for alternation */
}
.benefits-section .container {
    max-width: 900px; /* Limit width for better readability of lists */
}
.benefits-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}
.benefits-section .intro-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 40px;
    line-height: 1.7;
}
.benefits-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 20px;
}
.benefits-list li {
    background-color: var(--light-bg); /* Light background for each item */
    padding: 20px;
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    padding-left: 35px; /* Space for icon */
    box-shadow: var(--shadow-light-inset); /* Subtle inset shadow */
}
.benefits-list li i {
    position: absolute;
    left: 10px;
    top: 22px;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Join Us Section */
.join-us {
    background-color: var(--secondary-color);
    color: var(--primary-color); /* Changed for better contrast */
    padding: 80px 0;
    text-align: center;
}

.join-us h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color); /* Changed for better contrast */
}

.join-us p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--primary-color); /* Added for better contrast and specificity */
}

.join-us .cta {
    margin-top: 0;
}

.join-us .btn.primary {
    /* Ensure it doesn't take full width by default if not intended */
    /* display: inline-block; /* This is default for .btn */
    /* width: auto; /* This is default */
}

.join-us .btn.primary:hover {
    /* Standard hover effects */
}

.join-us .btn.primary.animated {
    width: 300px; /* Increased fixed width */
    /* min-width: 260px; */ 
    /* width: auto; */ 
    padding: 15px 30px;
    font-size: 1.1rem; 
    position: relative;
    overflow: hidden;
    border: none;
    transition: color 0.4s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center; 
    text-decoration: none; 
    margin-left: auto; /* Added for centering if parent is not full width */
    margin-right: auto; /* Added for centering if parent is not full width */
}

.join-us .btn.primary.animated span {
    margin-right: 10px;  /* Icon on the left */
    /* margin-left: 10px; */  /* Ensure no left margin if it was added */
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse { /* This seems to be for the icon, keep as is */
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Ensure loading animations are not affected if they were part of the original button style */
.join-us .btn.primary.animated:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    animation: loading-shine 2s infinite;
}

.join-us .btn.primary.animated:after {
    content: "";
    position: absolute;
    height: 3px;
    width: 20px;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.join-us .btn.primary.animated:hover:after {
    opacity: 1;
    animation: loading-bar 2s infinite;
}

@keyframes loading-shine {
    0% {
        transform: translateX(-100%);
    }
    50%, 100% {
        transform: translateX(100%);
    }
}

@keyframes loading-bar {
    0% {
        width: 20px;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 20px;
    }
}

/* FAQ Section */
.faq {
    background-color: var(--light-bg);
}

.faq-item {
    position: relative;
    background-color: var(--white);
    padding: 25px;
    border-radius: 12px; /* Zwiększona zaokrąglenie, jak w service-card */
    margin-bottom: 20px;
    box-shadow: var(--box-shadow-light);
    border-left: 5px solid var(--secondary-color);
    will-change: transform; /* Optimize browser rendering */
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease,
                border-left-color 0.3s ease;
    cursor: pointer;
    z-index: 1;
}

.faq-item:hover {
    transform: translateY(-20px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-left-color: var(--accent-color);
    z-index: 10;
    background: linear-gradient(to bottom right, var(--white), #f5f9ff);
}

.faq-item::after, .faq-item::before {
    display: none;
}

.faq-item h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.faq-item p {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

.faq-item::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 0 3px 0 0;
    z-index: 2;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.faq-item:hover::before {
    opacity: 1;
}

/* Consultation Section */
.consultation {
    text-align: center;
}

.consultation .cta {
    margin-top: 10px;
}

/* Instagram Section */
.instagram {
    background-color: var(--light-bg);
}

.instagram-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.instagram-post {
    position: relative;
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px; /* Zwiększona zaokrąglenie, jak w service-card */
    box-shadow: var(--box-shadow-light);
    font-size: 0.9rem;
    line-height: 1.6;
    will-change: transform; /* Optimize browser rendering */
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    cursor: pointer;
    z-index: 1;
}

.instagram-post:hover {
    transform: translateY(-20px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-left: 5px solid var(--secondary-color);
    z-index: 10;
    background: linear-gradient(to bottom right, var(--white), #f5f9ff);
}

.instagram-post::after, .instagram-post::before {
    display: none;
}

.instagram-post p {
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.instagram-post::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 0 3px 0 0;
    z-index: 2;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.instagram-post:hover::before {
    opacity: 1;
}

.instagram-handle {
    text-align: center;
}

.instagram-handle a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.instagram-handle a:hover {
    color: var(--secondary-color);
}

/* About Section */
.about {
    text-align: center;
}

.about p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about .cta {
    margin-top: 20px;
}

/* Contact Section */
.contact {
    background-color: var(--light-bg);
}

.contact h2 {
    margin-bottom: 10px;
}

.contact > .container > p {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px; /* Increased margin */
    font-weight: 600;
    font-family: var(--font-family-body);
}

input,
textarea {
    width: 100%;
    padding: 12px; /* Increased padding */
    border: 1px solid var(--border-color);
    border-radius: 6px; /* Slightly more rounded */
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea {
    resize: vertical;
}

button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}

.recaptcha-notice {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-bg);
    padding: 40px 0;
    text-align: center;
}

.cookies-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-bg); /* Użycie ciemniejszego tła dla lepszego kontrastu */
    color: var(--white);
    padding: 20px;
    text-align: center;
    z-index: 1001; /* Upewnij się, że jest nad innymi elementami */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2); /* Dodanie cienia dla lepszej separacji wizualnej */
    display: flex; /* Użycie flexboxa dla lepszego wyrównania na mobilnych */
    flex-direction: column; /* Domyślnie kolumna */
    align-items: center; /* Wyśrodkowanie elementów */
}

.cookies-notice p {
    margin-bottom: 15px; /* Zmniejszony margines dla lepszego dopasowania */
    font-size: 0.9rem; /* Lekko mniejszy font */
    color: var(--white); /* Upewnij się, że tekst jest biały */
    max-width: 90%; /* Ograniczenie szerokości tekstu na większych ekranach */
}

.cookies-notice p:first-child {
    font-weight: 600;
    font-size: 1.1rem; /* Większy font dla tytułu */
    margin-bottom: 10px;
}

.cookies-notice a {
    color: var(--secondary-color); /* Użycie koloru akcentu dla linku */
    text-decoration: underline;
}

.cookies-notice a:hover {
    color: #2980b9; /* Ciemniejszy odcień przy najechaniu */
}

.cookies-notice .btn.primary {
    padding: 10px 20px; /* Mniejszy padding dla przycisku w banerze */
    font-size: 0.9rem;
    margin-top: 10px; /* Dodanie marginesu górnego */
}

.cookies-notice .btn.primary:hover {
    background-color: #2980b9;
}

/* Media query dla responsywności banera cookie */
@media (min-width: 768px) {
    .cookies-notice {
        flex-direction: row; /* W rzędzie na większych ekranach */
        justify-content: space-between; /* Rozłożenie elementów */
        padding: 20px 30px;
    }
    .cookies-notice p {
        margin-bottom: 0; /* Usunięcie marginesu dolnego dla tekstu na desktopie */
        margin-right: 20px; /* Dodanie marginesu prawego dla tekstu */
        text-align: left; /* Wyrównanie tekstu do lewej */
        max-width: 70%; /* Dostosowanie maksymalnej szerokości */
    }
    .cookies-notice .btn.primary {
        margin-top: 0; /* Usunięcie marginesu górnego dla przycisku */
        white-space: nowrap; /* Zapobieganie łamaniu tekstu w przycisku */
    }
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

.copyright p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

/* Privacy Policy & Terms Page Styles */
.privacy-policy-section, .terms-conditions-section {
    padding-top: 40px; /* Reduced top padding as header is sticky */
    padding-bottom: 60px;
    background-color: var(--white); /* Ensure white background */
}

.privacy-policy-section .container,
.terms-conditions-section .container {
    max-width: 900px; /* Consistent with previous inline style */
    margin: 0 auto; /* Center the container */
    background-color: var(--white);
    /* box-shadow: var(--box-shadow-light); */ /* Optional: remove shadow if it feels too boxed */
    /* border-radius: 8px; */ /* Optional: remove radius if sections are full width */
}

.privacy-policy-section h1,
.terms-conditions-section h1 {
    text-align: center;
    margin-bottom: 40px; /* Increased margin */
    font-size: 2.8rem; /* Match main H1 */
    color: var(--primary-color);
}

.privacy-policy-section h2,
.terms-conditions-section h2 {
    text-align: left; /* Align H2 to the left */
    margin-top: 50px; /* Increased top margin for better separation */
    margin-bottom: 25px; /* Increased bottom margin */
    border-bottom: 2px solid var(--secondary-color); /* More prominent border */
    padding-bottom: 12px; /* Increased padding */
    font-size: 2rem; /* Slightly larger H2 */
    color: var(--primary-color);
}

.privacy-policy-section h2:first-of-type,
.terms-conditions-section h2:first-of-type {
    margin-top: 20px; /* Less top margin for the very first H2 after intro paragraph */
}

.privacy-policy-section p, 
.privacy-policy-section li,
.terms-conditions-section p,
.terms-conditions-section li {
    margin-bottom: 18px; 
    line-height: 1.8; 
    font-size: 1rem; /* Ensure consistent font size */
    color: var(--text-color); /* Ensure consistent text color */
}

.privacy-policy-section ul,
.terms-conditions-section ul {
    padding-left: 25px; /* Slightly increased padding */
    list-style: disc;
}

.privacy-policy-section strong,
.terms-conditions-section strong {
    font-weight: 600; /* Ensure strong is bold */
    color: var(--text-color); /* Or var(--primary-color) if preferred for emphasis */
}

.privacy-policy-section a,
.terms-conditions-section a {
    color: var(--secondary-color); /* Standard link color */
    text-decoration: none; /* Remove underline by default */
}

.privacy-policy-section a:hover,
.terms-conditions-section a:hover {
    text-decoration: underline; /* Add underline on hover */
    color: var(--accent-color); /* Accent color on hover */
}

.privacy-policy-section .effective-date,
.terms-conditions-section .effective-date {
    text-align: center;
    font-style: italic;
    color: var(--gray);
    margin-bottom: 30px;
}

.privacy-policy-section address,
.terms-conditions-section address {
    font-style: normal;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    header .container {
        /* display: flex; */ /* Already commented out */
        /* justify-content: space-between; */ /* Already commented out */
        /* align-items: center; */ /* Already commented out */
        /* position: relative; */ /* Remove if not needed for specific mobile layout */
    }

    .logo {
        /* text-align: left; */ /* Default, no need to override unless specifically for mobile */
        flex-shrink: 0; /* Prevent logo from shrinking */
        min-width: 0; /* Allow logo to shrink if necessary, but h1 will control its own wrapping */
        /* max-width: 200px; */ /* Removed to allow h1 to define width */
    }
    
    .logo h1 {
        font-size: 1.3rem !important; /* Further reduced font size for mobile */
        white-space: nowrap !important; /* Prevent text wrapping */
        overflow: hidden; /* Hide overflow if text is too long */
        text-overflow: ellipsis; /* Add ellipsis if text is cut off */
        margin: 0;
        line-height: 1.2;
        display: inline-block; /* Ensure it behaves as a block to respect nowrap */
        word-break: normal !important;
        overflow-wrap: normal !important;
        letter-spacing: normal !important; /* Reset letter-spacing for mobile */
        /* width: auto; */ /* Removed as inline-block should handle width */
    }

    .header-controls { /* Wrapper for desktop switch and mobile toggle */
        /* display: flex; */ /* Removed as toggle is now outside this if it was ever in */
        /* align-items: center; */ /* Removed */
    }
    
    .desktop-language-switch {
        display: none; /* Hide desktop version on mobile */
    }
    
    .mobile-nav-toggle {
        display: block; /* Show hamburger on mobile */
        position: absolute; /* Positioning for mobile view */
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }
    
    .mobile-nav-toggle i {
        font-size: 1.5rem; /* Size of the bars/times icon */
        color: var(--primary-color); /* Color of the icon */
    }

    header nav { /* Ensure nav is full width for proper positioning of menu */
        /* width: 100%; */ /* This might not be needed if ul is positioned fixed */
    }
    
    header nav > ul { /* This is the Off-Canvas Panel */
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -300px; 
        width: 280px; 
        height: 100vh;
        background-color: rgba(44, 62, 80, 0.95); 
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        padding-top: 20px; 
        padding-left: 20px; 
        padding-right: 20px; 
        padding-bottom: 30px;
        z-index: 99999; 
        transition: right 0.3s ease-in-out; 
        overflow-y: auto; 
        box-sizing: border-box;
        pointer-events: auto;
    }

    /* Remove the spacer pseudo-element, rely on ul padding */
    /* header nav > ul::after {
        content: '';
        display: block;
        height: 60px; 
        width: 100%;
        flex-shrink: 0; 
    } */

    header nav > ul.mobile-menu-active {
        right: 0; /* Slide in by setting right to 0 */
    }

    /* Close button specific styles */
    header nav > ul li.mobile-menu-close-li {
        display: list-item !important; /* Added !important to ensure it's visible on mobile */
        width: 100%;
        text-align: right;
        margin-bottom: 15px; /* Space below close button */
    }
    .mobile-menu-close-btn {
        background: none;
    border: none;
        font-size: 1.6rem; /* Adjust size */
        color: var(--white); /* White X icon */
        cursor: pointer;
        padding: 5px;
    }
    .mobile-menu-close-btn:hover {
        color: var(--light-bg); /* Lighter color on hover */
    }

    header nav > ul li {
        margin-left: 0 !important; 
    width: 100%;
    }

    header nav > ul li a {
        display: block; 
        padding: 12px 0; /* Adjusted padding */
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Lighter border for white text */
        font-size: 1rem; 
        color: var(--white); /* White text for links */
    }
    header nav > ul li:last-child a, /* No border for the last actual nav item */
    header nav > ul li.language-switch-mobile-container a { /* No border for lang switch items */
        border-bottom: none; 
    }
    header nav > ul li a.active {
        font-weight: bold; /* Make active link bold */
        /* color: var(--primary-color); /* Or a contrasting color if needed */
    }
     header nav > ul li a:hover {
        background-color: rgba(255,255,255,0.1); /* Slight highlight on hover */
     }


    /* Styling for language switcher inside mobile menu */
    header nav > ul li.language-switch-mobile-container {
        display: list-item; /* Or block, ensure it's visible on mobile */
        padding-top: 5px; /* Added small padding at top */
        padding-bottom: 15px; 
        border-top: none; /* Removed separator line completely */
        margin-top: 5px; /* Changed to positive margin to create space */
        margin-bottom: 10px; 
        width: 100%;
        box-sizing: border-box; 
    }
    header nav > ul li.language-switch-mobile-container .language-switch {
        justify-content: center; 
        gap: 10px; 
        align-items: center; 
        width: 100%; 
        box-sizing: border-box;
    }
    header nav > ul li.language-switch-mobile-container .language-switch a {
        padding: 10px 15px 12px; /* Increased bottom padding from 10px to 12px to ensure bottom of text is visible */
        border: 1px solid var(--white); 
        border-radius: 20px;
        font-size: 0.9rem;
        color: var(--white); 
        background-color: transparent; 
        border-bottom: none !important; 
        line-height: 1.5; /* Slightly increased from 1.4 to 1.5 */
    display: inline-block;
        min-height: auto; 
        height: auto; 
        vertical-align: middle; 
        flex-grow: 1; 
        text-align: center; 
    }
    header nav > ul li.language-switch-mobile-container .language-switch a.active {
        background-color: var(--white); /* White background for active */
        color: var(--secondary-color); /* Blue text for active */
        border-color: var(--white);
}
    header nav > ul li.language-switch-mobile-container .language-switch a:not(.active):hover {
        background-color: rgba(255,255,255,0.2);
    }


    /* Overlay for when mobile menu is active */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: transparent; 
        z-index: 99998; /* Below menu, above all other elements */
        pointer-events: none;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    /* Prevent body scroll when menu is open */
    body.mobile-menu-open-no-scroll {
        overflow: hidden;
        height: 100%; /* Added */
    }

    /* Styles for accordion dropdown in mobile menu */
    header nav ul li.dropdown .dropdown-menu {
        position: static; /* Zmiana z absolute */
        display: none; /* Ukryte domyślnie, pokazywane przez JS po kliknięciu rodzica */
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        min-width: 100%;
        border: none;
        padding: 0;
        background-color: var(--light-bg); /* Lekkie tło dla odróżnienia */
    }

    header nav ul li.dropdown.open .dropdown-menu { /* Klasa .open dodawana przez JS */
        display: block;
    }

    header nav ul li.dropdown .dropdown-icon {
        /* Ikona strzałki w mobilnym menu */
        position: absolute; /* Pozycjonowanie względem rodzica <a> lub <li> */
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
        font-size: 0.8rem; /* Dostosowanie wielkości ikonki */
    }

    header nav ul li.dropdown.open .dropdown-icon {
        transform: translateY(-50%) rotate(180deg);
    }

    header nav ul .dropdown-menu li a {
        padding-left: 35px !important; /* Wcięcie dla linków podmenu */
        font-size: 0.9rem;
        border-bottom: 1px solid #e9ecef; /* Jaśniejsza linia */
    }
    header nav ul .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    /* Ukrywamy desktopowe menu rozwijane na hover (jeśli nie zostało to zrobione globalnie) */
    header nav ul li.dropdown:hover .dropdown-menu {
         display: none; /* Zapobiega pokazaniu na hover, jeśli JS kontroluje przez .open */
    }

    /* Upewniamy się, że po otwarciu przez klik i najechaniu, nadal będzie widoczne */
    header nav ul li.dropdown.open:hover .dropdown-menu {
        display: block;
    }

    /* Jeśli .dropdown-menu ma być pokazywane tylko po kliknięciu na rodzica w mobile */
    header nav ul li.dropdown.open .dropdown-menu {
        display: block;
}

} /* Closing bracket for @media (max-width: 768px) */

@media (max-width: 480px) {
    .logo {
        min-width: 0; /* Allow logo to shrink if necessary */
        /* max-width: 180px; */ /* Further reduced for very small screens, now removed */
    }

    .logo h1 {
        font-size: 1.1rem !important; /* Further reduced font size for very small screens */
        /* Ensure other properties from 768px are maintained or adjusted */
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
        line-height: 1.2;
        display: inline-block; /* Ensure it behaves as a block to respect nowrap */
        word-break: normal !important;
        overflow-wrap: normal !important;
        letter-spacing: normal !important; /* Reset letter-spacing for very small screens */
        /* width: auto; */ /* Removed as inline-block should handle width */
    }
    
    header .container {
        padding: 0 15px; /* Reduce padding on very small screens */
    }
}

/* Pozostałe style, w tym .promo-quiz-section .btn.primary */
.promo-quiz-section .btn.primary {
    width: 300px; /* Increased fixed width */
    /* min-width: 260px; */ 
    padding: 15px 30px; 
    font-size: 1.1rem; 
    margin-left: auto; /* Added for centering */
    margin-right: auto; /* Added for centering */
    display: block; /* Change to block for auto margins to work for centering */
    /* text-align: center; is from .btn and applies to content within the button */
}

/* Make html also take full height when menu is open to help child % heights */
html.mobile-menu-html-no-scroll {
    height: 100%;
    overflow: hidden;
}

body.mobile-menu-open-no-scroll {
    overflow: hidden;
    height: 100%; /* Added */
}