/* Bootstrap-based Custom Styles for Modena Website */

/* Root Variables */
:root {
    --primary-color: #023160;
    --secondary-color: #bf006c;
    --light-gray: #EDEDED;
    --text-gray: #a2a2a2;
    --text-muted: #707070;
}

/* Typography */
body {
    font-family: omnes-pro, sans-serif;
    font-style: normal;
    font-weight: 500;
}

/* Custom Navigation */
.custom-nav {
    background-color: rgba(0, 0, 0, 0.8);
    height: 77px;
    padding: 0;
}

.custom-nav .navbar-brand {
    margin-left: 100px;
}

.custom-nav .navbar-nav .nav-link {
    color: #fff !important;
    font-family: proxima-nova-condensed;
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    padding: 10px 20px;
    text-transform: uppercase;
    position: relative;
    margin-right: 20px;
}

.custom-nav .navbar-nav .nav-link:after,
.custom-nav .navbar-nav .nav-link:before {
    content: '';
    width: 0%;
    transition: all 0.3s ease;
    left: 50%;
}

.custom-nav .navbar-nav .nav-link:hover:after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    background: #fff;
    height: 3px;
    width: 50%;
}

.custom-nav .navbar-nav .nav-link:hover:before {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0px;
    background: #fff;
    height: 3px;
    width: 50%;
}

.nav-underline {
    position: absolute;
    bottom: 16px;
    right: 55px;
    width: 805px;
    height: 1px;
    background-color: #fff;
    opacity: 0.35;
}

/* Mobile navigation (hamburger + full-screen menu) */
@media (max-width: 991.98px) {
    /* !important overrides the px-5 utility class on the container */
    .custom-nav .container-fluid {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        align-items: center;
    }

    /* Keep the logo at a sensible left position (override the ms-5 utility) */
    .custom-nav .navbar-brand.ms-5 {
        margin-left: 0 !important;
    }

    /* Toggler: vertically centred on the bar, sits above the overlay */
    .custom-nav .navbar-toggler {
        position: relative;
        z-index: 1060;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        margin: 0;
        border: none;
        outline: none;
        box-shadow: none;
    }

    .custom-nav .navbar-toggler:focus {
        box-shadow: none;
    }

    /* Custom hamburger drawn with the icon span + its pseudo-elements */
    .custom-nav .navbar-toggler-icon {
        background-image: none;
        position: relative;
        display: block;
        width: 30px;
        height: 2px;
        background-color: #fff;
        transition: background-color 0.2s ease;
    }

    .custom-nav .navbar-toggler-icon::before,
    .custom-nav .navbar-toggler-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 30px;
        height: 2px;
        background-color: #fff;
        transition: transform 0.3s ease, top 0.3s ease;
    }

    .custom-nav .navbar-toggler-icon::before {
        top: -9px;
    }

    .custom-nav .navbar-toggler-icon::after {
        top: 9px;
    }

    /* Morph into an X while the menu is open */
    .custom-nav .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        background-color: transparent;
    }

    .custom-nav .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .custom-nav .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Full-screen black menu overlay */
    #navbarNav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #000;
        z-index: 1050;
    }

    /* Skip the collapse height animation so the overlay fills instantly */
    #navbarNav.collapsing {
        height: 100vh;
        transition: none;
    }

    #navbarNav .navbar-nav {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    #navbarNav .nav-item {
        width: 100%;
        text-align: center;
    }

    .custom-nav .navbar-nav .nav-link {
        font-size: 26px;
        padding: 12px 20px;
        margin-right: 0;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 873px;
    margin-top: 0;
    background: url("../assets/baner.jpg") center/cover no-repeat;
}

.hero-text {
    font-size: 50px;
    line-height: 1.16;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    width: 826px;
    margin: 0 auto;
}

.hero-wave {
    position: absolute;
    bottom: -7px;
    width: 100%;
    height: auto;
}

/* Section Styling */
.section-padding {
    padding: 50px 0 40px 0;
    scroll-margin-top: 77px;
}

.section-divider {
    height: 9px;
    width: 200px;
    background-color: var(--light-gray);
    margin-bottom: 30px;
}

.section-title {
    font-family: proxima-nova-condensed;
    font-style: normal;
    font-weight: 500;
    font-size: 32px;
    margin-bottom: 7px;
}

.section-description {
    font-family: omnes-pro;
    color: var(--text-gray);
    width: 826px;
    font-size: 20px;
    line-height: 1.6;
    margin: 0 auto 50px auto;
}

