/* 
 * Responsive media styles for the website
 * Handles images, videos, iframes, and other media elements
 */

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

/* Make sure images don't break layout */
img {
    display: inline-block;
    vertical-align: middle;
}

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

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

    /* Adjust miss profile images */
    #miss-main img,
    #miss-latest img {
        max-width: 100%;
        height: auto;
    }

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

    /* Facebook container */
    #facebook {
        overflow: hidden;
        width: 95%;
        max-width: 922px;
    }

    /* Banner adjustments */
    #ads,
    #ads div,
    #ads a {
        width: 100%;
        max-width: 912px;
        height: auto;
    }
}

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

    /* Adjust miss gallery images */
    #profile-list li img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Adjust winners display */
    #miss-winners ul li img {
        width: 100%;
        height: auto;
    }

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

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

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

    /* Replace Flash content with image alternatives on mobile */
    embed[type="application/x-shockwave-flash"] {
        display: none;
    }

    .flash-alternative {
        display: block;
        width: 100%;
        height: auto;
    }
}

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

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

    /* Adjust Facebook container */
    #facebook {
        height: auto;
        overflow: hidden;
    }

    /* Ensure images maintain aspect ratio */
    img {
        height: auto !important;
    }
}