/* Base Styles */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --text-color: #333;
    --light-text: #fff;
    --background-color: #4a55a2;
    --background-overlay: rgba(0, 0, 0, 0.5);
    --font-family: 'Montserrat', 'Roboto', sans-serif;
    --header-height: 70px;
    --footer-height: 50px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: var(--font-family);
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

/* ---------- LAYOUT & CONTAINERS ---------- */

.background-container {
    position: relative;
    height: calc(100dvh - (var(--header-height) + var(--footer-height)));
    width: 100%;
    background-color: var(--background-color);
    background-image: linear-gradient(135deg, #4a55a2 0%, #6a75c2 100%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.content-wrapper {
    position: relative;
    min-height: 100%;
    width: 100%;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    color: var(--light-text);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

section {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    position: relative;
}

/* ---------- TYPOGRAPHY ---------- */

h2 {
    color: var(--accent-color);
    margin-bottom: 0.7rem;
    font-size: 1.6rem;
}

h3 {
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
    font-size: 1.3rem;
}

/* ---------- HEADER & NAVIGATION ---------- */

header {
    padding: 0.8rem 1rem;
    color: var(--light-text);
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: padding var(--transition-normal),
        background-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.header-scrolled {
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    text-align: left;
}

.logo-link {
    text-decoration: none;
    cursor: pointer;
    display: block;
}

header h1 {
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--accent-color);
    margin: 0;
}

.main-nav {
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.3rem;
    transition: all var(--transition-normal);
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    transition: all var(--transition-normal);
    display: block;
    position: relative;
    font-size: 0.9rem;
}

.nav-menu a:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
    transform: translateY(-2px);
}

.nav-menu a:active,
.nav-menu a:focus {
    background-color: var(--accent-color);
    transform: translateY(0);
}

.nav-menu a.active {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: block;
    position: relative;
    width: 30px;
    height: 3px;
    background-color: var(--light-text);
    margin: 6px 0;
    transition: all var(--transition-normal);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--light-text);
    transition: all var(--transition-normal);
    left: 0;
}

.hamburger::before {
    transform: translateY(-10px);
}

.hamburger::after {
    transform: translateY(10px);
}

/* ---------- SECTION COLORS ---------- */

.about {
    background-color: rgba(255, 107, 107, 0.7);
}

.services {
    background-color: rgba(74, 85, 162, 0.8);
}

.gallery {
    background-color: rgba(255, 230, 109, 0.7);
}

.info {
    background-color: rgba(78, 205, 196, 0.7);
}

.regulamin {
    background-color: rgba(255, 107, 107, 0.7);
    margin-top: 1rem;
}

.warunki {
    background-color: rgba(78, 205, 196, 0.7);
    margin-top: 1rem;
}

/* ---------- CONTENT SECTIONS ---------- */

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.service-item {
    padding: 0.8rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-normal);
}

.service-item:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.2);
}

.service-item p {
    margin-bottom: 0;
}

/* Regulamin & Warunki Content */
.regulamin-content,
.warunki-content {
    max-width: 800px;
    margin: 0 auto;
}

.regulamin-content h3,
.warunki-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.3rem;
    text-align: center;
}

.regulamin-content p,
.warunki-content p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    text-align: justify;
    padding-left: 10px;
    padding-right: 10px;
}

/* ---------- IMAGE SLIDER ---------- */

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 70vh;
    max-height: 600px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-slow);
}

.slide {
    min-width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
    text-align: center;
}

.slide.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.slide-caption {
    position: absolute;
    bottom: 4rem;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light-text);
    padding: 0.5rem 1rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 5;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 1rem;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-normal);
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 5;
}

.dot {
    width: 0.8rem;
    height: 0.8rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

.dot.active {
    background-color: var(--accent-color);
}

/* ---------- GALLERY ---------- */

.gallery .slider-container {
    margin: 0.5rem auto;
    max-width: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* ---------- FOOTER ---------- */

footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--light-text);
    padding: 0.6rem 1rem;
    z-index: 1000;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    transition: transform var(--transition-normal),
        opacity var(--transition-normal);
}

