/* Custom CSS for Kraina Przygód */

/* Progressive rendering */
body {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Prevent FOUC (Flash of Unstyled Content) */
html {
    visibility: visible;
    opacity: 1;
}

/* Screen reader only utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Frosted glass header */
.frosted-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Glass effect */
.glass-strong {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Navigation links */
.nav-link {
    position: relative;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #ec4899, #a855f7);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #ec4899;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile navigation links */
.nav-link-mobile {
    display: block;
    color: #374151;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.nav-link-mobile:hover {
    background-color: #fce7f3;
    color: #ec4899;
}

/* 3D Card effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-3d:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient mesh background */
.gradient-mesh {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modern button */
.btn-modern {
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.3);
}

.btn-modern:hover {
    box-shadow: 0 20px 35px -5px rgba(236, 72, 153, 0.4);
}

/* Reveal on scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Attraction card styles */
.attraction-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
}

.attraction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.attraction-card:hover::before {
    opacity: 0.9;
}

.attraction-card img {
    transition: transform 0.3s ease;
}

.attraction-card:hover img {
    transform: scale(1.1);
}

.attraction-card-content {
    position: relative;
    z-index: 2;
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pricing card */
.pricing-card {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 3px solid #fbbf24;
}

.pricing-card.featured .pricing-badge {
    background: #fbbf24;
    color: #1f2937;
}

/* Contact form */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

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

/* Social media icons */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Event card */
.event-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    border-radius: 1rem;
    color: white;
    font-weight: bold;
    text-align: center;
}

.event-date-day {
    font-size: 2rem;
    line-height: 1;
}

.event-date-month {
    font-size: 0.875rem;
    text-transform: uppercase;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-badge.status-open {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-badge.status-closed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Pulse dot */
.pulse-dot {
    position: relative;
    display: inline-flex;
    height: 0.75rem;
    width: 0.75rem;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: currentColor;
    opacity: 0.75;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-dot::after {
    content: '';
    position: relative;
    display: inline-flex;
    height: 0.75rem;
    width: 0.75rem;
    border-radius: 9999px;
    background: currentColor;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Pricing section beige background */
.pricing-section {
    background: linear-gradient(to bottom, #f5f1e8, #e8dcc8);
}

/* Lightbox Gallery */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #ec4899;
    background-color: rgba(236, 72, 153, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(236, 72, 153, 0.5);
    color: #fff;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 18px;
    padding: 12px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    max-width: 80%;
    margin: 0 auto;
}

/* Attraction thumbnail image */
.attraction-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.attraction-thumb:hover {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    .frosted-header,
    .nav-link,
    .btn-modern,
    footer,
    .lightbox {
        display: none;
    }
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        width: 40px;
        height: 40px;
        padding: 12px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: 14px;
        bottom: 10px;
        padding: 8px 12px;
    }
}

/* Lazy Loading */
img[data-src],
[data-bg] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[data-src] {
    background: #f3f4f6;
}

img.lazy-loaded,
[data-bg].lazy-loaded {
    opacity: 1;
}

img.lazy-error {
    opacity: 0.5;
    background: #fee;
}

/* Placeholder blur effect (optional - can be enabled per image) */
img.lazy-blur[data-src] {
    filter: blur(10px);
    transform: scale(1.05);
}

img.lazy-blur.lazy-loaded {
    filter: blur(0);
    transform: scale(1);
    transition: opacity 0.3s ease-in-out, filter 0.5s ease-in-out, transform 0.5s ease-in-out;
}
