/**
 * Warmia.org Global Styles
 * ZHP Hufiec Warmia
 * @version 2.1.4
 */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    /* Primary accent: Modern Polish Crimson */
    --crimson: #dc2626;
    --crimson-light: #ef4444;
    --crimson-dark: #b91c1c;
    --crimson-glow: rgba(220, 38, 38, 0.4);
    
    /* Secondary: Forest (for variety) */
    --forest: #166534;
    --forest-dark: #14532d;
    --forest-light: #22c55e;
    
    /* Legacy gold - keeping for reference */
    --gold: #dc2626; /* NOW MAPS TO CRIMSON */
    --gold-light: #ef4444;
    --gold-dark: #b91c1c;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

a, button { cursor: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; }
img { display: block; max-width: 100%; }

/* Cursor - GPU optimized */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 10000;
    /* Center offset handled in transform */
    margin-left: -12px;
    margin-top: -12px;
    opacity: 0.9;
    filter: drop-shadow(0 0 4px var(--crimson-glow));
    /* Force GPU layer */
    will-change: transform;
    backface-visibility: hidden;
}

.cursor img {
    width: 100%;
    height: 100%;
    filter: invert(1);
    transition: transform 0.15s ease;
}

.cursor.active img {
    transform: scale(1.4) rotate(12deg);
    filter: invert(1) drop-shadow(0 0 6px var(--crimson));
}

@media (hover: none) {
    .cursor { display: none !important; }
    body, a, button { cursor: auto !important; }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container { padding: 0 48px; }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    width: 58px;
    height: 67px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.logo:hover .logo-badge {
    transform: scale(1.05);
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--gray-500);
    font-weight: 500;
}

/* Nav */
.nav {
    display: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 1024px) {
    .nav { display: flex; }
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-400);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

.nav-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.nav-item:hover .nav-link svg {
    transform: rotate(180deg);
}

.nav-cta {
    background: var(--crimson) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--crimson-light) !important;
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 220px;
    background: var(--gray-900);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--gray-400);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

/* Menu button */
.menu-btn {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: none;
}

.menu-btn span {
    width: 18px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .menu-btn { display: none; }
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    background: var(--gray-900);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.mobile-nav-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
}

.mobile-nav-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.mobile-nav-link {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-section {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--crimson);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 0;
}

.mobile-nav-sub {
    padding: 10px 0 10px 16px;
    font-size: 14px;
    color: var(--gray-300);
    border-bottom: none;
}

.mobile-nav-sub:last-child {
    padding-bottom: 8px;
}

.mobile-nav-footer {
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Floating donate btn */
.donate-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--crimson);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    box-shadow: 0 8px 32px var(--crimson-glow);
    transition: all 0.3s ease;
}

.donate-float:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px var(--crimson-glow);
}

.donate-float svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .donate-float {
        bottom: 16px;
        right: 16px;
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 100px;
    transition: all 0.2s ease;
    cursor: none;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--white);
    color: var(--black);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255,255,255,0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.5);
}

.btn-gold {
    background: var(--crimson);
    color: var(--white);
}

.btn-gold:hover {
    background: var(--crimson-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--crimson-glow);
}

.btn-outline-dark {
    background: transparent;
    color: var(--black);
    border: 1px solid var(--gray-300);
}

.btn-outline-dark:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* Sections */
.section {
    padding: 80px 0;
}

@media (min-width: 768px) {
    .section { padding: 120px 0; }
}

.section-dark {
    background: var(--black);
    color: var(--white);
}

.section-light {
    background: var(--gray-50);
    color: var(--black);
}

.section-forest {
    background: linear-gradient(135deg, var(--forest-dark), var(--forest));
    color: var(--white);
}

.section-crimson {
    background: linear-gradient(135deg, var(--crimson-dark), #7f1d1d);
    color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--crimson);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-dark .section-tag {
    color: var(--crimson);
}

.section-tag svg {
    width: 14px;
    height: 14px;
}

.section-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-sub {
    font-size: 17px;
    color: var(--gray-600);
    margin-top: 16px;
    line-height: 1.7;
}

.section-dark .section-sub {
    color: var(--gray-400);
}

/* Page hero */
.page-hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(220, 38, 38, 0.2) 0%, transparent 60%);
    z-index: -1;
}

.page-hero-title {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.page-hero-sub {
    font-size: 18px;
    color: var(--gray-400);
    max-width: 500px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: transparent;
}

.card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-text {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--crimson);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
    display: grid;
    gap: 40px;
    margin-bottom: 48px;
}

@media (max-width: 767px) {
    .footer { padding: 40px 0 24px; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand p { max-width: none; }
    .footer-grid > .footer-col:last-child {
        grid-column: 1 / -1;
        text-align: center;
    }
    .footer-grid > .footer-col:last-child .footer-socials {
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .logo-text {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
    max-width: 260px;
    margin-bottom: 20px;
}

.footer-motto {
    font-size: 24px;
    font-weight: 700;
    color: var(--crimson);
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--gray-400);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.footer-socials a:hover {
    background: var(--crimson);
}

.footer-socials svg {
    width: 18px;
    height: 18px;
    fill: var(--white);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: var(--gray-500);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom a {
    color: var(--gray-500);
}

.footer-bottom a:hover {
    color: var(--white);
}

.footer-links-bottom {
    display: flex;
    gap: 20px;
}

/* Utils */
.text-center { text-align: center; }
.text-gold { color: var(--crimson); }
.text-crimson { color: var(--crimson); }
.text-forest { color: var(--forest); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

/* Grid helpers */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 639px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Lang toggle */
.lang-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    border-radius: 0 12px 12px 0;
    overflow: hidden;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.lang-btn:first-child {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lang-btn:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

.lang-btn.active {
    color: var(--crimson);
    background: rgba(220, 38, 38, 0.1);
}

.lang-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--crimson);
    border-radius: 0 2px 2px 0;
}

.lang-btn span {
    font-size: 16px;
    margin-right: 4px;
}

@media (max-width: 768px) {
    .lang-toggle {
        top: auto;
        bottom: 70px;
        left: 0;
        transform: none;
        flex-direction: row;
        border-radius: 0 8px 8px 0;
    }
    
    .lang-btn {
        width: 32px;
        height: 28px;
        font-size: 0;
        padding: 0;
    }
    
    .lang-btn:first-child {
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.1);
    }
    
    .lang-btn span {
        font-size: 14px;
        margin-right: 0;
    }
    
    .lang-btn.active::before {
        display: none;
    }
}

/* =============================================
   GLOBAL LIGHTBOX - Click to expand any image
   ============================================= */
.lightbox-enabled {
    cursor: zoom-in;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray-300);
    font-size: 14px;
    text-align: center;
    max-width: 80%;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

/* Navigation arrows for galleries */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.lightbox-overlay.has-gallery .lightbox-nav,
.lightbox.active .lightbox-nav {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-close,
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close svg,
    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}
