/**
 * Portal OPUS — Style specyficzne
 * Uzupelnienie design systemu GrantOMat (custom.css + portal-public.css)
 * Spolne z konkursy.opus.org.pl i zapisy.opus.org.pl
 */

/* ==========================================================================
   TOPBAR — accessibility + social
   ========================================================================== */

.portal-topbar {
    background: transparent;
    padding: 6px 0;
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    border-bottom: 1px solid var(--color-primary-100, #f3f4f6);
}

.portal-topbar a {
    color: var(--color-primary-600, #4b5563);
    text-decoration: none;
    transition: color 0.2s;
}

.portal-topbar a:hover {
    color: var(--color-primary-900, #111827);
}

.portal-topbar .social-icons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.portal-topbar .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--color-primary-500, #6b7280);
    font-size: 17px;
    transition: color 0.2s;
}

.portal-topbar .social-icons a:hover {
    color: var(--color-primary-900, #111827);
}

/* Flag link (mono) */
.flag-link {
    display: flex;
    align-items: center;
    margin-left: 8px;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.flag-link:hover {
    opacity: 0.8;
}

.accessibility-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accessibility-tools .font-btn {
    background: none;
    border: none;
    color: var(--color-primary-400, #9ca3af);
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 5px;
    font-weight: 500;
    transition: color 0.2s;
    line-height: 1;
}

.accessibility-tools .font-btn:hover,
.accessibility-tools .font-btn.active {
    color: var(--color-primary-700, #374151);
}

.accessibility-tools .font-btn--sm { font-size: 11px; }
.accessibility-tools .font-btn--md { font-size: 14px; }
.accessibility-tools .font-btn--lg { font-size: 18px; }

.accessibility-tools .contrast-btn {
    background: none;
    border: none;
    color: var(--color-primary-400, #9ca3af);
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 13px;
    transition: color 0.2s;
}

.accessibility-tools .contrast-btn:hover {
    color: var(--color-primary-700, #374151);
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    background: #fff;
    border: 1px solid var(--color-primary-300, #d1d5db);
    border-radius: 20px;
    color: var(--color-primary-900, #111827);
    padding: 5px 14px 5px 34px;
    font-size: 13px;
    width: 200px;
    transition: width 0.3s, border-color 0.2s;
}

.topbar-search input::placeholder {
    color: var(--color-primary-400, #9ca3af);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--color-accent-400, #34d399);
    width: 260px;
}

.topbar-search .search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary-400, #9ca3af);
    font-size: 13px;
    pointer-events: none;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.portal-navbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #fff;
    border-bottom: 1px solid var(--color-primary-200, #e5e7eb);
    transition: box-shadow 0.3s, background 0.3s;
}

.portal-navbar.scrolled {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.portal-navbar .navbar-brand img {
    height: 44px;
    max-width: 160px;
    object-fit: contain;
}

.portal-navbar .nav-link {
    color: var(--color-primary-700, #374151);
    font-weight: 500;
    font-size: 14px;
    padding: 10px 14px;
    transition: color 0.2s;
    white-space: nowrap;
}

.portal-navbar .nav-link:hover,
.portal-navbar .nav-link.active {
    color: var(--color-accent-600, #059669);
}

.portal-navbar .dropdown-menu {
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 8px;
    min-width: 220px;
}

.portal-navbar .dropdown-item {
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--color-primary-700, #374151);
    transition: background 0.15s;
}

.portal-navbar .dropdown-item:hover {
    background: var(--color-accent-50, #ecfdf5);
    color: var(--color-accent-700, #047857);
}

.btn-cta-grantomat {
    background: transparent;
    color: var(--color-accent-600, #059669) !important;
    border: 1.5px solid var(--color-accent-400, #34d399);
    border-radius: 8px;
    padding: 7px 18px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-cta-grantomat:hover {
    background: var(--color-accent-50, #ecfdf5);
    border-color: var(--color-accent-500, #10b981);
    color: var(--color-accent-700, #047857) !important;
}

.btn-cta-support {
    background: #e97a2b;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-cta-support:hover {
    background: #d4691e;
    color: #fff !important;
}

/* Navbar search */
.navbar-search {
    position: relative;
    margin-right: 12px;
}

.navbar-search input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 0;
    color: var(--color-primary-900, #111827);
    padding: 6px 8px 6px 28px;
    font-size: 13px;
    width: 140px;
    transition: width 0.3s, border-color 0.2s;
}

.navbar-search input::placeholder {
    color: var(--color-primary-400, #9ca3af);
}

.navbar-search input:focus {
    outline: none;
    width: 220px;
    border-bottom-color: var(--color-primary-400, #9ca3af);
}

.navbar-search .search-icon {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary-400, #9ca3af);
    font-size: 13px;
    pointer-events: none;
}

/* ==========================================================================
   HERO — portal home
   ========================================================================== */

.portal-hero {
    position: relative;
    background: #fff;
    padding: 80px 0 60px;
    overflow: hidden;
    border-bottom: 1px solid var(--color-primary-200, #e5e7eb);
}

/* Dot pattern background from image */
.portal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/hero-pattern.jpg') center center / cover no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

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

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

.portal-hero .hero-visual img {
    width: 100%;
    max-width: 520px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.portal-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-primary-900, #111827);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.portal-hero h1 .text-accent {
    color: var(--color-accent-600, #059669);
}

.portal-hero .hero-lead {
    font-size: 1.125rem;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

/* Hero Opusek — slim bar */
.hero-opusek-bar {
    max-width: 480px;
    margin-bottom: 32px;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 10px;
    background: var(--color-primary-50, #f9fafb);
    padding: 4px 8px 4px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: text;
}

.hero-opusek-bar:hover,
.hero-opusek-bar:focus-within {
    border-color: var(--color-accent-300, #6ee7b7);
    box-shadow: 0 2px 10px rgba(16,185,129,0.08);
}

.hero-opusek-bar > i {
    color: var(--color-accent-500, #10b981);
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 8px;
}

.hero-opusek-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 4px;
    font-size: 14px;
    color: var(--color-primary-900, #111827);
}

.hero-opusek-bar input::placeholder {
    color: var(--color-primary-400, #9ca3af);
}

.hero-opusek-bar input:focus {
    outline: none;
}

@media (max-width: 991px) {
    .hero-opusek-bar { max-width: 100%; }
}

/* ==========================================================================
   OPUSEK MODAL — search-style overlay
   ========================================================================== */

.opusek-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.opusek-modal-backdrop.open {
    display: block;
    animation: opusekFadeIn 0.2s ease-out;
}

.opusek-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1071;
    width: 520px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 80px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    flex-direction: column;
    overflow: hidden;
}

.opusek-modal.open {
    display: flex;
    animation: opusekScaleIn 0.25s ease-out;
}

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

@keyframes opusekScaleIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.opusek-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-primary-100, #f3f4f6);
}

.opusek-modal-header .opusek-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent-100, #d1fae5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-accent-600, #059669);
    flex-shrink: 0;
}

.opusek-modal-header h6 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary-900, #111827);
}

.opusek-modal-header span {
    font-size: 12px;
    color: var(--color-primary-400, #9ca3af);
}

.opusek-modal-close {
    background: var(--color-primary-100, #f3f4f6);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-primary-500, #6b7280);
    font-size: 14px;
    transition: background 0.15s;
}

.opusek-modal-close:hover {
    background: var(--color-primary-200, #e5e7eb);
}

.opusek-modal-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    max-height: 400px;
}

.opusek-modal-messages .opusek-msg {
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.55;
}

.opusek-modal-messages .opusek-quick {
    gap: 6px;
    margin-top: 4px;
}

.opusek-modal-messages .opusek-quick button {
    font-size: 12px;
    padding: 5px 12px;
}

.opusek-modal-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--color-primary-100, #f3f4f6);
}

.opusek-modal-input input {
    flex: 1;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--color-primary-900, #111827);
    background: var(--color-primary-50, #f9fafb);
    transition: border-color 0.2s;
}

.opusek-modal-input input::placeholder {
    color: var(--color-primary-400, #9ca3af);
}

.opusek-modal-input input:focus {
    outline: none;
    border-color: var(--color-accent-400, #34d399);
    background: #fff;
}

.opusek-modal-input button {
    background: var(--color-accent-500, #10b981);
    border: none;
    border-radius: 10px;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.opusek-modal-input button:hover {
    background: var(--color-accent-600, #059669);
}


/* Hero quick-links (4 boksy) */
.hero-quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 520px;
}

.hero-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 8px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-primary-700, #374151);
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.hero-quick-link:hover {
    border-color: var(--color-accent-300, #6ee7b7);
    box-shadow: 0 6px 20px rgba(16,185,129,0.1);
    transform: translateY(-2px);
    color: var(--color-accent-700, #047857);
}

.hero-quick-link i {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--color-accent-500, #10b981);
}

@media (max-width: 991px) {
    .portal-hero { padding: 50px 0 40px; }
    .portal-hero h1 { font-size: 2rem; }
    .hero-quick-links { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
    .hero-search { max-width: 100%; }
    .portal-hero .hero-visual { margin-top: 32px; text-align: center; }
}

@media (max-width: 575px) {
    .portal-hero h1 { font-size: 1.6rem; }
    .hero-quick-links { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   SHORTCUTS — "Na skróty" bar
   ========================================================================== */

.portal-shortcuts {
    padding: 28px 0;
    background: #fff;
    border-bottom: 1px solid var(--color-primary-100, #f3f4f6);
}

.shortcuts-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.shortcut-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 24px;
    text-decoration: none;
    color: var(--color-primary-700, #374151);
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.shortcut-item i {
    font-size: 15px;
    color: var(--color-accent-500, #10b981);
}

.shortcut-item:hover {
    border-color: var(--color-accent-300, #6ee7b7);
    background: var(--color-accent-50, #ecfdf5);
    color: var(--color-accent-700, #047857);
    box-shadow: 0 2px 8px rgba(16,185,129,0.08);
}

@media (max-width: 575px) {
    .shortcut-item {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* ==========================================================================
   SECTION COMMON
   ========================================================================== */

.portal-section {
    padding: 80px 0;
    background: #fff;
}

.portal-section--alt {
    background: #f2f4f7;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* Warm light variant */
.portal-section--warm {
    background: #fefcf8;
    border-top: 1px solid #f5f0e8;
    border-bottom: 1px solid #f5f0e8;
}

/* ==========================================================================
   BAZA WIEDZY — opisowa sekcja
   ========================================================================== */

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-600, #059669);
    margin-bottom: 14px;
}

.kb-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    line-height: 1.2;
    margin-bottom: 16px;
}

.kb-lead {
    font-size: 1.05rem;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.7;
    margin-bottom: 28px;
}

.kb-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kb-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.kb-stat > i {
    font-size: 22px;
    color: var(--color-accent-500, #10b981);
    margin-top: 2px;
    flex-shrink: 0;
}

.kb-stat strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-900, #111827);
    margin-bottom: 2px;
}

.kb-stat span {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
}

/* Visual grid (right side) */
.kb-visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 420px;
    margin: 0 auto;
}

.kb-visual-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary-700, #374151);
    transition: box-shadow 0.2s, transform 0.2s;
}

.kb-visual-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.kb-visual-item i {
    font-size: 24px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .kb-title { font-size: 1.6rem; }
    .kb-visual-grid { grid-template-columns: 1fr; max-width: 100%; }
}

.portal-section .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.portal-section .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.portal-section .section-header p {
    font-size: 1.05rem;
    color: var(--color-primary-500, #6b7280);
    max-width: 600px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: 40px;
}

.btn-section {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border: 2px solid var(--color-accent-500, #10b981);
    color: var(--color-accent-600, #059669);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-section:hover {
    background: var(--color-accent-500, #10b981);
    color: #fff;
    transform: translateY(-1px);
}

.btn-section--filled {
    background: linear-gradient(135deg, var(--color-accent-500, #10b981), var(--color-accent-600, #059669));
    color: #fff;
    border-color: transparent;
}

.btn-section--filled:hover {
    box-shadow: 0 4px 16px rgba(16,185,129,0.35);
    color: #fff;
}

/* ==========================================================================
   WAZNE TERAZ — konkursy + wydarzenia miniaturki
   ========================================================================== */

.important-card {
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.important-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.important-card .card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.important-card .card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.important-card .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    width: fit-content;
}

.card-badge--open {
    background: var(--color-accent-100, #d1fae5);
    color: var(--color-accent-700, #047857);
}

.card-badge--soon {
    background: #fef3c7;
    color: #92400e;
}

.card-badge--last-days {
    background: #fee2e2;
    color: #991b1b;
}

.card-badge--event {
    background: #dbeafe;
    color: #1e40af;
}

.important-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary-900, #111827);
    margin-bottom: 8px;
    line-height: 1.4;
}

.important-card .card-meta {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.important-card .card-meta i {
    margin-right: 3px;
    color: var(--color-accent-500, #10b981);
}

.important-card .card-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-accent-600, #059669);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.2s;
}

.important-card .card-link:hover {
    gap: 8px;
}

/* ==========================================================================
   CAROUSEL — scroll-snap horizontal
   ========================================================================== */

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 20px;
}

.section-header-row h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header-row h2 i {
    color: var(--color-accent-500, #10b981);
}

.section-header-row p {
    font-size: 1rem;
    color: var(--color-primary-500, #6b7280);
    margin: 0;
}

.carousel-nav {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    background: #fff;
    color: var(--color-primary-600, #4b5563);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.carousel-btn:hover {
    border-color: var(--color-accent-400, #34d399);
    background: var(--color-accent-50, #ecfdf5);
    color: var(--color-accent-700, #047857);
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.portal-breadcrumb {
    padding: 14px 0;
    font-size: 13px;
    color: var(--color-primary-400, #9ca3af);
    border-bottom: 1px solid var(--color-primary-100, #f3f4f6);
    background: #fff;
}

.portal-breadcrumb a {
    color: var(--color-primary-500, #6b7280);
    text-decoration: none;
    transition: color 0.2s;
}

.portal-breadcrumb a:hover {
    color: var(--color-accent-600, #059669);
}

.portal-breadcrumb i {
    font-size: 10px;
    margin: 0 6px;
    color: var(--color-primary-300, #d1d5db);
}

.portal-breadcrumb span {
    color: var(--color-primary-700, #374151);
    font-weight: 500;
}

/* ==========================================================================
   TEAM PROFILE CARD (zespol.html)
   ========================================================================== */

.team-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.team-profile-card:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,0.07);
    transform: translateY(-3px);
    border-color: var(--color-primary-300, #d1d5db);
    color: inherit;
}

.team-profile-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.team-profile-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin: 0 0 4px;
}

.team-profile-card .team-role {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent-600, #059669);
    display: block;
    margin-bottom: 10px;
}

.team-profile-card p {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.55;
    margin: 0 0 14px;
    flex: 1;
}

.team-profile-card .ucard-cta {
    margin-top: auto;
}

/* ==========================================================================
   PERSON PROFILE (osoba-single.html)
   ========================================================================== */

.person-sidebar {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.person-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fef5eb;
    box-shadow: 0 8px 24px rgba(240, 130, 27, 0.15);
    margin: 0 auto 18px;
    display: block;
}

.person-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.person-role {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #c96a15;
    background: #fef5eb;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
    letter-spacing: 0.01em;
}

.person-contact {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
    padding-top: 4px;
}

.person-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    padding: 10px 8px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s, color 0.15s;
    word-break: break-all;
}

.person-contact a:last-child { border-bottom: none; }

.person-contact a:hover {
    color: #F0821B;
    background: #fef9f2;
}

.person-contact i {
    color: #F0821B;
    font-size: 16px;
    flex-shrink: 0;
}

.person-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.person-tags span {
    font-size: 13px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--color-primary-50, #f9fafb);
    border: 1px solid var(--color-primary-200, #e5e7eb);
    color: var(--color-primary-700, #374151);
}

@media (max-width: 991px) {
    .person-sidebar { position: static; margin-bottom: 32px; }
    .person-photo { width: 140px; height: 140px; }
}

/* ==========================================================================
   UNIFIED CARD SYSTEM
   ========================================================================== */

/* --- Base card --- */
.ucard {
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.ucard:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,0.07);
    transform: translateY(-3px);
    border-color: var(--color-primary-300, #d1d5db);
    color: inherit;
}

/* In carousel */
.carousel-track .ucard {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

/* In grid */
.row .ucard {
    width: 100%;
    height: 100%;
}

/* --- Card visual (logo / poster) --- */
.ucard-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Competition logo */
.ucard-visual--logo {
    height: 110px;
    background: #f7f8fa;
    padding: 20px 24px;
}

.ucard-visual--logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Event poster */
.ucard-visual--poster {
    height: 220px;
    background: #fff;
}

.ucard-visual--poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Card body --- */
.ucard-body {
    padding: 24px 26px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Status / deadline row */
.ucard-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-primary-500, #6b7280);
}

.ucard-status i {
    font-size: 14px;
}

.ucard-status--deadline {
    color: #b91c1c;
}

.ucard-status--deadline i {
    color: #dc2626;
}

/* Type pill */
.ucard-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    color: var(--color-primary-600, #4b5563);
    background: var(--color-primary-50, #f9fafb);
    width: fit-content;
    margin-bottom: 10px;
}

.ucard-type i {
    font-size: 12px;
    color: var(--color-primary-400, #9ca3af);
}

/* Title */
.ucard-body h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 12px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* Metrics (competition params) */
.ucard-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
}

.ucard-metric {
    display: flex;
    flex-direction: column;
}

.ucard-metric-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-primary-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.ucard-metric-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-800, #1f2937);
}

/* Meta (location, time) */
.ucard-meta {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
}

.ucard-meta i {
    margin-right: 3px;
    color: var(--color-primary-400, #9ca3af);
}

/* Tags */
.ucard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.ucard-tags span {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--color-primary-50, #f9fafb);
    color: var(--color-primary-600, #4b5563);
    border: 1px solid var(--color-primary-100, #f3f4f6);
}

/* Description */
.ucard-body p {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    margin: 0 0 16px;
    line-height: 1.6;
}

/* CTA */
.ucard-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-accent-600, #059669);
    transition: gap 0.2s;
    padding-top: 4px;
}

.ucard:hover .ucard-cta {
    gap: 10px;
}

/* Strong CTA (for competitions) */
.ucard-cta--strong {
    background: var(--color-accent-50, #ecfdf5);
    border: 1px solid var(--color-accent-200, #a7f3d0);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    transition: background 0.2s, gap 0.2s;
}

.ucard:hover .ucard-cta--strong {
    background: var(--color-accent-100, #d1fae5);
}

/* --- Event card width in carousel --- */
.carousel-track .ucard--event {
    flex: 0 0 300px;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .carousel-track .ucard { flex: 0 0 280px; }
    .carousel-track .ucard--event { flex: 0 0 260px; }
    .ucard-visual--poster { height: 180px; }
    .ucard-body { padding: 20px; }
    .section-header-row { flex-direction: column; align-items: flex-start; }
    .section-header-row h2 { font-size: 1.5rem; }
    .ucard-metrics { gap: 14px; }
}

@media (min-width: 768px) {
    .ucard-body { padding: 28px 30px 30px; }
}

/* Inline date row inside card body */
.card-date-inline {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--color-accent-700, #047857);
}

.card-date-inline .date-day {
    font-size: 1.1rem;
    font-weight: 700;
}

.card-date-inline .date-month {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

.card-date-inline .date-time {
    color: var(--color-primary-500, #6b7280);
    font-weight: 400;
    margin-left: 4px;
}

/* Deadline variant for inline date */
.card-date-inline.card-date--deadline {
    color: #b91c1c;
}

.card-date-inline.card-date--deadline .date-time {
    color: #dc2626;
}

/* Date highlight */
.card-date {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-accent-50, #ecfdf5);
    border: 1px solid var(--color-accent-200, #a7f3d0);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 52px;
    margin-right: 12px;
    flex-shrink: 0;
}

.card-date .date-day {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent-700, #047857);
    line-height: 1;
}

.card-date .date-month {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent-600, #059669);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Deadline variant (red tones for competition deadlines) */
.card-date--deadline {
    background: #fef2f2;
    border-color: #fecaca;
}

.card-date--deadline .date-day {
    color: #b91c1c;
}

.card-date--deadline .date-month {
    color: #dc2626;
}

/* Small section button */
.btn-section--sm {
    font-size: 13px;
    padding: 8px 20px;
}

/* ==========================================================================
   WSPARCIE — kafle oferty
   ========================================================================== */

.support-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.15);
}

.support-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.support-card:hover img {
    transform: scale(1.05);
}

.support-card .support-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.7) 100%);
}

.support-card h4 {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 20px;
    margin: 0;
}

/* Help cards — 5 kafli z leadami */
.help-card {
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 14px;
    text-decoration: none;
    color: var(--color-primary-700, #374151);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    height: 100%;
}

.help-card:hover {
    border-color: var(--color-accent-300, #6ee7b7);
    box-shadow: 0 8px 28px rgba(16,185,129,0.1);
    transform: translateY(-3px);
    color: var(--color-primary-700, #374151);
}

.help-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-accent-50, #ecfdf5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.help-card-icon i {
    font-size: 22px;
    color: var(--color-accent-600, #059669);
}

.help-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 8px;
    line-height: 1.3;
}

.help-card p {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}

.help-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-accent-600, #059669);
    font-weight: 600;
    font-size: 13px;
    transition: gap 0.2s;
}

.help-card:hover .help-card-link {
    gap: 8px;
}

@media (max-width: 991px) {
    .help-card { padding: 22px 18px; }
}

/* ==========================================================================
   PROJEKTY — carousel/grid
   ========================================================================== */

.project-card {
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
    height: 100%;
}

.project-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.project-card .project-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--color-primary-100, #f3f4f6);
}

.project-card .project-body {
    padding: 16px 18px;
}

.project-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary-800, #1f2937);
    margin: 0 0 6px;
    line-height: 1.35;
}

.project-card .project-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent-600, #059669);
}

/* ==========================================================================
   AKTUALNOSCI — karty
   ========================================================================== */

.news-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}

.news-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.news-card .news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .news-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card .news-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent-600, #059669);
    background: var(--color-accent-50, #ecfdf5);
    padding: 3px 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    width: fit-content;
}

.news-card .news-date {
    font-size: 13px;
    color: var(--color-primary-400, #9ca3af);
    margin-bottom: 6px;
}

.news-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary-900, #111827);
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   PROJECT SUBNAV (sticky)
   ========================================================================== */

.project-subnav {
    background: var(--color-primary-900, #111827);
    position: sticky;
    top: var(--navbar-height, 60px);
    z-index: 1030;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.project-subnav-scroll {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 0;
}

.project-subnav-scroll::-webkit-scrollbar { display: none; }

.project-subnav-scroll a {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.project-subnav-scroll a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.project-subnav-scroll a.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

/* ==========================================================================
   PROJECT TIMELINE
   ========================================================================== */

.project-timeline {
    position: relative;
    padding-left: 24px;
}

.project-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--color-primary-200, #e5e7eb);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--color-primary-300, #d1d5db);
    flex-shrink: 0;
    margin-left: -24px;
    margin-top: 2px;
    z-index: 1;
}

.timeline-dot.done {
    background: var(--color-accent-500, #10b981);
    border-color: var(--color-accent-500, #10b981);
}

.timeline-dot.active {
    background: #fff;
    border-color: var(--color-accent-500, #10b981);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-content strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 2px;
}

.timeline-content span {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
}

/* ==========================================================================
   DOCUMENT CARD
   ========================================================================== */

.doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 14px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
}

.doc-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.doc-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-900, #111827);
    margin-bottom: 2px;
}

.doc-card span {
    font-size: 12px;
    color: var(--color-primary-400, #9ca3af);
}

/* ==========================================================================
   TEAM MINI CARD (project page)
   ========================================================================== */

.team-mini-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 16px;
    height: 100%;
}

.team-mini-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.team-mini-card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 2px;
}

.team-mini-role {
    display: block;
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    margin-bottom: 6px;
}

/* ==========================================================================
   PROJECT HUB TILE (konkursy/wydarzenia/aktualności)
   ========================================================================== */

.project-hub-tile {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 20px;
    padding: 28px 26px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.project-hub-tile:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,0.07);
    transform: translateY(-3px);
    border-color: var(--color-primary-300, #d1d5db);
    color: inherit;
}

.project-hub-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.project-hub-tile-icon i {
    font-size: 22px;
}

.project-hub-tile-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 8px;
}

.project-hub-tile-body p {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-hub-tile-stat {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
}

.project-hub-tile-stat strong {
    color: var(--color-primary-900, #111827);
}

.project-hub-tile .ucard-cta {
    margin-top: auto;
}

@media (max-width: 767px) {
    .project-subnav { top: 0; }
    .project-subnav-scroll a { padding: 6px 12px; font-size: 12px; }
    .team-mini-card { padding: 16px; }
    .team-mini-card img { width: 52px; height: 52px; }
    .project-hub-tile { padding: 22px 20px; }
    .project-hub-tile-stat { flex-direction: column; gap: 4px; }
}

/* ==========================================================================
   ABOUT OPUS — stats + values
   ========================================================================== */

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about-stat {
    display: flex;
    flex-direction: column;
}

.about-stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary-900, #111827);
    line-height: 1;
    margin-bottom: 4px;
}

.about-stat-label {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.4;
}

/* Values cards (right column) */
.about-values {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-value-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.about-value-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.about-value-item > i {
    font-size: 22px;
    color: var(--color-accent-500, #10b981);
    margin-top: 2px;
    flex-shrink: 0;
}

.about-value-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 2px;
}

.about-value-item span {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
}

/* ==========================================================================
   TEAM CAROUSEL
   ========================================================================== */

.team-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
    text-align: center;
    padding: 20px 12px;
}

.team-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-card:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.team-card h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin: 0 0 2px;
    line-height: 1.3;
}

.team-card span {
    font-size: 12px;
    color: var(--color-primary-500, #6b7280);
}

@media (max-width: 767px) {
    .about-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
    .about-stat-num { font-size: 1.6rem; }
    .team-card { flex: 0 0 150px; }
    .team-card img { width: 80px; height: 80px; }
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-section {
    padding: 80px 0;
    background: #fff;
}

.contact-wrapper {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    box-shadow: 0 8px 40px rgba(0,0,0,0.04);
}

/* Left visual panel */
.contact-visual {
    background: var(--color-primary-900, #111827);
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.contact-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/hero-pattern.jpg') center / cover no-repeat;
    opacity: 0.04;
}

.contact-visual-inner {
    position: relative;
    z-index: 1;
    padding: 48px 40px;
    color: #fff;
}

.contact-logo {
    height: 36px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.contact-visual-inner h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.contact-visual-inner > p {
    font-size: 15px;
    color: var(--color-primary-400, #9ca3af);
    line-height: 1.6;
    margin-bottom: 36px;
}

.contact-visual-stats {
    display: flex;
    gap: 28px;
}

.contact-stat {
    display: flex;
    flex-direction: column;
}

.contact-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-accent-400, #34d399);
    line-height: 1;
    margin-bottom: 4px;
}

.contact-stat-label {
    font-size: 12px;
    color: var(--color-primary-400, #9ca3af);
    font-weight: 500;
}

/* Right details panel */
.contact-details {
    padding: 40px 44px;
    background: var(--color-primary-50, #f9fafb);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-primary-200, #e5e7eb);
}

.contact-item:first-child {
    padding-top: 0;
}

.contact-item:last-of-type {
    border-bottom: none;
}

.contact-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item-icon i {
    font-size: 18px;
    color: var(--color-primary-600, #4b5563);
}

.contact-item-content h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin: 0 0 4px;
}

.contact-item-content > p {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    margin: 0 0 8px;
}

.contact-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.contact-item-links a,
.contact-item-links span {
    font-size: 13px;
    color: var(--color-primary-600, #4b5563);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.contact-item-links a:hover {
    color: var(--color-accent-600, #059669);
}

.contact-item-links i {
    font-size: 14px;
    color: var(--color-primary-400, #9ca3af);
}

.contact-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 991px) {
    .contact-visual { min-height: auto; }
    .contact-visual-inner { padding: 36px 28px; }
    .contact-details { padding: 32px 28px; }
    .contact-visual-stats { gap: 20px; }
    .contact-actions { flex-direction: column; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.portal-footer {
    background: var(--color-primary-900, #111827);
    color: var(--color-primary-300, #d1d5db);
    padding: 60px 0 0;
}

.portal-footer h5 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.portal-footer a {
    color: var(--color-primary-400, #9ca3af);
    text-decoration: none;
    transition: color 0.2s;
}

.portal-footer a:hover {
    color: var(--color-accent-400, #34d399);
}

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

.portal-footer ul li {
    margin-bottom: 8px;
    font-size: 14px;
}

.portal-footer .footer-contact i {
    width: 20px;
    color: var(--color-accent-400, #34d399);
    margin-right: 8px;
}

.portal-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    margin-top: 40px;
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
}

.portal-footer .footer-social {
    display: flex;
    gap: 10px;
}

.portal-footer .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: var(--color-primary-300, #d1d5db);
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
}

.portal-footer .footer-social a:hover {
    background: var(--color-accent-600, #059669);
    color: #fff;
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */

@media (max-width: 991px) {
    .portal-topbar .d-none-mobile { display: none !important; }

    .portal-navbar .navbar-collapse {
        background: #fff;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        padding: 16px;
        border: 1px solid var(--color-primary-200, #e5e7eb);
        border-top: none;
    }

    .portal-navbar .nav-link {
        padding: 10px 12px;
        border-radius: 8px;
    }

    .portal-navbar .nav-link:hover {
        background: var(--color-accent-50, #ecfdf5);
    }
}

@media (max-width: 767px) {
    .portal-section { padding: 50px 0; }
    .portal-section .section-header h2 { font-size: 1.6rem; }
    .portal-footer { padding: 40px 0 0; }
}

/* ==========================================================================
   OPUSEK — Chatbot
   ========================================================================== */

/* Navbar trigger button */
.btn-opusek {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 20px;
    padding: 6px 14px 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary-600, #4b5563);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    margin-right: 12px;
}

.btn-opusek i {
    color: var(--color-accent-500, #10b981);
    font-size: 15px;
}

.btn-opusek:hover {
    border-color: var(--color-accent-300, #6ee7b7);
    color: var(--color-accent-700, #047857);
    background: var(--color-accent-50, #ecfdf5);
}

/* Floating trigger (mobile + always visible) */
.opusek-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1060;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-500, #10b981), var(--color-accent-600, #059669));
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16,185,129,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.opusek-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(16,185,129,0.45);
}

.opusek-fab .fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc2626;
    border: 2px solid #fff;
}

.opusek-fab.open {
    display: none;
}

/* Chat window */
.opusek-chat {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1061;
    width: 380px;
    max-height: 560px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: opusekSlideUp 0.25s ease-out;
}

.opusek-chat.open {
    display: flex;
}

@keyframes opusekSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Chat header */
.opusek-header {
    background: linear-gradient(135deg, var(--color-accent-500, #10b981), var(--color-accent-600, #059669));
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.opusek-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.opusek-header-info h6 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.opusek-header-info span {
    font-size: 12px;
    opacity: 0.85;
}

.opusek-close {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.opusek-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Messages area */
.opusek-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 280px;
    max-height: 360px;
}

.opusek-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
}

.opusek-msg--bot {
    align-self: flex-start;
    background: var(--color-primary-50, #f9fafb);
    color: var(--color-primary-800, #1f2937);
    border-bottom-left-radius: 4px;
}

.opusek-msg--user {
    align-self: flex-end;
    background: var(--color-accent-500, #10b981);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.opusek-msg a {
    color: var(--color-accent-600, #059669);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.opusek-msg--user a {
    color: #fff;
}

.opusek-msg--bot .typing-dots {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}

.opusek-msg--bot .typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary-400, #9ca3af);
    animation: typingBounce 1.2s infinite;
}

.opusek-msg--bot .typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.opusek-msg--bot .typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Quick replies */
.opusek-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.opusek-quick button {
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 18px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-primary-700, #374151);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.opusek-quick button:hover {
    border-color: var(--color-accent-400, #34d399);
    background: var(--color-accent-50, #ecfdf5);
    color: var(--color-accent-700, #047857);
}

/* Input bar */
.opusek-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--color-primary-100, #f3f4f6);
    flex-shrink: 0;
}

.opusek-input input {
    flex: 1;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    color: var(--color-primary-900, #111827);
    background: var(--color-primary-50, #f9fafb);
    transition: border-color 0.2s;
}

.opusek-input input::placeholder {
    color: var(--color-primary-400, #9ca3af);
}

.opusek-input input:focus {
    outline: none;
    border-color: var(--color-accent-400, #34d399);
    background: #fff;
}

.opusek-input button {
    background: var(--color-accent-500, #10b981);
    border: none;
    border-radius: 10px;
    color: #fff;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.opusek-input button:hover {
    background: var(--color-accent-600, #059669);
}

@media (max-width: 480px) {
    .opusek-chat {
        width: calc(100vw - 16px);
        right: 8px;
        bottom: 8px;
        max-height: calc(100vh - 80px);
        border-radius: 14px;
    }
    .opusek-fab {
        bottom: 16px;
        right: 16px;
    }
}

/* ==========================================================================
   SWIPER OVERRIDES & PORTAL-SWIPER
   ========================================================================== */

.portal-swiper {
    overflow: hidden;
}

.portal-swiper .swiper-slide {
    width: auto;
    height: auto;
}

.portal-swiper .ucard {
    height: 100%;
}

/* Slide widths */
.portal-swiper .ucard--event {
    width: 300px;
}

.portal-swiper .team-card {
    width: 180px;
}

/* Help cards — mosaic grid 3+2 on desktop, swiper on mobile */
@media (min-width: 992px) {
    #helpSwiper {
        overflow: visible !important;
    }

    #helpSwiper .swiper-wrapper {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
        transform: none !important;
    }

    #helpSwiper .swiper-slide {
        width: auto !important;
        margin: 0 !important;
    }

    /* Row 1: 3 items spanning 2 cols each */
    #helpSwiper .swiper-slide:nth-child(1),
    #helpSwiper .swiper-slide:nth-child(2),
    #helpSwiper .swiper-slide:nth-child(3) {
        grid-column: span 2;
    }

    /* Row 2: 2 items centered — offset by 1 col each side */
    #helpSwiper .swiper-slide:nth-child(4) {
        grid-column: 2 / span 2;
    }
    #helpSwiper .swiper-slide:nth-child(5) {
        grid-column: 4 / span 2;
    }
}

#helpSwiper .help-card {
    height: 100%;
}

@media (max-width: 991px) {
    #helpSwiper .swiper-slide {
        width: 240px;
    }
}

/* ==========================================================================
   OFFER PAGE — tiles + service cards
   ========================================================================== */

/* Clickable photo tiles */
.offer-tile {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 220px;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.offer-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

.offer-tile__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
    transition: background 0.3s;
}

.offer-tile:hover .offer-tile__overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.75) 100%);
}

.offer-tile__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: #fff;
    z-index: 1;
}

.offer-tile__content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}

.offer-tile__content span {
    font-size: 13px;
    opacity: 0.85;
}

@media (max-width: 767px) {
    .offer-tile { height: 180px; }
    .offer-tile__content { padding: 14px; }
    .offer-tile__content h4 { font-size: 1rem; }
}

/* Section photo */
.offer-section-img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Service cards in offer sections */
.offer-service {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 14px;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}

.portal-section--alt .offer-service {
    background: #fff;
}

.offer-service:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.offer-service > i {
    font-size: 20px;
    color: var(--color-accent-500, #10b981);
    flex-shrink: 0;
    margin-top: 2px;
}

.offer-service strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-900, #111827);
    margin-bottom: 2px;
}

.offer-service span {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    line-height: 1.5;
}

/* ==========================================================================
   PROJECTS PAGE — toolbar + filters
   ========================================================================== */

.projects-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 24px;
    padding: 24px 28px;
    background: var(--color-primary-50, #f9fafb);
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 16px;
}

.projects-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.projects-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary-400, #9ca3af);
    font-size: 15px;
}

.projects-search input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: var(--color-primary-900, #111827);
    transition: border-color 0.2s;
}

.projects-search input:focus {
    outline: none;
    border-color: var(--color-accent-400, #34d399);
}

.projects-search input::placeholder {
    color: var(--color-primary-400, #9ca3af);
}

.projects-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary-400, #9ca3af);
}

.filter-group select {
    padding: 9px 36px 9px 14px;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    border-radius: 10px;
    font-size: 13px;
    color: var(--color-primary-700, #374151);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 150px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-accent-400, #34d399);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.08);
}

.filter-group select:hover {
    border-color: var(--color-primary-300, #d1d5db);
}

.projects-count {
    font-size: 13px;
    color: var(--color-primary-500, #6b7280);
    margin-bottom: 20px;
}

.projects-empty {
    text-align: center;
    padding: 60px 0;
}

@media (max-width: 767px) {
    .projects-toolbar { padding: 16px 18px; }
    .projects-search { min-width: 100%; }
    .filter-group select { min-width: 100px; }
}

/* Projects — always swiper carousel */
#projectsSwiper .swiper-slide {
    width: 280px;
}

#projectsSwiper .project-card {
    height: 100%;
}

@media (max-width: 767px) {
    #projectsSwiper .swiper-slide {
        width: 240px;
    }
}

/* Swiper nav buttons (custom, outside swiper) */
.swiper-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-primary-200, #e5e7eb);
    background: #fff;
    color: var(--color-primary-600, #4b5563);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.swiper-nav-btn:hover {
    border-color: var(--color-primary-400, #9ca3af);
    background: var(--color-primary-50, #f9fafb);
}

.swiper-nav-btn.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}

/* ==========================================================================
   MOBILE DROPDOWN MENU — ładniejsze
   ========================================================================== */

@media (max-width: 991px) {
    .portal-topbar .d-none-mobile { display: none !important; }

    .portal-navbar .navbar-collapse {
        background: #fff;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 16px 48px rgba(0,0,0,0.12);
        padding: 20px;
        border: 1px solid var(--color-primary-200, #e5e7eb);
        border-top: none;
        margin-top: 4px;
    }

    .portal-navbar .nav-link {
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 15px;
    }

    .portal-navbar .nav-link:hover,
    .portal-navbar .nav-link:focus {
        background: var(--color-primary-50, #f9fafb);
    }

    /* Dropdown w mobile */
    .portal-navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        padding: 4px 0 4px 16px;
        background: transparent;
        min-width: auto;
    }

    .portal-navbar .dropdown-item {
        padding: 10px 16px;
        border-radius: 8px;
        font-size: 14px;
        color: var(--color-primary-500, #6b7280);
    }

    .portal-navbar .dropdown-item:hover {
        background: var(--color-primary-50, #f9fafb);
        color: var(--color-primary-900, #111827);
    }

    /* CTA buttons w mobile menu */
    .portal-navbar .btn-opusek,
    .portal-navbar .btn-cta-grantomat,
    .portal-navbar .btn-cta-support {
        width: 100%;
        justify-content: center;
        margin: 4px 0;
    }

    .portal-navbar .flag-link {
        display: flex !important;
        justify-content: center;
        margin: 8px 0 0;
    }

    .portal-navbar .carousel-nav { display: none; }
}

/* ==========================================================================
   MOBILE FULL — paddingi, rozmiary, layout
   ========================================================================== */

@media (max-width: 767px) {
    /* Sekcje */
    .portal-section { padding: 48px 0; }
    .portal-section .section-header { margin-bottom: 32px; }
    .portal-section .section-header h2,
    .section-header-row h2 { font-size: 1.4rem; }
    .portal-section .section-header p,
    .section-header-row p { font-size: 0.9rem; }

    /* Hero */
    .portal-hero { padding: 48px 0 36px; }
    .portal-hero h1 { font-size: 1.6rem; }
    .portal-hero .hero-lead { font-size: 0.95rem; margin-bottom: 24px; }
    .portal-hero .hero-visual img { border-radius: 12px; }
    .hero-quick-links { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hero-quick-link { padding: 14px 6px; font-size: 12px; }
    .hero-quick-link i { font-size: 22px; }

    /* Opusek bar */
    .hero-opusek-bar { max-width: 100%; margin-bottom: 24px; }

    /* Section header row */
    .section-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    /* Swiper slides */
    .portal-swiper .ucard--event { width: 260px; }
    .portal-swiper .team-card { width: 140px; }
    .ucard-visual--poster { height: 180px; }
    .ucard-visual--logo { height: 90px; padding: 16px; }
    .ucard-body { padding: 18px !important; }

    /* Help cards */
    .help-card { padding: 20px 16px; }
    .help-card h4 { font-size: 0.9rem; }
    .help-card p { font-size: 12px; }

    /* About */
    .about-stats { gap: 14px; }
    .about-stat-num { font-size: 1.5rem; }
    .about-value-item { padding: 16px 18px; }
    .kb-title { font-size: 1.4rem; }
    .kb-lead { font-size: 0.95rem; }
    .kb-visual-grid { grid-template-columns: 1fr; }

    /* Contact */
    .contact-wrapper { border-radius: 16px; }
    .contact-visual-inner { padding: 28px 22px; }
    .contact-visual-inner h3 { font-size: 1.4rem; }
    .contact-visual-stats { flex-direction: column; gap: 16px; }
    .contact-details { padding: 24px 22px; }
    .contact-actions { flex-direction: column; }

    /* Footer */
    .portal-footer { padding: 36px 0 0; }
    .portal-footer h5 { font-size: 0.9rem; }

    /* Carousel nav buttons — smaller on mobile */
    .swiper-nav-btn { width: 34px; height: 34px; font-size: 14px; }

    /* Project cards */
    .project-card .project-img { height: 120px; }
    .project-card .project-body { padding: 12px 14px; }
    .project-card h4 { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .portal-hero h1 { font-size: 1.35rem; }
    .hero-quick-links { gap: 8px; }
    .hero-quick-link { padding: 12px 4px; }
    .portal-swiper .ucard--event { width: 240px; }
    .help-card-icon { width: 40px; height: 40px; }
    .help-card-icon i { font-size: 18px; }
    .ucard-metrics { flex-direction: column; gap: 8px; }
}

/* ==========================================================================
   SUBPAGE MOBILE OVERRIDES
   ========================================================================== */

@media (max-width: 991px) {
    /* Wsparcie — offer tiles */
    .offer-tile { height: 180px; }

    /* Wsparcie — sections photo + text stacking */
    .offer-section-img { margin-bottom: 24px; }

    /* Projekt single — hub tiles stack */
    .project-hub-tile { padding: 22px 20px; }

    /* Kontakt — centrala dark box */
    .kontakt-centrala { flex-direction: column !important; gap: 20px !important; }

    /* Opusek modal */
    .opusek-modal { width: calc(100vw - 16px); }
}

@media (max-width: 767px) {
    /* Breadcrumb */
    .portal-breadcrumb { font-size: 12px; padding: 10px 0; }
    .portal-breadcrumb i { margin: 0 4px; }

    /* Wsparcie — offer tiles smaller */
    .offer-tile { height: 160px; }
    .offer-tile__content { padding: 14px; }
    .offer-tile__content h4 { font-size: 0.95rem; }
    .offer-tile__content span { font-size: 12px; }

    /* Offer service cards */
    .offer-service { padding: 14px 16px; gap: 10px; }
    .offer-service > i { font-size: 18px; }
    .offer-service strong { font-size: 13px; }
    .offer-service span { font-size: 12px; }

    /* Projekt single — hero */
    .project-hub-tile-stat { flex-direction: column; gap: 4px; }

    /* Projekt single — timeline */
    .project-timeline { padding-left: 20px; }
    .timeline-dot { margin-left: -20px; width: 14px; height: 14px; }

    /* Projekt single — team mini cards */
    .team-mini-card { padding: 16px; gap: 12px; }
    .team-mini-card img { width: 48px; height: 48px; }
    .team-mini-card strong { font-size: 14px; }

    /* Projekt single — doc cards */
    .doc-card { padding: 14px 16px; gap: 10px; }
    .doc-card i { font-size: 22px !important; }
    .doc-card strong { font-size: 13px; }

    /* Projekty lista — toolbar */
    .projects-toolbar { padding: 16px; flex-direction: column; }
    .projects-search { min-width: 100%; }
    .projects-filters { width: 100%; }
    .filter-group { flex: 1; min-width: calc(50% - 6px); }
    .filter-group select { min-width: 100%; width: 100%; }

    /* Aktualności single — info box */
    .aktualnosc-info .col-sm-6 { flex: 0 0 100%; }

    /* Aktualności single — sidebar */
    .aktualnosc-sidebar { position: static !important; }

    /* Zespół — profile cards */
    .team-profile-card { padding: 24px 18px; }
    .team-profile-card img { width: 100px; height: 100px; }
    .team-profile-card h5 { font-size: 0.95rem; }
    .team-profile-card p { font-size: 12px; }

    /* Osoba single — sidebar */
    .person-sidebar { text-align: center; margin-bottom: 28px; }
    .person-photo { width: 120px; height: 120px; }
    .person-name { font-size: 1.3rem; }
    .person-contact { align-items: center; }

    /* Kontakt — biuro centralne dark box */
    [style*="background:var(--color-primary-900)"] { padding: 24px 20px !important; }

    /* Kontakt — biura lokalne */
    .kontakt-biuro { padding: 18px !important; }

    /* Kontakt — formularz */
    .form-control, .form-select { font-size: 14px; }

    /* O OPUS — stats */
    .about-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .about-stat-num { font-size: 1.4rem; }
    .about-value-item { padding: 16px 18px; gap: 12px; }
    .about-value-item > i { font-size: 18px; }

    /* Baza wiedzy — KB visual */
    .kb-visual-grid { grid-template-columns: 1fr; gap: 10px; }
    .kb-visual-item { padding: 12px; font-size: 12px; }
    .kb-title { font-size: 1.3rem; }
    .kb-lead { font-size: 0.9rem; }

    /* Contact section on home */
    .contact-wrapper { border-radius: 14px; }
    .contact-visual-inner { padding: 24px 18px; }
    .contact-visual-inner h3 { font-size: 1.2rem; }
    .contact-visual-stats { flex-direction: column; gap: 12px; }
    .contact-stat-num { font-size: 1.3rem; }
    .contact-details { padding: 24px 18px; }
    .contact-item { gap: 12px; padding: 16px 0; }
    .contact-item-icon { width: 38px; height: 38px; }
    .contact-item-content h5 { font-size: 14px; }
    .contact-actions { flex-direction: column; gap: 10px; }

    /* Section headers all pages */
    .section-header h1 { font-size: 1.5rem; }
    .section-header p { font-size: 0.9rem; }

    /* Ucard body on smaller screens */
    .ucard-body h4 { font-size: 0.9rem; }
    .ucard-body p { font-size: 12px; }
    .ucard-visual--poster { height: 180px; }
    .ucard-visual--logo { height: 100px; padding: 14px; }
}

@media (max-width: 480px) {
    /* Offer tiles — 1 column */
    .offer-tile { height: 140px; }

    /* Project hub tiles — full width */
    .project-hub-tile-icon { width: 40px; height: 40px; }
    .project-hub-tile-icon i { font-size: 18px; }
    .project-hub-tile-body h4 { font-size: 0.95rem; }

    /* Team profile cards — smaller photos */
    .team-profile-card img { width: 80px; height: 80px; }

    /* Breadcrumb — truncate */
    .portal-breadcrumb { overflow-x: auto; white-space: nowrap; }

    /* Contact biuro centralne */
    .contact-visual-stats { gap: 10px; }
    .contact-stat-num { font-size: 1.1rem; }
}

/* === NAV LIST RESET (belt-and-suspenders dla menu z CMS) === */
.portal-navbar .navbar-nav,
.portal-navbar .navbar-nav li,
.portal-navbar .dropdown-menu,
.portal-navbar .dropdown-menu li {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.portal-navbar .navbar-nav li {
    padding-left: 0 !important;
}

/* === NAV — menu przy logo z lewej, przyciski z prawej === */
@media (min-width: 992px) {
    .portal-navbar .navbar-nav.mx-auto {
        margin-left: 16px !important;
        margin-right: auto !important;
    }
    .portal-navbar .btn-opusek,
    .portal-navbar .btn-site-search,
    .portal-navbar .btn-cta-grantomat,
    .portal-navbar .btn-cta-support,
    .portal-navbar .flag-link {
        flex-shrink: 0;
    }
}

/* === CMS SLIDER (portal-main-slider) === */
.portal-slider-section {
    width: 100%;
    margin: 40px 0;
}
.portal-main-slider {
    width: 100%;
    height: 480px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}
.portal-main-slider .swiper-slide.portal-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: stretch;
}
.portal-main-slider .portal-slide-mask {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.portal-main-slider .portal-slide-container {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    padding: 40px;
}

/* Pozycja pionowa */
.portal-slide--top .portal-slide-container { align-items: flex-start; }
.portal-slide--middle .portal-slide-container,
.portal-slide-container.portal-slide--middle { align-items: center; }
.portal-slide--bottom .portal-slide-container { align-items: flex-end; }

/* Pozycja pozioma */
.portal-slide--left.portal-slide-container,
.portal-slide--left .portal-slide-container { justify-content: flex-start; text-align: left; }
.portal-slide--center.portal-slide-container,
.portal-slide--center .portal-slide-container { justify-content: center; text-align: center; }
.portal-slide--right.portal-slide-container,
.portal-slide--right .portal-slide-container { justify-content: flex-end; text-align: right; }

.portal-main-slider .portal-slide-content {
    max-width: 620px;
    color: #fff;
    padding: 28px 32px;
    background: rgba(0, 0, 0, 0.0);
}
.portal-main-slider .portal-slide-subtitle {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    background: rgba(240, 130, 27, 0.9);
    color: #fff;
    border-radius: 999px;
    margin-bottom: 14px;
}
.portal-main-slider .portal-slide-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
.portal-main-slider .portal-slide-description {
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 22px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}
.portal-main-slider .portal-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #F0821B;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(240, 130, 27, 0.4);
}
.portal-main-slider .portal-slide-cta:hover {
    background: #c96a15;
    color: #fff;
    transform: translateY(-2px);
}

/* Pagination + nav */
.portal-main-slider .portal-slider-pagination {
    bottom: 18px !important;
}
.portal-main-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 10px;
    height: 10px;
    margin: 0 4px !important;
}
.portal-main-slider .swiper-pagination-bullet-active {
    background: #F0821B;
    opacity: 1;
    width: 28px;
    border-radius: 5px;
    transition: width 0.3s;
}
.portal-main-slider .portal-slider-nav {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    color: #111;
    transition: background 0.2s;
}
.portal-main-slider .portal-slider-nav:hover {
    background: #fff;
}
.portal-main-slider .portal-slider-nav::after {
    font-size: 18px !important;
    font-weight: 700;
}

@media (max-width: 768px) {
    .portal-main-slider { height: 360px; border-radius: 12px; }
    .portal-main-slider .portal-slide-title { font-size: 1.5rem; }
    .portal-main-slider .portal-slide-description { font-size: 0.9rem; }
    .portal-main-slider .portal-slide-container { padding: 24px; }
}

/* === PAGE HERO (generyczna strona) — subtelny, jasny === */
.page-hero {
    background: linear-gradient(135deg, #fef5eb 0%, #fff7ed 60%, #ffffff 100%);
    padding: 56px 0 48px;
    border-bottom: 1px solid #f3e4d1;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 280px;
    height: 280px;
    background: rgba(240, 130, 27, 0.08);
    border-radius: 50%;
    filter: blur(60px);
}
.page-hero-inner {
    position: relative;
    max-width: 780px;
    z-index: 1;
}
.page-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(240, 130, 27, 0.12);
    color: #c96a15;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.page-hero-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.page-hero-lead {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0;
    max-width: 680px;
}

/* === PAGE CONTENT (zwykłe treści markdown/HTML z CMS) === */
.page-content h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin: 28px 0 12px; }
.page-content h3 { font-size: 1.2rem; font-weight: 700; color: #111827; margin: 22px 0 10px; }
.page-content p { font-size: 15px; line-height: 1.7; color: #374151; margin-bottom: 14px; }
.page-content p.lead { font-size: 1.05rem; font-weight: 500; color: #1f2937; }
.page-content ul, .page-content ol { padding-left: 22px; margin-bottom: 16px; color: #374151; }
.page-content ul li, .page-content ol li { margin-bottom: 6px; line-height: 1.6; }
.page-content a { color: #F0821B; text-decoration: underline; }
.page-content a:hover { color: #c96a15; }
.page-content blockquote {
    border-left: 4px solid #F0821B;
    padding: 12px 20px;
    background: #fef5eb;
    margin: 20px 0;
    border-radius: 6px;
    font-style: italic;
    color: #374151;
}
.page-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.page-content table th, .page-content table td { padding: 10px 14px; border: 1px solid #e5e7eb; text-align: left; }
.page-content table th { background: #f9fafb; font-weight: 600; }
