/* ==========================================================================
   Mobile styles for Jednosc32 swim theme
   Applied at max-width: 768px — loaded after style.css to override desktop
   ========================================================================== */

/* Hamburger hidden by default (desktop) */
.hamburger {
    display: none;
}

/* ==========================================================================
   Mobile: max-width 768px
   ========================================================================== */
@media (max-width: 768px) {

    /* Layout
       ====================================================================== */
    html, body {
        overflow-x: hidden;
    }

    * {
        box-sizing: border-box;
    }

    #all {
        min-width: 0;
        width: 100%;
        overflow-x: hidden;
    }

    #all > div {
        width: 100%;
        max-width: 100%;
    }

    #content {
        width: auto;
        max-width: 100%;
        overflow: visible;
    }

    #left {
        width: auto;
        max-width: 100%;
        float: none;
        margin: 0;
    }

    .plywacyPage #left {
        min-height: 0;
    }

    #sidebar {
        width: auto;
        max-width: 100%;
        float: none;
        margin: 0;
    }

    #one_column {
        width: auto;
        margin: 0 5px;
    }

    /* Header
       ====================================================================== */
    #top {
        width: 100%;
        height: auto;
        background-size: cover;
        background-position: top right;
        position: relative;
    }

    #top .logo {
        width: auto;
        height: 70px;
        float: none;
        margin: 10px 0 0 15px;
    }

    #top .logo a {
        width: 240px;
        height: 70px;
        background-size: contain;
    }

    /* Hamburger button */
    .hamburger {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        background: #0077c0;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        padding: 8px;
        z-index: 100;
    }

    .hamburger span,
    .hamburger span::before,
    .hamburger span::after {
        display: block;
        width: 24px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        position: relative;
        transition: all 0.3s ease;
    }

    .hamburger span::before,
    .hamburger span::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .hamburger span::before {
        top: -8px;
    }

    .hamburger span::after {
        top: 8px;
    }

    /* Hamburger animation when menu is open */
    #top.menu-open .hamburger span {
        background: transparent;
    }

    #top.menu-open .hamburger span::before {
        top: 0;
        transform: rotate(45deg);
    }

    #top.menu-open .hamburger span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Navigation
       ====================================================================== */
    #top .menu {
        display: none;
        width: 100%;
        height: auto;
        margin: 10px 0 0;
        float: none;
        clear: both;
    }

    #top.menu-open .menu {
        display: block;
    }

    #top .menu ul {
        width: 100%;
    }

    #top .menu ul li {
        float: none;
        display: block;
        background: none;
    }

    #top .menu ul li a {
        float: none;
        display: block;
        height: auto;
        line-height: 44px;
        margin: 0;
        padding: 0 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    #top .menu ul li.home a {
        background-position: center;
        width: auto;
        text-indent: -9999px;
    }

    #top .menu ul li.rozw a {
        background: none;
        padding: 0 15px;
        margin: 0;
    }

    /* Submenus — show inline on mobile */
    #top .menu ul ul {
        position: static;
        display: none;
        top: auto;
    }

    #top .menu ul li.act ul {
        display: block;
    }

    #top .menu ul li.rozw ul li a {
        width: auto;
        padding-left: 30px;
        background: rgba(0, 0, 0, 0.15);
    }

    #top .menu ul li.rozw ul ul {
        position: static;
        display: none;
        border-left: 0;
    }

    #top .menu ul li.rozw ul li.rozw2 a {
        background: rgba(0, 0, 0, 0.15);
    }

    #top .menu ul li.rozw ul li.rozw2 ul li a {
        padding-left: 45px;
        background: rgba(0, 0, 0, 0.25);
        width: auto;
    }

    /* Sidebar widgets
       ====================================================================== */
    #sidebar .widget {
        width: auto;
        margin: 0 5px 10px;
        box-sizing: border-box;
    }

    #sidebar .widget .box-plywalnia,
    #sidebar .widget .box-tt,
    #sidebar .widget .box-linki {
        padding: 10px;
    }

    #sidebar .widget .box-tt p {
        padding-left: 100px;
    }

    #sidebar .widget .box-tt span {
        width: 95px;
    }

    #sidebar .widget.medals {
        background-size: 100% auto;
    }

    #sidebar .widget .box-medals {
        padding-top: 120px;
    }

    #sidebar .widget .box-medals .medal {
        width: 60px;
        margin-right: 8px;
    }

    #sidebar .switcher {
        width: auto;
        box-sizing: border-box;
    }

    /* Slider (hero news)
       ====================================================================== */
    #left .slider {
        width: auto;
        height: auto;
        margin: 5px;
        overflow: hidden;
    }

    #left .slider img {
        width: 100%;
        height: auto;
        display: block;
    }

    #left .slider .desc {
        position: static;
        width: auto;
        background: #0077c0;
    }

    #left .slider .desc h2 {
        margin: 0;
        float: none;
        line-height: 1.3;
        padding: 8px 10px;
        font-size: 16px;
    }

    #left .slider .desc p {
        padding: 5px 10px;
    }

    #left .slider .desc .date {
        margin: 0 0 0 10px;
    }

    #left .slider .desc a.more {
        margin: 0 10px 8px 0;
    }

    /* News items
       ====================================================================== */
    #left .news {
        width: auto;
        float: none;
        margin: 15px 5px 5px;
    }

    #left .news:nth-of-type(even) {
        clear: none;
        margin: 15px 5px 5px;
    }

    .news .photo img {
        width: 100%;
        height: auto;
    }

    #left .news_plywacy {
        width: auto;
        margin: 15px 10px;
    }

    /* One column news */
    #one_column .news {
        width: auto;
        float: none;
        margin: 15px 5px 5px;
    }

    #one_column .news:nth-of-type(3n),
    #one_column .news:nth-of-type(3n+1) {
        clear: none;
        margin: 15px 5px 5px;
    }

    /* Content area / subpages
       ====================================================================== */
    #left .lct {
        width: auto;
        padding: 5px 5px 10px;
        box-sizing: border-box;
    }

    #left .lct .player_foto {
        float: none;
        max-width: 100%;
        margin: 0 auto 15px;
        display: block;
        text-align: center;
    }

    #left .lct .player_foto img {
        max-width: 100%;
        height: auto;
    }

    /* Tables — responsive horizontal scroll */
    #left table.team,
    #left table.sztab,
    #left table.terminarz,
    #left table.table,
    table.rekordy {
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #left table td,
    #left table th {
        padding: 5px;
        font-size: 11px;
    }

    /* Images in content */
    #left .lct img,
    #one_column img {
        max-width: 100%;
        height: auto;
    }

    .alignright,
    .alignleft {
        float: none;
        display: block;
        margin: 10px auto;
    }

    /* Galleries */
    .gallery-item {
        width: 33.33% !important;
    }

    /* Ads / partners
       ====================================================================== */
    #ads {
        width: auto;
        margin: 15px 5px 0;
        padding: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    #ads .adsheader {
        width: 100%;
        text-align: center;
    }

    #ads img {
        max-height: 40px;
    }

    /* Footer
       ====================================================================== */
    #footer {
        width: auto;
        margin: 5px 5px 0;
        text-align: center;
    }

    #footer .left {
        float: none;
        background-position: center top;
        padding: 40px 0 5px;
        text-align: center;
    }

    #footer .right {
        float: none;
        margin: 5px 0;
    }

    /* Plywacy footer */
    .foot-plywacy {
        width: auto;
        margin: 5px 5px 0;
    }

    .foot-plywacy .fpbox {
        float: none;
        width: auto;
    }

    /* Facebook widget */
    #sidebar .widget.fb-wg {
        overflow: hidden;
    }

    #sidebar .widget.fb-wg .fb-like-box,
    #sidebar .widget.fb-wg .fb-page {
        max-width: 100%;
    }

    /* Notread badge */
    .notread:before {
        font-size: 10px;
        padding: 1px 6px;
    }

    /* Pagination */
    .pagination {
        text-align: center;
        padding: 10px 5px;
    }
}