/* O NAS Section */
.onas-main {
    display: block;
    position: relative;
    width: 100%;
    height: 780px;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: -40px;
    background: url("../assets/Group28.png") repeat 0 0;
    background-size: cover;
}

.onas-tresc {
    display: block;
    position: absolute;
    height: 680px;
    width: 990px;
    left: 50%;
    top: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    opacity: 0.75;
    border-radius: 28px;
    background-color: #023160;
    z-index: 1;
}

.onas-tekst {
    display: block;
    font-family: omnes-pro;
    color: #fff;
    width: 826px;
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    margin: 50px auto 0 auto;
    text-align: center;
    line-height: 1.8;
}

/* Stat Circles */
.onas-cechy {
    display: block;
    color: #fff;
    width: 726px;
    margin: 50px auto 0 auto;
}

.onas-cechy-kolo {
    position: relative;
    height: 125px;
    width: 125px;
    background-color: none;
    border-style: solid;
    border-color: #fff;
    border-width: 3px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 20px 0 20px;
}

.onas-cechy-kolo-tekst-big {
    display: inline-block;
    position: absolute;
    top: 35%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    font-family: proxima-nova-condensed;
    font-style: normal;
    font-weight: 500;
    font-size: 26px;
    text-align: center;
}

.onas-cechy-kolo-tekst-small {
    display: inline-block;
    position: absolute;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    top: 55%;
    font-family: proxima-nova-condensed;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
}

/* Category Boxes */
.onas-kategorie {
    display: block;
    color: #fff;
    width: 520px;
    margin: 50px auto 0 auto;
}

.onas-kwadrat {
    position: relative;
    height: 125px;
    width: 125px;
    background-color: none;
    border-style: solid;
    border-color: #fff;
    border-width: 1px;
    border-radius: 8px;
    display: inline-block;
    margin: 0 20px 0 20px;
}

.onas-kwadrat-ikona {
    display: inline-block;
    position: absolute;
    top: 35%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
}

.onas-kwadrat-tekst {
    display: inline-block;
    position: absolute;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    top: 75%;
    font-family: proxima-nova-condensed;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
    color: #fff;
}

