:root {
    --color-white: #ffffff;
    --color-beige-dark: #ece5d3;
    --color-beige-light: #f5f2e9;
    --color-text: #333333;
    --font-main: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   Header Container (Top Navbar Wrapper)
   ========================================================================= */
.main-header {
    background-color: var(--color-white);
}

/* =========================================================================
   Navbar (Top Section)
   ========================================================================= */
.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
}

.nav-contact {
    flex: 1;
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 300;
    letter-spacing: 1px;
}

.nav-phone,
.nav-email {
    transition: color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-phone svg,
.nav-email svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.nav-phone:hover,
.nav-email:hover {
    color: #999;
}

.nav-contact:last-child {
    text-align: right;
}

.nav-logo {
    flex: 1;
    text-align: center;
}

.nav-logo a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
}

/* Mobile Navbar */
@media (max-width: 768px) {
    .top-navbar {
        flex-direction: column;
        padding: 1.2rem;
        gap: 0.8rem;
    }

    .nav-contact {
        text-align: center !important;
        font-size: 0.85rem;
    }

    .nav-logo {
        order: -1;
        margin-bottom: 0.8rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-logo a {
        display: block;
    }

    .nav-logo img {
        height: 50px !important;
        width: auto !important;
    }
}

/* =========================================================================
   Secondary Navbar (O nas, Współpraca, Kontakt)
   ========================================================================= */
.sub-navbar {
    background-color: var(--color-beige-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    /* Offset by the height of the main navbar (48px padding + 40px logo) */
    /* slightly below the main navbar index */
}

.sub-nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.sub-nav-links li a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.sub-nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    background-color: var(--color-text);
    transition: width 0.3s ease, left 0.3s ease;
}

.sub-nav-links li a.active::after {
    width: 100%;
    left: 0;
    animation: growUnderline 0.5s ease forwards;
}

@keyframes growUnderline {
    from {
        width: 0;
        left: 50%;
    }

    to {
        width: 100%;
        left: 0;
    }
}

.sub-nav-links li a:hover {
    color: #888;
}

@media (max-width: 768px) {
    .sub-navbar {
        top: 0;
    }

    .sub-nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .sub-nav-links li a {
        font-size: 0.85rem;
    }
}

/* =========================================================================
   Hero Slider
   ========================================================================= */
.hero-slider {
    position: relative;
    width: 100%;
    /* Keep the height the same on all devices (mobile adjustable width done via object-fit) */
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
    background-color: var(--color-beige-dark);
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    /* object-fit: cover ensures the image fills the width on mobile but crops proportionally, maintaining the identical height */
    object-fit: cover;
    object-position: center 30%;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    /* Slight dark overlay to make white text readable */
    z-index: 1;
}

.slide-title {
    color: var(--color-white);
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    text-align: center;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .slide-title {
        font-size: 2.5rem;
    }
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 3rem;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
}

.slider-controls button {
    pointer-events: auto;
    background: transparent;
    border: none;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}

.slider-controls button:hover {
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .slider-controls {
        padding: 0 1rem;
    }

    .slider-controls button {
        font-size: 2rem;
    }
}

/* =========================================================================
   Instagram Section
   ========================================================================= */
.instagram-section {
    padding: 6rem 2rem;
    background-color: var(--color-white);
    text-align: center;
}

.instagram-header {
    margin-bottom: 3rem;
}

.instagram-header h2 a {
    font-size: 2.2rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.instagram-header h2 a:hover {
    color: #888;
}

@media (max-width: 768px) {
    .instagram-header h2 a {
        font-size: 1.15rem;
        white-space: nowrap;
        word-wrap: normal;
        word-break: normal;
        display: block;
        padding: 0 1rem;
    }
}

.instagram-header p {
    font-size: 1rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 0.5rem;
}

.instagram-feed {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.insta-box {
    display: block;
    aspect-ratio: 1;
    background-color: var(--color-beige-dark);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    /* This ensures children respect the border radius */
}

.insta-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    /* Removes bottom space under inline images */
}

/* Hover effect */
.insta-box:hover img {
    transform: scale(1.08);
    /* Zoom in but frame stays 1:1 due to overflow: hidden on .insta-box */
}

/* Responsive Layouts */
@media (max-width: 992px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        /* On tablet shows 3 columns (if user uploads 6 it's 3x2) */
    }
}

@media (max-width: 576px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        /* Slightly smaller gap on mobile */
        /* On mobile shows 2 columns (if user uploads 4 it's 2x2) */
    }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
    background-color: #1a1a1a;
    color: var(--color-beige-light);
    padding: 6rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.footer-logo-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-link {
    display: block;
    max-width: 180px;
}

.footer-logo-img {
    width: 100%;
    height: auto;
    display: block;
}

.footer-brand-text {
    font-size: 2.2rem !important;
    font-weight: 300 !important;
    letter-spacing: 4px !important;
    margin-bottom: 0 !important;
}

.footer-social-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-column:last-child {
    display: flex;
    flex-direction: column;
}

.footer-social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    transition: all 0.3s ease !important;
}

