/*
 * Allintellect — wszystko poza stroną główną
 *
 * Pasek nawigacji i układ sekcji podstron działowych, strony polityk
 * (cookies, prywatność) oraz widoki, po które WordPress sięga sam:
 * lista wpisów, archiwa, wyszukiwarka i strona 404.
 *
 * Źródło: autorski CSS podstron allintellect.pl. Usunięte @import fontów
 * (ładowane przez wp_enqueue_style), ścieżki obrazów wskazują na motyw.
 */

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: Arial, sans-serif;
            background-color: white !important;
        }
        .custom-navbar {
            background-color: white !important;
            color: black;
            padding: 10px 15px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-bottom: 2px solid #ddd;
            position: relative;
        }
        .custom-menu {
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 12px;
            text-align: center;
            max-width: 90%;
        }
        .custom-menu li {
            display: flex;
            align-items: center;
        }
        .custom-menu li a {
            color: black;
            text-decoration: none;
            font-size: 13px;
            font-weight: bold;
            transition: color 0.3s;
            padding: 6px 10px;
            white-space: nowrap;
        }
        .custom-menu li a:hover {
            color: #FF5733;
        }
        .custom-mobile-menu {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            justify-content: center;
            width: 100%;
        }
        .custom-mobile-menu span {
            margin-right: 6px;
        }
        .custom-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            color: white;
            z-index: 1000;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .custom-overlay ul {
            list-style: none;
            padding: 0;
            text-align: center;
        }
        .custom-overlay ul li {
            margin: 15px 0;
        }
        .custom-overlay ul li a {
            color: white;
            text-decoration: none;
            font-size: 18px;
        }
        .custom-close-btn {
            position: absolute;
            top: 20px;
            right: 30px;
            font-size: 30px;
            cursor: pointer;
        }
        @media (max-width: 768px) {
            .custom-navbar {
                justify-content: center;
            }
            .custom-menu {
                display: none;
            }
            .custom-overlay.active {
                display: flex;
            }
        }

/* Pasek „Menu ▼" pokazuje się wyłącznie na telefonach — na produkcji ukrywały
   go klasy elementor-hidden-desktop i elementor-hidden-tablet. */
@media (min-width: 768px) {
	.custom-navbar,
	.custom-overlay { display: none; }
}


/* ─────────────────────────────────────────────────────────────
 * Strony polityk (cookies, prywatność)
 * ───────────────────────────────────────────────────────────── */

