
/* Small screens (mobile) */
@media (max-width: 1300px) {
    html, body {
         margin: 0;        /* remove default gap */
        padding: 0;       /* remove padding too */
        width: 100%;
    }
  
    

    header {
        flex-direction: row-reverse;
        position: relative; /* Add this for mobile nav positioning */
    }

    .subtitle {
        font-size: 45px ;
        margin: 0 auto !important;
        width: 90% ;
        min-width: 0 !important;
        padding-right: 0 !important;
    }

    .p-text {
        font-size: 25px ;
        margin: 0 auto !important;
        padding-right: 0 !important;
        width: 90% !important;
    }

    #logo-div {
        width: min-content !important;
    }

    .result-search-box {
        width: 90%;
    }

    #header-pages {
        display: none; /* hide normal nav */
    }

    #menu-button {
        display: inline-block;
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
        z-index: 101; /* Ensure it's above mobile nav */
    }

    /* Make search input smaller */
    #search-div {
        display: none; /* Hide desktop search */
    }

    /* Mobile search in nav */
    .mobile-nav #mobile-search {
        display: flex;
        margin: 15px auto;
        width: 90%;
        position: relative;
    }
    
    .mobile-nav #mobile-search input {
        width: 100%;
        padding: 12px;
        border: none;
        background-color: #f0f0f0;
        border-radius: 20px;
        text-align: right;
        font-size: 16px;
    }
    
    .mobile-nav #mobile-search button {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        font-size: 20px;
    }
}

@media (max-width: 500px) {
    #logo_image {
        height: 60px;
    }
}

@media (max-width: 380px) {
    #logo_image {
        height: 40px;
    }
}

    /* Mobile nav styles with animation */
.mobile-nav {
    z-index: 999 !important;
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen to the right */
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 100;
    flex-direction: column;
    text-align: center;
    padding-top: 70px;
    overflow-y: auto;
    transition: right 0.4s ease-in-out; /* Smooth slide animation */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    }

.mobile-nav.active {
    right: 0; /* Slide in to visible position */
    display: flex;
    }

    /* Overlay for when menu is active */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    }

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    }

/* Close button for mobile nav */
#close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
    }

#close-menu:hover {
    transform: rotate(90deg);
    }

    /* Menu items animation */
.mobile-nav a {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.3s;
    transform: translateX(20px);
    opacity: 0;
    }

.mobile-nav.active a {
    transform: translateX(0);
    opacity: 1;
    }

/* Staggered animation for menu items */
.mobile-nav.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active a:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active a:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active a:nth-child(4) { transition-delay: 0.4s; }

.mobile-nav a:hover {
    background-color: #f5f5f5;
    transform: translateX(5px);
    }

@media (max-width: 410px) {
    .result-search-box {
        width: 80%;
    }
    }



    /* Footer responsive */
@media (max-width: 900px) {
    #subsecribe-div h3, #subsecribe-div a {
    font-size: 12px;
    }

    #subsecribe-div h3 .material-symbols-outlined {
    font-size: 20px;
    }


}


@media (max-width: 800px) {
    footer .subtitle {
        font-size: 30px !important;
        width: 90%;
    }

    #links-div {
        width: fit-content;
    }

    #email-input {
        width: 90% !important;
    }

    footer .subtitle {
        font-size: 20px !important;
    }

    #subsecribe-div h3, #subsecribe-div a {
    font-size: 10px;
    }

    #subsecribe-div h3 .material-symbols-outlined {
    font-size: 15px;
    }

}

@media (max-width: 610px){

    footer .subtitle {
        font-size: 22px !important;
        width: 90%;
    }

    #links-div p {
        font-size: 12px;
    }

    #subsecribe-div h3 {
        width: 60% ;
    }

    #subsecribe-div a {
        width: 25% ;
    }
}

@media (max-width: 500px) {
    #subsecribe-div {
        flex-direction: column;
    }

    #subsecribe-div h3 {
        margin-bottom: 10px;
        width: 90%;
    }

    #subsecribe-div a {
        width: 70%;
    }
}

@media (max-width: 440px) {
    #links-div {
        max-height: 130px ;
        justify-content: space-between !important;
        text-align: center;
    }

    #links-div p {
        font-size: 10px;
    }

    #email-input {
        height: 30px !important;
        font-size: 20px;
    }

    #subsecribe-div .material-symbols-outlined {
        
        padding: 3px 5px;
        font-size: 24px;
    }

    #subsecribe-button {
        font-size: 13px !important;
    }

    footer h2 {
        font-size: 18px !important;
    }


}