.social-icon:hover {
    background-color: #ebdebc !important;
    color: var(--color-beige-light) !important;
    transform: translateY(-3px);
}

.footer-column p,
.footer-column ul {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #bbb;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 0;
}

.footer-column a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #888;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

/* =========================================================================
   Scroll Animations
   ========================================================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   Subpages
   ========================================================================= */
.subpage-content {
    background-color: var(--color-white);
    padding: 8rem 2rem 4rem;
    min-height: 50vh;
    text-align: center;
}

.subpage-title {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 3rem;
    color: var(--color-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (max-width: 768px) {
    .subpage-content {
        padding: 5rem 1.5rem 3rem;
    }

    .subpage-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .subpage-content {
        padding: 4rem 1rem 2rem;
    }

    .subpage-title {
        font-size: 2rem;
        letter-spacing: 0px;
    }
}

.subpage-content .content {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.subpage-content .content p {
    margin-bottom: 1.5rem;
}

.subpage-content .content ul,
.subpage-content .content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    text-align: left;
}

.subpage-content .content li {
    margin-bottom: 0.5rem;
}

.subpage-content .content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.subpage-content .content h2,
.subpage-content .content h3,
.subpage-content .content h4 {
    color: var(--color-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    text-align: left;
}

/* =========================================================================
   Error 404 Page
   ========================================================================= */
.error-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.error-content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    background-color: var(--color-white);
}

.error-code {
    font-size: 8rem;
    font-weight: 300;
    color: var(--color-beige-dark);
    margin-bottom: 1rem;
    line-height: 1;
}

.error-message {
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.error-details {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-beige-dark);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================================================
   Contact Page Layout
   ========================================================================= */
.contact-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.contact-content-wrapper {
    flex: 1;
    background-color: var(--color-white);
    padding: 6rem 0;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text);
    text-align: center;
}

.contact-grid-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-map-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-map-square iframe,
.contact-map-square .map-placeholder {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-map-square .map-placeholder {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676B;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 1rem;
}

.contact-address-block h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.contact-address-block p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

.fb-profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    max-width: 400px;
}

.fb-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f2f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #050505;
    /* Typical FB name color */
}

.fb-role {
    font-size: 0.95rem;
    color: #888;
    font-weight: 400;
    margin-bottom: 2px;
}

.fb-phone a {
    font-size: 1rem;
    color: #65676B;
    /* Typical FB secondary text color */
    text-decoration: none;
    font-weight: 500;
}

.fb-phone a:hover {
    color: #1877F2;
    /* Typical FB link hover */
}

@media (max-width: 768px) {
    .contact-content-wrapper {
        padding: 4rem 1.5rem;
    }

    .contact-grid-new {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-map-square {
        aspect-ratio: auto;
        height: 400px;
    }
}

/* =========================================================================
   About Section (O nas)
   ========================================================================= */
.main-content {
    background-color: var(--color-beige-light);
    padding: 8rem 2rem;
}

.container.about-section {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Premium luxury shadow */
}

.about-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/5;
    transition: transform 0.7s ease;
}

.about-image-wrapper:hover .about-image {
    transform: scale(1.03);
    /* Subtle premium hover effect */
}

.about-text-wrapper {
    text-align: left;
    padding-right: 2rem;
}

.about-subtitle {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #888;
    margin-bottom: 1rem;
}

.about-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--color-text);
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    font-weight: 300;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-text);
    color: var(--color-white);
    text-decoration: none;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid var(--color-text);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-text);
}

@media (max-width: 900px) {
    .container.about-section {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-text-wrapper {
        padding-right: 0;
        text-align: center;
    }

    .about-title {
        font-size: 2.2rem;
    }
}