/* Partners Section - full page width (like modena.pl), 40px inset on desktop */
.partners-grid {
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Vertically centre logos of differing heights within each row line;
   drop the Bootstrap gutter so spacing matches modena.pl (30px via the logo) */
.partners-grid .row {
    align-items: center;
    --bs-gutter-x: 0;
}

.partner-logo {
    width: 92px;
    opacity: 0.7;
    margin-right: 30px;
}

.partner-logo-small {
    width: 75px;
    opacity: 0.7;
    margin-right: 30px;
}

/* "Pokaż więcej" button - only used on mobile */
.partners-more {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.btn-show-more {
    background-color: transparent;
    color: #000;
    border: 1px solid var(--light-gray);
    padding: 10px 30px;
    font-family: omnes-pro;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-show-more:hover {
    background-color: var(--light-gray);
}

/* HUG Section */
.hugcesarin-main {
    display: block;
    position: relative;
    width: 1320px;
    height: 410px;
    margin: 20px auto -40px auto;
}

.hug-tl {
    display: block;
    position: absolute;
    width: 650px;
    height: 400px;
    margin: 0 20px 20px 0;
    background-image: linear-gradient(300deg, #fcc159, #af5105 43%, #4d1a11);
    opacity: 0.86;
    background-size: contain;
    border-top-left-radius: 35px;
}

.hug-tr {
    display: block;
    position: absolute;
    left: 670px;
    width: 650px;
    height: 400px;
    margin: 0 0 20px 0;
    background: url("../assets/hug_bg.png") repeat 0 0;
    background-size: cover;
}

/* IRCA & JOYGELATO Section */
.irca-main {
    display: block;
    position: relative;
    width: 1320px;
    height: 820px;
    margin: 20px auto -40px auto;
}

.irca-tl {
    display: block;
    position: absolute;
    width: 650px;
    height: 400px;
    margin: 0 20px 20px 0;
    background-image: linear-gradient(130deg, #ff945a, #c40000 91.18%, #bf006c);
    opacity: 0.86;
    background-size: contain;
    border-top-left-radius: 35px;
}

.irca-tr {
    display: block;
    position: absolute;
    left: 670px;
    width: 650px;
    height: 400px;
    margin: 0 0 20px 0;
    background: url("../assets/Group27.png") repeat 0 0;
    background-size: cover;
}

.irca-bl {
    display: block;
    position: absolute;
    top: 420px;
    width: 650px;
    height: 400px;
    margin: 0 0 0 0;
    background: url("../assets/Group26.png") repeat 0 0;
    background-size: cover;
}

.irca-br {
    display: block;
    position: absolute;
    left: 670px;
    top: 420px;
    width: 650px;
    height: 400px;
    margin: 0 0 0 0;
    background-image: linear-gradient(300deg, #5adffd, #5adffd 3%, #447ac4 43%, #447ac4);
    opacity: 0.8;
    background-size: contain;
    border-bottom-right-radius: 35px;
}

.irca-logo {
    display: block;
    position: absolute;
    width: auto;
    height: auto;
    top: 80px;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
}

/* Size the logo by height so it fits regardless of the image's aspect ratio */
.irca-logo img {
    height: 60px;
    width: auto;
    display: block;
}

.irca-headline {
    display: inline-block;
    position: absolute;
    width: 100%;
    top: 130px;
    font-family: proxima-nova-condensed;
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    text-align: center;
}

.irca-opis {
    display: inline-block;
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    padding: 0 35px;
    top: 180px;
    font-family: omnes-pro;
    color: #fff;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.6;
    letter-spacing: normal;
    text-align: center;
}

.joygelato-logo {
    display: block;
    position: absolute;
    width: auto;
    height: auto;
    top: 80px;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
}

/* Size the logo by height so it fits regardless of the image's aspect ratio */
.joygelato-logo img {
    height: 60px;
    width: auto;
    display: block;
}

.joygelato-headline {
    display: inline-block;
    position: absolute;
    width: 100%;
    top: 150px;
    font-family: proxima-nova-condensed;
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    text-align: center;
}

.joygelato-opis {
    display: inline-block;
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    padding: 0 35px;
    top: 200px;
    font-family: omnes-pro;
    color: #fff;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.6;
    letter-spacing: normal;
    text-align: center;
}

/* Links */
.link-description {
    font-size: 16px;
    font-weight: 500;
    color: #fff !important;
    text-decoration: underline;
    display: inline-block;
    margin: 0 10px;
}

.link-description:hover {
    text-decoration: none;
}

/* Contact Section */
.kontakt {
    display: block;
    position: relative;
    width: 1320px;
    height: 700px;
    margin: 0 auto 0 auto;
}

.kontakt-l {
    display: block;
    position: absolute;
    width: 33.3%;
    height: 100%;
    background-color: #EDEDED;
}

.kontakt-l-tresc {
    display: block;
    position: absolute;
    top: 70px;
    width: 100%;
    height: 400px;
    font-family: omnes-pro;
    color: #023160;
    padding-top: 20px;
    box-sizing: border-box;
    line-height: 2.2;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    padding-top: 20px;
    box-sizing: border-box;
}

.kontakt-c {
    display: block;
    position: absolute;
    left: 33.3%;
    width: 33.3%;
    height: 100%;
}

.kontakt-r {
    display: block;
    position: absolute;
    left: 66.6%;
    width: 33.3%;
    height: 100%;
}

.kontakt-tytul {
    display: block;
    position: absolute;
    width: 100%;
    height: 60px;
    background-color: #fff;
    font-family: proxima-nova-condensed;
    color: #023160;
    padding-top: 20px;
    box-sizing: border-box;
    font-size: 26px;
    font-weight: 400;
    text-align: center;
}

.kontakt-r-tresc {
    display: block;
    position: absolute;
    top: 60px;
    left: 66,6%;
    width: 100%;
    height: 400px;
    font-family: omnes-pro;
    color: #023160;
    padding-top: 20px;
    box-sizing: border-box;
    line-height: 2.2;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    padding-top: 20px;
    box-sizing: border-box;
}

.kontakt-godziny-tytul {
    position: relative;
    font-family: proxima-nova-condensed;
    color: #023160;
    font-size: 26px;
    font-weight: 400;
    text-align: center;
    padding-top: 0px;
    box-sizing: border-box;
}

.kontakt-godziny-wrapper {
    text-align: center;
}

.kontakt-godziny-row {
    margin-bottom: 5px;
}

.kontakt-godziny-l {
    display: inline-block;
    width: 45%;
    text-align: right;
    padding-right: 15px;
}

.kontakt-godziny-r {
    display: inline-block;
    width: 45%;
    text-align: left;
}

.kontakt-formularz {
    display: block;
    position: absolute;
    top: 60px;
    left: 66,6%;
    width: 100%;
    height: 400px;
    font-family: omnes-pro;
    color: #023160;
    padding-top: 20px;
    box-sizing: border-box;
    line-height: 2.2;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    padding-top: 20px;
    box-sizing: border-box;
}

.dane-bold {
    font-weight: 500;
}

/* Footer */
.footer-section {
    background-color: #000;
    padding: 80px 0 40px 0;
    margin-top: 40px;
    font-size: 20px;
    font-weight: 400;
}

.footer-divider {
    width: 100px;
    height: 2px;
    background-color: #fff;
    margin-bottom: 15px;
}

/* Back to Top Button */
.back-to-top {
    width: 50px;
    line-height: 50px;
    position: fixed;
    bottom: 50px;
    right: 20px;
    color: #555;
    text-align: center;
    font-size: 50px;
    text-decoration: none;
    transform: rotate(270deg);
    z-index: 999;
    display: none;
}

.back-to-top:hover {
    color: var(--light-gray);
}

/* Hide the back-to-top arrow on mobile (!important overrides jQuery fadeIn) */
@media (max-width: 768px) {
    .back-to-top,
    #back2Top {
        display: none !important;
    }
}

/* Show back to top button when scrolling */
#back2Top {
    width: 50px;
    line-height: 50px;
    overflow: hidden;
    z-index: 999;
    display: none;
    cursor: pointer;
    transform: rotate(270deg);
    position: fixed;
    bottom: 50px;
    right: 20px;
    color: #555;
    text-align: center;
    font-size: 50px;
    text-decoration: none;
}

#back2Top:hover {
    color: var(--light-gray);
}

/* Contact Form Styles */
.contact-form {
    padding: 0 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.contact-form label {
    display: block;
    font-family: omnes-pro;
    color: #023160;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.contact-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: omnes-pro;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: #023160;
    box-shadow: 0 0 0 0.2rem rgba(2, 49, 96, 0.1);
}

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

.contact-form .btn-submit {
    background-color: #023160;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-family: omnes-pro;
    font-size: 18px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.contact-form .btn-submit:hover {
    background-color: #034a8f;
}

/* Mobile form adjustments */
@media (max-width: 768px) {
    .contact-form {
        padding: 0 10px;
    }

    .contact-form .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .contact-form .btn-submit {
        width: 100%;
    }
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
    .hugcesarin-main,
    .irca-main,
    .kontakt,
    .section-description {
        max-width: 1140px;
    }
}

@media (max-width: 1200px) {
    .hugcesarin-main,
    .irca-main,
    .kontakt,
    .section-description {
        max-width: 960px;
    }

    .nav-underline {
        display: none;
    }
}

/* Tablet only: these photo boxes are very wide/short here, so centre the
   background to keep the subject fully in frame (mobile/desktop crop little
   and stay at the default top position). */
@media (min-width: 769px) and (max-width: 1319.98px) {
    .hug-tr,
    .irca-tr,
    .irca-bl {
        background-position: center center;
    }

    /* Larger map on tablet (keep aspect ratio) */
    .kontakt-r-tresc img {
        width: 500px;
        height: auto;
        max-width: 100%;
    }
}

/* The desktop grid is hard-wired for >=1320px (fixed 1320px widths + absolutely
   positioned columns). Anything narrower must use the fluid/stacked layout,
   otherwise 993-1319px (e.g. iPad 11" Pro landscape = 1194px) overflows/cuts off. */
@media (max-width: 1319.98px) {
    .custom-nav .navbar-brand {
        margin-left: 0;
    }

    .hero-text {
        font-size: 40px;
        width: 100%;
        padding: 0 20px;
    }

    .section-description {
        width: 100%;
        padding: 0 20px;
    }

    /* Partners grid: 20px inset on tablet */
    .partners-grid {
        padding: 0 20px;
    }

    /* O NAS Section - Tablet */
    .onas-main {
        height: auto;
        padding: 40px 20px;
    }

    .onas-tresc {
        position: relative;
        width: 95%;
        height: auto;
        transform: none;
        left: auto;
        top: auto;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .onas-tekst {
        width: 100%;
        font-size: 18px;
    }

    .onas-cechy {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .onas-kategorie {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* HUG Section - Tablet */
    .hugcesarin-main {
        width: 100%;
        height: auto;
        padding: 0 20px;
    }

    .hug-tl, .hug-tr {
        position: relative;
        width: 100%;
        left: auto;
        margin-bottom: 20px;
    }

    /* IRCA Section - Tablet */
    .irca-main {
        width: 100%;
        height: auto;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
    }

    .irca-tl, .irca-tr, .irca-bl, .irca-br {
        position: relative;
        width: 100%;
        left: auto;
        top: auto;
        margin-bottom: 20px;
    }

    /* Move Group26.png (irca-bl) below the Joygelato box so it reads nicer stacked */
    .irca-bl {
        order: 1;
    }

    /* Contact Section - Tablet: match the IRCA/HUG card width (padding + max-width) */
    .kontakt {
        width: 100%;
        height: auto;
        padding: 0 20px;
    }

    /* Gray "Dane kontaktowe" box as a rounded card like the IRCA/HUG sections */
    .kontakt-l {
        border-radius: 20px;
        overflow: hidden;
        padding-bottom: 20px;
    }

    /* Tighten the vertical rhythm inside the gray card (mobile/tablet) */
    .kontakt-l .kontakt-tytul {
        padding-bottom: 8px !important; /* override the inline 60px on this title */
        margin-bottom: 0;
    }

    .kontakt-l-tresc {
        padding: 5px 20px 10px;
    }

    /* Align the phone/mail icons with the text (the inline top:4px is desktop-tuned) */
    .kontakt-l-tresc img {
        top: 0 !important;
        vertical-align: middle;
    }

    /* Breathing room between the map and "Godziny otwarcia" */
    .kontakt-r-tresc img {
        margin-bottom: 25px;
    }

    .kontakt-l, .kontakt-c, .kontakt-r {
        position: relative;
        width: 100%;
        left: auto;
        height: auto;
        margin-bottom: 20px;
    }

    .kontakt-l-tresc, .kontakt-r-tresc, .kontakt-formularz {
        position: relative;
        top: auto;
        height: auto;
    }

    /* Cap the form so the inputs don't stretch full width on tablet (max ~500px) */
    .contact-form {
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Kontakt titles were still absolutely positioned -> overlapped the content */
    .kontakt-tytul {
        position: relative;
        height: auto;
        padding: 15px;
        margin-bottom: 10px;
        background-color: transparent;
    }

    /* HUG & IRCA text boxes: let them grow to fit so the copy can't be clipped
       by the fixed 400px height / absolute positioning left over from desktop */
    .hug-tl,
    .irca-tl,
    .irca-br {
        height: auto;
        min-height: 340px;
        padding: 40px 30px;
        /* Text box joins the photo below it: round the top only, no gap */
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }

    .hug-tr,
    .irca-tr,
    .irca-bl {
        height: 360px;
        /* Photo joins the text box above it: round the bottom only */
        border-radius: 0 0 20px 20px;
    }

    /* Bigger gap between the IRCA pair and the Joygelato pair */
    .irca-tr {
        margin-bottom: 50px;
    }

    .irca-logo,
    .joygelato-logo {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 160px;
        height: auto;
        margin: 0 auto 10px auto;
    }

    .irca-logo img,
    .joygelato-logo img {
        width: 100%;
        height: auto;
    }

    /* Logos sized by height (their images have a different aspect ratio) */
    .irca-logo img,
    .joygelato-logo img {
        width: auto;
        height: 80px;
        margin: 0 auto;
    }

    /* !important overrides the inline top: values on the HUG headline/opis */
    .irca-headline,
    .joygelato-headline {
        position: relative !important;
        top: auto !important;
        width: 100%;
        margin: 10px 0 15px 0;
    }

    .irca-opis,
    .joygelato-opis {
        position: relative !important;
        top: auto !important;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Match the navbar side padding to the "Krótko o nas" blue box (15px) */
    .custom-nav .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .hero-section {
        height: 600px;
    }

    /* Hide the Modena logo on the banner on mobile (not the wave) */
    .hero-section .container img {
        display: none;
    }

    /* Hide the belka.png wave on mobile */
    .hero-wave {
        display: none;
    }

    .hero-text {
        font-size: 34px;
        line-height: 1.3;
    }

    /* O NAS Section - Mobile */
    .onas-main {
        height: auto;
        padding: 30px 15px;
        background-size: cover;
        background-position: center;
    }

    .onas-tresc {
        width: 100%;
        padding: 30px 15px;
        border-radius: 20px;
    }

    .onas-tekst {
        font-size: 16px;
        line-height: 1.6;
        margin-top: 20px;
    }

    .onas-cechy {
        margin-top: 30px;
    }

    .onas-cechy-kolo {
        width: 100px;
        height: 100px;
        margin: 10px;
    }

    .onas-cechy-kolo-tekst-big {
        font-size: 22px;
    }

    .onas-cechy-kolo-tekst-small {
        font-size: 13px;
    }

    .onas-kategorie {
        margin-top: 30px;
    }

    .onas-kwadrat {
        width: 100px;
        height: 100px;
        margin: 10px;
    }

    .onas-kwadrat-tekst {
        font-size: 13px;
    }

    /* HUG Section - Mobile */
    .hugcesarin-main {
        height: auto;
        padding: 0 15px;
    }

    .hug-tl {
        height: auto;
        min-height: 400px;
        padding: 30px 20px;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }

    .hug-tr {
        height: 300px;
        border-radius: 0 0 20px 20px;
    }

    .irca-headline {
        position: relative !important;
        top: auto !important;
        margin: 20px 0;
        font-size: 18px;
    }

    .irca-opis {
        position: relative !important;
        top: auto !important;
        font-size: 16px;
        padding: 0 10px;
    }

    /* IRCA Section - Mobile */
    .irca-main {
        height: auto;
        padding: 0 15px;
    }

    .irca-tl, .irca-br {
        height: auto;
        min-height: 400px;
        padding: 30px 20px;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }

    .irca-tr, .irca-bl {
        height: 300px;
        border-radius: 0 0 20px 20px;
        margin-bottom: 15px;
    }

    /* Bigger gap between the IRCA pair and the Joygelato pair */
    .irca-tr {
        margin-bottom: 40px;
    }

    .irca-logo, .joygelato-logo {
        position: relative;
        top: auto;
        width: 140px;
        height: auto;
        transform: none;
        left: auto;
        margin: 20px auto;
    }

    .irca-logo img, .joygelato-logo img {
        width: 100%;
        height: auto;
    }

    /* Logos sized by height (their images have a different aspect ratio) */
    .irca-logo img, .joygelato-logo img {
        width: auto;
        height: 70px;
        margin: 0 auto;
    }

    .irca-headline, .joygelato-headline {
        position: relative;
        top: auto;
        margin: 20px 0;
        font-size: 18px;
    }

    .irca-opis, .joygelato-opis {
        position: relative;
        top: auto;
        font-size: 16px;
        padding: 0 10px;
    }

    /* Contact Section - Mobile */
    .kontakt {
        height: auto;
        padding: 0 15px;
    }

    .kontakt-tytul {
        position: relative;
        height: auto;
        padding: 15px;
        margin-bottom: 10px;
    }

    .kontakt-l-tresc {
        position: relative;
        padding: 5px 20px 10px;
        font-size: 16px;
    }

    .kontakt-r-tresc {
        position: relative;
        padding: 20px;
    }

    .kontakt-r-tresc img {
        max-width: 100%;
        height: auto;
    }

    .kontakt-godziny-tytul {
        margin-top: 20px;
        margin-bottom: 15px;
        font-size: 26px;
    }

    .kontakt-godziny-wrapper {
        text-align: center;
        margin-bottom: 20px;
    }

    .kontakt-godziny-row {
        margin-bottom: 8px;
        font-size: 16px;
    }

    .kontakt-godziny-l {
        display: inline;
        width: auto;
        text-align: center;
        padding-right: 5px;
        font-weight: 500;
    }

    .kontakt-godziny-l:after {
        content: ": ";
    }

    .kontakt-godziny-r {
        display: inline;
        width: auto;
        text-align: center;
    }

    .kontakt-formularz {
        position: relative;
        padding: 20px;
    }

    /* Partners - Mobile */
    .partner-logo,
    .partner-logo-small {
        width: 70px;
        margin: 5px;
    }

    /* Show only the first 12 partner logos until "Pokaż więcej" is tapped */
    .partners-grid:not(.expanded) .row > .col-auto:nth-child(n+13) {
        display: none;
    }

    .partners-more {
        display: block;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .hero-text {
        font-size: 30px;
    }

    .section-title {
        font-size: 26px;
    }

    .onas-cechy-kolo {
        width: 90px;
        height: 90px;
        margin: 8px;
    }

    .onas-kwadrat {
        width: 90px;
        height: 90px;
        margin: 8px;
    }
}

/* Maintain exact desktop layout at 1320px */
@media (min-width: 1320px) {
    .hugcesarin-main,
    .irca-main,
    .kontakt {
        max-width: 1320px;
    }

    body {
        min-width: 1320px;
    }
}