.footer-hidden {
    transform: translateY(100%);
    opacity: 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contact Info */
.contact-info {
    display: flex;
    gap: 1rem;
}

.contact-info span {
    display: inline-flex;
    align-items: center;
}

.contact-info i {
    margin-right: 0.3rem;
}

.contact-info i.fa-phone {
    color: #25D366;
}

.contact-info i.fa-envelope {
    color: #4285F4;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    font-size: 1.2rem;
    color: var(--light-text);
    transition: all var(--transition-normal);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    text-decoration: underline;
}

.social-links a i.fa-facebook {
    color: #1877F2;
}

.social-links a i.fa-instagram {
    color: #E1306C;
}

/* Contact & Social Shared Styles */
.contact h3,
.social h3 {
    margin-bottom: 0.8rem;
    text-align: center;
    color: var(--accent-color);
}

.contact p,
.social p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact i,
.social i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
    transition: transform var(--transition-normal);
}

.social a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-normal),
        transform var(--transition-normal);
    display: inline-flex;
    align-items: center;
}

.social a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.social a:hover i {
    transform: scale(1.2);
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin: 0;
}

/* ---------- FULLSCREEN IMAGE VIEWER ---------- */

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.fullscreen-overlay.active {
    opacity: 1;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    cursor: default;
}

.fullscreen-overlay.active .fullscreen-image {
    transform: scale(1);
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--transition-normal),
        transform var(--transition-fast);
    z-index: 2010;
}

.fullscreen-close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

/* ---------- ACCESSIBILITY ---------- */

a:focus,
button:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

/* ---------- RESPONSIVE DESIGN ---------- */

/* Large screens */
@media screen and (max-width: 992px) {

    .services-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium screens */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .header-container {
        flex-wrap: wrap;
    }

    .footer-container {
        gap: 0.5rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.3rem;
        align-items: center;
        margin: auto;
    }

    .social-links {
        gap: 1.5rem;
    }

    .social-links a {
        font-size: 2rem;
    }

    .info {
        grid-template-columns: 1fr;
    }

    section {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .slider-container {
        height: 60vh;
        max-height: 500px;
    }

    .slide-caption {
        bottom: 2.5rem;
        font-size: 1rem;
    }

    .slider-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1000;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 60px;
        transition: 0.4s;
        z-index: 99;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        padding: 1rem;
        width: 100%;
    }

    .menu-toggle.active .hamburger {
        background-color: transparent;
    }

    .menu-toggle.active .hamburger::before {
        transform: translateY(0) rotate(45deg);
    }

    .menu-toggle.active .hamburger::after {
        transform: translateY(0) rotate(-45deg);
    }
}

/* Low height screens */
@media screen and (max-height: 800px) {
    section {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }

    footer {
        padding: 0.5rem 1rem;
    }

    .slider-container {
        height: 50vh;
        max-height: 400px;
    }
}

/* Small screens */
@media screen and (max-width: 576px) {
    .background-container {
        background-attachment: scroll;
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        justify-content: space-between;
    }

    .contact-info {
        font-size: 0.85rem;
    }

    .slider-container {
        height: 40vh;
        max-height: 350px;
    }

    .slide-caption {
        bottom: 3rem;
        font-size: 0.9rem;
    }
}

/* ---------- OPTIMIZATION ---------- */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Compact Layout for smaller heights */
.compact-layout header {
    padding: 0.5rem 1rem;
}

.compact-layout header h1 {
    font-size: 1.5rem;
}

.compact-layout body {
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

.compact-layout section {
    padding: 0.6rem;
    margin-bottom: 0.6rem;
}

.compact-layout footer {
    padding: 0.4rem 1rem;
}

.compact-layout h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.compact-layout h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

/* Print Styles */
@media print {
    .background-container {
        background-image: none;
        color: black;
    }

    section,
    footer {
        background-color: white;
        color: black;
    }

    header h1,
    h2,
    h3 {
        color: black;
    }

    .fullscreen-overlay,
    .menu-toggle,
    .slider-btn,
    .slider-dots {
        display: none !important;
    }
}