/* =======================
   GENERAL STYLES
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    height: 100%; /* Ensure body and html take full height */
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth; /* Smooth scroll behavior */
}

/* Scroll offset for content and link section to stop about 40% higher */
#content-section:target, .link:target {
    scroll-margin-top: 40vh; /* Adjusts the scroll offset by 40% of the viewport height */
}

/* =======================
   HEADER STYLES (EVEN SMALLER HEADER)
========================= */

.site-header {
    background: #333;
    color: #fff;
    padding: 2px 0; /* Reduced header padding */
    width: 100%;
    flex-shrink: 0; /* Prevent header from growing */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5px; /* Smaller padding */
    width: 100%;
}

.logo a {
    font-size: 12px; /* Smaller logo size */
    color: #fff;
    text-decoration: none;
}

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    font-size: 8px; /* Smaller font size for navigation */
}

.main-navigation a {
    color: #fff;
    margin: 0 4px; /* Smaller spacing */
    text-decoration: none;
}

.main-navigation a:hover {
    color: #f1c40f;
}

/* =======================
   FOOTER STYLES (SMALLER FOOTER)
========================= */

.site-footer {
    background-color: #222;
    color: #ccc;
    padding: 6px 0; /* Smaller footer padding */
    text-align: center;
    font-size: 10px; /* Smaller footer font size */
    width: 100%;
    flex-shrink: 0; /* Keep footer at the bottom */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px;
    width: 100%;
}

.site-footer p {
    margin: 5px 0;
    line-height: 1.4; /* Slightly reduced line height */
}

.footer-text {
    font-size: 8px; /* Smaller footer text */
    color: #999;
}

/* =======================
   IFRAME STYLES
========================= */

.iframe-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    padding: 0;
    flex-grow: 1; /* Allow iframe container to take up available space */
}

.iframe-container iframe {
    width: 100%;
    height: 75vh; /* Dynamic height based on viewport height */
    max-width: 1000px; /* Limit max width for readability */
    border: none;
    box-sizing: border-box;
}

/* Responsive iframe adjustments */
@media (max-width: 1024px) {
    .iframe-container iframe {
        height: 65vh !important; /* Adjust height for tablets */
    }
}

@media (max-width: 768px) {
    .iframe-container iframe {
        height: 55vh !important; /* Adjust height for smartphones */
    }
}

@media (max-width: 480px) {
    .iframe-container iframe {
        height: 50vh !important; /* Adjust height for very small screens */
    }
}

/* =======================
   LINK SECTION STYLES
========================= */

.link {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 0;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    background-color: #000;
}

.link a {
    font-size: 14px;
    padding: 8px 10px;
    text-decoration: none;
    color: #fff;
    background-color: #000;
    border: 1px solid #fff;
    margin: 0 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.link a:hover {
    background-color: #f1c40f;
    color: #333;
}

/* Responsive link adjustments */
@media (max-width: 768px) {
    .link a {
        font-size: 12px; /* Smaller font for tablets */
        padding: 6px 8px; /* Smaller padding */
        margin: 3px 5px; /* Adjust margin */
    }
}

@media (max-width: 480px) {
    .link a {
        font-size: 10px; /* Smaller font for small screens */
        padding: 4px 6px; /* Smaller padding */
        margin: 2px 4px; /* Adjust margin */
    }
}

/* =======================
   PAGE WRAPPER
========================= */

.page-wrapper {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

/* =======================
   BUTTON STYLES (SMALLER BUTTONS)
========================= */

button {
    padding: 6px 12px; /* Smaller button padding */
    background-color: #222;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px; /* Smaller button font */
    margin: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button:hover {
    background-color: #f1c40f;
    color: #333;
}

/* =======================
   BACK TO TOP BUTTON STYLES (SMALLER)
========================= */

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 8px 12px; /* Smaller padding */
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px; /* Smaller font */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-to-top.visible {
    display: block;
    opacity: 1;
}

/* =======================
   RESPONSIVE STYLES
========================= */

@media (max-width: 1024px) {
    .header-container, .footer-container {
        max-width: 100%;
        padding: 0 5px; /* Reduced padding for smaller screens */
    }

    .main-navigation {
        flex-direction: column;
        align-items: center;
    }

    .main-navigation a {
        margin: 4px 0;
    }

    button {
        font-size: 10px;
        padding: 5px 10px;
    }

    .back-to-top {
        font-size: 10px;
        padding: 6px 8px;
    }
}

/* For smartphones */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo a {
        font-size: 10px; /* Reduced logo size on small screens */
    }

    .main-navigation {
        flex-direction: column;
    }

    .main-navigation a {
        margin: 4px 0;
        font-size: 9px; /* Smaller font for navigation */
    }

    button {
        font-size: 9px;
        padding: 5px 8px;
    }

    .back-to-top {
        font-size: 9px;
        padding: 5px 8px;
    }

    /* Smaller link sizes for tablets and smaller screens */
    .link a {
        font-size: 12px; /* Tablet font size for links */
        padding: 6px 8px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .logo a {
        font-size: 8px; /* Even smaller logo size */
    }

    .main-navigation a {
        margin: 3px 0;
        font-size: 8px; /* Even smaller navigation */
    }

    button {
        font-size: 8px;
        padding: 4px 6px;
    }

    .back-to-top {
        font-size: 8px;
        padding: 4px 6px;
    }

    /* Smaller link sizes for very small screens */
    .link a {
        font-size: 10px; /* Small screen font size for links */
        padding: 4px 6px;
        margin: 2px 4px;
    }
}