:root {
      --orange-primary: #ff6b35;
      --orange-light: #ff8a00;
      --orange-dark: #E36000;
      --white: #ffffff;
      --black: #222222;
      --text-gray: #666666;
      --light-gray: #f5f5f7;
      --font-main: 'Comfortaa', sans-serif;
      --spacing-base: 20px;
      --card-radius: 16px;
    }
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: var(--font-main) !important;
    }

    body {
      background-color: var(--white);
      color: var(--black);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    .policy-header {
      background: linear-gradient(135deg, #ff5722 0%, #ff6b35 20%, #ff8a00 50%, #ff9800 80%, #ffa500 100%);
      color: var(--white) !important;
      padding: calc(var(--spacing-base) * 3) var(--spacing-base);
      text-align: center;
    }

    .policy-header * {
      color: #ffffff !important;
    }

    .policy-title {
      font-size: clamp(32px, 5vw, 48px);
      font-weight: 700;
      margin-bottom: 16px;
      color: #ffffff !important;
      /* Fallback na wypadek gdyby biały nie działał */
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .policy-subtitle {
      font-size: clamp(16px, 2vw, 18px);
      max-width: 800px;
      margin: 0 auto;
      opacity: 0.95;
      color: #ffffff !important;
    }

    .policy-container {
      max-width: 900px;
      margin: 0 auto;
      padding: calc(var(--spacing-base) * 3) var(--spacing-base);
    }

    .policy-section {
      background: var(--light-gray);
      border-radius: var(--card-radius);
      padding: calc(var(--spacing-base) * 2);
      margin-bottom: calc(var(--spacing-base) * 2);
      border-left: 4px solid var(--orange-primary);
    }

    .policy-section h2 {
      font-size: 24px;
      font-weight: 700;
      color: var(--orange-dark);
      margin-bottom: 20px;
    }

    .policy-section h3 {
      font-size: 20px;
      font-weight: 600;
      color: var(--orange-primary);
      margin-top: 25px;
      margin-bottom: 15px;
    }

    .policy-section p {
      color: var(--text-gray);
      margin-bottom: 15px;
    }

    .policy-section ul, .policy-section ol {
      color: var(--text-gray);
      margin-left: 30px;
      margin-bottom: 20px;
    }

    .policy-section li {
      margin-bottom: 10px;
    }

    .policy-section strong {
      color: var(--black);
      font-weight: 600;
    }

    .policy-section a {
      color: var(--orange-primary);
      text-decoration: none;
      font-weight: 500;
      transition: all 0.3s ease;
    }

    .policy-section a:hover {
      color: var(--orange-dark);
      text-decoration: underline;
    }

    .cookie-table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0;
      font-size: 14px;
    }

    .cookie-table th, .cookie-table td {
      border: 1px solid #ddd;
      padding: 12px;
      text-align: left;
    }

    .cookie-table th {
      background-color: var(--orange-light);
      color: var(--white);
      font-weight: 600;
    }

    .cookie-table tr:nth-child(even) {
      background-color: rgba(255, 139, 0, 0.05);
    }

    .update-date {
      text-align: center;
      color: var(--text-gray);
      font-style: italic;
      margin-top: 40px;
      padding-top: 20px;
      border-top: 1px solid #ddd;
    }

    @media (max-width: 768px) {
      .policy-container {
        padding: calc(var(--spacing-base) * 2) var(--spacing-base);
      }

      .policy-section {
        padding: calc(var(--spacing-base) * 1.5);
      }

      .cookie-table {
        font-size: 12px;
      }

      .cookie-table th, .cookie-table td {
        padding: 8px;
      }
    }

/* ─────────────────────────────────────────────────────────────
 * Zwykłe strony, lista wpisów i strona 404
 *
 * Serwis składa się ze stron, ale WordPress musi mieć czym obsłużyć wpisy,
 * archiwa i wyszukiwarkę. Utrzymane w typografii reszty serwisu.
 * ───────────────────────────────────────────────────────────── */

.ai-page {
	font-family: var(--ai-font);
	color: #333;
}

.ai-page-inner {
	max-width: 860px;
	margin: 0 auto;
	padding: 40px 20px 60px;
	line-height: 1.7;
}

.ai-page-inner h2 { margin: 32px 0 12px; }
.ai-page-inner h3 { margin: 24px 0 10px; }
.ai-page-inner p { margin: 0 0 16px; }

.ai-page-inner a { color: var(--ai-orange-4); }

.policy-header__lead {
	margin: 12px 0 0;
	opacity: .9;
}

/* Lista wpisów */
.ai-lista-wpisow {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 30px;
}

.ai-wpis {
	display: flex;
	flex-direction: column;
	padding: 20px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.ai-wpis__obraz img {
	width: 100%;
	border-radius: 8px;
}

.ai-wpis__tytul {
	margin: 14px 0 6px;
	font-size: 20px;
	line-height: 1.3;
}

.ai-wpis__tytul a { text-decoration: none; }
.ai-wpis__tytul a:hover { color: var(--ai-orange-4); }

.ai-wpis__data {
	margin: 0 0 10px;
	color: #777;
	font-size: 13px;
}

/* Strona 404 — siatka działów dostaje oddech */
.ai-404 .ai-menu-grid { margin-top: 30px; }

.pagination,
.navigation.pagination {
	margin-top: 40px;
	text-align: center;
}

.nav-links .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px;
	border-radius: 6px;
	text-decoration: none;
	background: #f2f2f2;
}

.nav-links .page-numbers.current {
	background: var(--ai-orange-4);
	color: #fff;
}

/* Tło ostatniej sekcji podstrony — kolor i zdjęcie ustawia szablon,
   bo są różne dla każdego działu. */
.ai-tlo-sekcji {
	position: relative;
}

/* ─────────────────────────────────────────────────────────────
 * Odstępy pionowe podstron
 *
 * Sekcja formularza ma na produkcji margin-top: 36 px, a sekcje treści
 * po 22 px oddechu — to również pochodziło z kontenerów Elementora.
 * ───────────────────────────────────────────────────────────── */

.ai-tlo-sekcji { margin-top: 30px; padding-bottom: 22px; }

.contact-form-wrapper { margin-top: 36px; padding-bottom: 36px; }

/* ─────────────────────────────────────────────────────────────
 * Wejście sekcji przy przewijaniu
 *
 * Na podstronach każda sekcja treści miała w Elementorze animację
 * slideInUp, wyzwalaną przy wejściu w kadr. Klatki kluczowe i czas
 * (1,25 s) przepisane 1:1 z biblioteki Elementora.
 * ───────────────────────────────────────────────────────────── */

@keyframes aiSlideInUp {
	from { transform: translate3d(0, 100%, 0); visibility: visible; }
	to   { transform: translate3d(0, 0, 0); }
}

@keyframes aiFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/*
 * Ukrycie zakłada dopiero skrypt (klasa .is-czeka), a nie sam arkusz.
 * Gdyby JavaScript się nie wczytał, treść po prostu zostaje widoczna —
 * przy ukrywaniu w CSS zniknęłaby na dobre.
 */
.ai-wejscie.is-czeka { visibility: hidden; }

.ai-wejscie.is-widoczna {
	visibility: visible;
	animation-duration: 1.25s;
	animation-fill-mode: both;
	animation-name: aiSlideInUp;
}

.ai-wejscie--fade.is-widoczna { animation-name: aiFadeIn; }

/* Bez animacji, gdy ktoś prosi o ograniczenie ruchu albo nie ma JS-u. */
@media (prefers-reduced-motion: reduce) {
	.ai-wejscie.is-czeka { visibility: visible; }
	.ai-wejscie.is-widoczna { animation: none; }
}
