/* 
 * Responsive styles for the website
 * This file contains styles to make the website responsive and mobile-friendly
 */

/* Base responsive styles */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Mobile menu toggle button */
#mobile-menu-toggle {
    display: none;
    width: 30px;
    height: 25px;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    z-index: 100;
}

#mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #0069d2;
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.missvste #mobile-menu-toggle span {
    background-color: rgb(153, 51, 51);
}

/* Large screens (up to 1200px) */
@media screen and (max-width: 1200px) {

    /* Adjust widths of main containers */
    header,
    footer,
    #navigation nav,
    #ads,
    #facebook,
    #profile-list .content,
    .message {
        width: 95%;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Adjust ads and facebook sections */
    #ads,
    #ads div,
    #ads a,
    #facebook {
        width: 95%;
        max-width: 912px;
    }

    /* Make iframe responsive */
    iframe {
        max-width: 100%;
    }
}

/* Medium screens / tablets (up to 992px) */
@media screen and (max-width: 992px) {

    /* Adjust navigation */
    #navigation nav {
        padding-left: 0;
        width: 95%;
        text-align: center;
    }

    /* Adjust logo */
    #logo {
        text-align: center;
    }

    #logo h1 {
        margin: 0 auto;
    }

    /* Adjust miss list */
    #profile-list li {
        width: 25%;
        box-sizing: border-box;
    }

    #profile-list li a {
        width: 100%;
    }

    /* Adjust footer */
    footer p.text,
    footer p.links {
        float: none;
        text-align: center;
    }

    /* Adjust promo section */
    header.large p {
        font-size: 48px;
        line-height: 60px;
    }

    /* Adjust winners section */
    #winners-photo img {
        max-width: 100%;
    }

    #winners-list {
        width: 100%;
    }

    .winners-youtube iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    #profile {
        flex-direction: column !important;
    }

    #main-content aside {
        width: 100% !important;
    }

    #main-content .main-column {
        width: 100% !important;
    }

    #detail .detail-votes .votes {
        flex-direction: column;
    }
    #detail .detail-votes .position {
        flex-direction: column;
    }

    #account th {
        font-size: 1.2em !important;
    }
}

/* Small screens / mobile (up to 768px) */
@media screen and (max-width: 768px) {

    /* Show mobile menu toggle and adjust navigation */
    #mobile-menu-toggle {
        display: block;
    }

    #navigation {
        position: relative;
    }

    #navigation nav {
        height: auto;
        min-height: 89px;
    }

    #navigation nav ul {
        display: none;
        padding-top: 60px;
    }

    #navigation nav.mobile-active ul {
        display: block;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding-bottom: 15px;
    }

    #navigation nav li {
        display: block;
        padding: 10px 15px;
        text-align: left;
    }

    /* Adjust miss list for fewer columns */
    #profile-list li {
        width: 33.33%;
    }

    /* Adjust winners display */
    #miss-winners ul li {
        float: none;
        width: 80%;
        margin: 0 auto 20px;
    }

    /* Adjust main miss display */
    #miss-main,
    #miss-latest {
        width: 100%;
    }

    #miss-latest ul li {
        width: 33.33%;
        float: left;
        box-sizing: border-box;
    }

    /* Fixed banner adjustment */
    #fernet_banner {
        width: 120px;
        height: 120px;
    }

    #fernet_banner img {
        width: 120px;
        height: 120px;
    }

    #newsletter form {
        flex-direction: column !important;
    }

    #newsletter label {
        text-align: center !important;
    }

    #detail {
        display: block !important;
    }

    #detail .mobile {
        display: block !important;
    }
    #detail .desktop {
        display: none !important;
    }

    #detail .detail-info li {
        flex-direction: column !important;
    }
    #detail .detail-info label {
        font-weight: bold;
    }

    #detail .detail-votes .votes, #detail .detail-votes .position {
        margin: 10px !important;
    }

    #gallery .gallery-filter {
        flex-direction: column;
    }

    #gallery .gallery-filter > div {
        width: 100%;
    }

    .detail-navigation {
        border: none !important;
        margin: 0 auto !important;
        zoom: 0.85;
    }
}

/* Extra small screens (up to 480px) */
@media screen and (max-width: 480px) {

    /* Further reduce miss list columns */
    #profile-list li {
        width: 50%;
    }

    /* Adjust miss latest display */
    #miss-latest ul li {
        width: 50%;
    }

    /* Adjust header text */
    header.large p {
        font-size: 36px;
        line-height: 44px;
        top: 40px;
    }

    header.large #promo {
        padding: 0 10px !important;
    }

    /* Adjust winners table */
    #winners-list table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* Hide fixed banner on very small screens */
    #fernet_banner {
        display: none;
    }

    #main-content {
        padding: 36px 10px 28px;
    }

    #main-content aside {
        padding: 0 0 20px !important;
    }

    #detail {
        padding: 0 0 20px !important;
        display: block !important;
    }

    .input-fields  {
        flex-direction: column !important;
    }

    .input-fields .input-field label {
        padding: 5px 0 5px !important;
    }

    #account th {
        font-size: 1em !important;
    }

    .popup {
        padding: 16px 10px 8px !important;
    }
}