/* =========================================
   1. MOBILE STYLES (max-width: 631px)
   ========================================= */
   @media (max-width: 631px) {
    /* Navigation */
    .navbar-brand {
        font-size: 1rem;
    }
    
    /* Homepage and Hero Sections */
    .homepage-slider .slider-content {
        max-width: 100%;
        bottom: 100px;
    }
    .homepage-slider .swiper-slide::before {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 20%), 
                    linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 60%);
    }

    .hero-content {
        width: 100%;
    }
    .hero .hero-content h1 {
        white-space: wrap;
    }
    .front-page #section2 .hero .hero-content {
        width: 100%;
        left: 3%;
    }
    .front-page .text-content {
        display: flex;
        flex-direction: column;
        height: 100%;
        justify-content: end;
        padding: 0 10px 3rem 10px;
    }
    .front-page .text-content h2 {
        font-size: 1.2rem;
    }
    .front-page .text-content h4 {
        font-size: 0.8rem;
        font-weight: 300;
    }
    #hero .hero-content {
        flex-direction: column;
        gap: 1rem;
    }
    #hero .hero-section h1 {
        font-size: 2.5rem;
    }
    
    /* Footer */
    footer {
        flex-direction: column;
        height: auto;
    }
    .footer-menu {
        width: 90%;
        justify-self: center;
    }
    .main-footer-address {
        padding-left: 1rem;
    }
    
    /* Banner and Content Sections */
    .banner-overlay {
        justify-content: center;
    }
    .banner-content {
        margin-left: 0;
        width: 96%;
        display: flex;
        flex-direction: column;
        align-self: center;
        padding-top: 15dvh;
    }
    .banner-content h1 {
        font-size: 2.5rem;
    }
    .banner-content p {
        text-align: justify;
        line-height: 110%;
    }
    .page-default .content-section {
        width: 100%;
    }
    
    /* About Section */
    .about-details {
        width: 100%;
        display: flex;
        justify-self: center;
    }
    .about-heading-top .head-para {
        width: 96%;
    }
    .about-heading-top {
        padding-top: 5vh;
    }
    .about-heading-top p {
        text-align: justify;
        font-size: 16px;
    }
    .about-heading-top h1 {
        font-size: 2.5rem;
        padding-bottom: 1rem;
    }
    .about-heading-explore {
        padding-bottom: 1rem;
    }
    
    /* What We Do Grid */
    .what-we-do-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for mobile */
    }
    .what-we-do-grid .grid-item {
        padding: 1rem;
        min-height: 140px;
        height: 25dvh;
    }
    .what-we-do-grid .grid-item h1 {
        font-size: 0.9rem;
    }
    .what-we-do-grid .grid-top h2 {
        font-size: 12px;
    }
    
    /* Team Section */
    .meet-our-team .swiper {
        width: 100%;
        margin: 0;
        padding-left: 2%;
    }
    .timeline-container .timeline-swiper {
        height: unset ;
    }
    
    /* Timeline */
    .timeline-container .timeline-title h3 {
        font-size: 15px;
    }
    .timeline-svg-nav {
        width: 100%;
    }
    .year-display {
        width: 60%;
        padding-bottom: 2rem;
    }
    .timeline-container .bottom-nav-timeline .year-display h2 {
        font-size: calc(100vh / 21);
    }
    .timeline-container .swiper-button-next, .timeline-container .swiper-button-prev {
        top: var(--swiper-navigation-top-offset, 22%);
    }
    .bottom-nav-timeline .swiper-button-prev {
        right: 18% !important;
    }
    
    /* Heritage and Projects */
    .heritage-header-content, .project-header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .heritage-header select, input[type="text"], .projects-header select, input[type="text"] {
        padding: 8px !important;
        font-size: 12px !important;
    }
    .projects-header label {
        margin-bottom: 0.3rem;
        font-size: 1rem;
    }
    .heritage-grid, #conservation-page #projects-list {
        gap: 0rem;
        padding: 0;
    }
    #conservation-page .project-thumbnail {
        height: auto;
    }
    
    /* Single Post */
    .single-post-header {
        flex-direction: column-reverse;
        gap: 2vh;
        min-height: 100dvh;
        height: auto;
    }
    .single-post-header .project-showcase-section {
        width: 100%;
    }
    .header-swiper .swiper-slide {
        height: auto;
    }
    .single-post-header .header-swiper {
        height: 45dvh;
    }
    .header-swiper .swiper-wrapper {
        height: 80%;
    }
    .header-swiper .swiper-navigation {
        width: 96%;
    }
    .single-post-header .single-title-container {
        width: 100%;
        height: auto;
    }
    .single-post-header .single-title-container h1 {
        font-weight: 600;
        font-size: calc(100vw / 16);
    }
    .single-post-header .single-title-container .single-title-content {
        height: auto;
    }
    
    /* Details Sections */
    .bottom-details {
        flex-direction: column;
        padding-bottom: 3rem;
        height: auto;
    }
    .bottom-details .detail {
        border-top: none; 
        border-left: none;
        border-bottom: var(--border-style-light);
        width: 100%;
    }
    .bottom-details .first-detail {
        border-top: var(--border-style-light);
        width: 100%;
    }
    
    /* Contact Page */
    .hero-heading {
        font-size: 2rem;
        width: 60%;
    }
    .info-box {
        flex-direction: column;
    }
    .info-section:not(:last-child) {
        border-right: none;
    }
    .internship-content {
        width: 96%;
    }
    
    /* Blog */
    .blog-banner {
        height: 35dvh;
    }
    .single-post-container .category-blog .hero-title {
        padding: 0 2%;
    }
    .single-post-container .category-blog .hero-title h1 {
        font-size: 1.8rem;
    }
    .category-blog .breadcrumb-container {
        padding: 3px 2%;
    }
    .category-blog .main-post-content {
        width: 96%;
    }
    .single-post-container article {
        width: 96%;
    }
    .main-post-content {
        flex-direction: column-reverse;
    }
    .single-post .entry-content {
        width: 100%;
    }
    .single-post .entry-image {
        width: 100%;
    }
    .single-post-container article .hero-title h1 {
        font-size: calc(100vw / 15);
        padding-bottom: 1.5rem;
    }
    
    /* Nepal Project */
    .nepal-project-content {
        width: 96% !important;
    }
    .content-layout {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }
    .nepal-text-content {
        width: 100% !important;
    }
    .nepal-image-content {
        height: auto;
        width: 100% !important;
    }
}

/* =========================================
   2. EXTRA SMALL MOBILE STYLES (max-width: 345px)
   ========================================= */
@media (max-width: 345px) {
    .navbar-brand {
        font-size: 0.8rem;
    }
    .about-details p {
        font-size: 14px !important;
    }
    .what-we-do-grid .grid-item h1 {
        font-size: 14px !important;
    }
    .what-we-do-grid .grid-top h2 {
        font-size: 11px;
    }
    .what-we-do-grid .grid-item {
        padding: 1rem;
        min-height: 200px;
        height: 18dvh;
    }
}

/* =========================================
   3. SMALL MOBILE STYLES (max-width: 376px)
   ========================================= */
@media (max-width: 376px) {
    .homepage-nav .logo {
        width: 70%;
    }
    .hero-heading {
        font-size: 1.8rem !important;
    }
    .what-we-do-grid .grid-item {
        padding: 1rem;
        min-height: 140px;
        height: 22dvh;
    }
}

/* =========================================
   4. TABLET/MOBILE MENU STYLES (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Header and Navigation */
    .homepage-header {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 10dvh;
    }
    .homepage-nav {
        width: 96%;
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        align-items: center;
    }
    .single-post .homepage-nav {
        padding: 0 !important;
    }
    
    /* Mobile Menu */
    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        text-align: center;
        z-index: 1000;
    }
    .header-dark .nav-menu {
        background-color: #333;
    }
    .header-light .nav-menu {
        background-color: #f8f8f8;
    }
    .header-transparent .nav-menu {
        background-color: #292929;
    }
    .header-transparent .close-button {
        color: #fff !important;
    }
    .nav-menu.active {
        display: flex;
    }
    
    /* Menu Toggle */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
    }
    .header-dark .menu-toggle {
        color: white;
    }
    .header-light .menu-toggle {
        color: #333;
        order: 1;
    }
    .header-transparent .menu-toggle {
        color: var(--light-text);
        order: 1;
    }
    
    /* Menu Items */
    .homepage-nav ul {
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        width: 100%;
        justify-content: center;
    }
    .homepage-nav ul li a {
        font-size: 2rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .header-dark .homepage-nav ul li a {
        color: white;
        border-bottom: 1px solid #555;
    }
    .header-light .homepage-nav ul li a {
        color: #333;
        border-bottom: 1px solid #ddd;
    }
    
    /* Close Button */
    .close-menu {
        position: absolute;
        top: 10px;
        right: 15px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
    }
    .header-dark .close-menu {
        color: white;
    }
    .header-light .close-menu {
        color: #333;
    }
    
    /* Conservation Page */
    #conservation-page .projects-container {
        flex-direction: column;
    }
    #conservation-page .categories-sidebar {
        width: 100%;
    }
    #conservation-page .projects-content {
        width: 100%;
    }
    #conservation-page #projects-list {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    #conservation-page #project-item{
        padding:0  0.35rem;
    }
    #conservation-page .filter-btns .filter-btn{
        margin-right: 5px !important;
        padding: 0.3rem 0.7rem;
        font-size: 0.9rem;
    }
    #conservation-page .project-item h4{
        font-size: 0.8rem;
        text-transform: capitalize;
        padding: 0.3rem 0;
    }
    

    .bottom-nav-timeline {
        position: relative !important;
        width: 96%;
        display: block !important;
        bottom: unset !important;
    }
    .timeline-thumbnail img {
        height: 160px !important;
    }
    
    /* Team Grid */
    .meet-our-team-single-page .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* =========================================
   5. SMALL MOBILE STYLES (max-width: 480px)
   ========================================= */
@media (max-width: 480px) {
    #conservation-page #project-search-input {
        font-size: 14px;
        padding: 8px 12px;
    }
    #conservation-page .project-thumbnail img {
        height: 130px;
    }
    .meet-our-team-single-page .team-card {
        padding: 15px;
    }
    .meet-our-team-single-page .team-card img {
        width: 80px;
        height: 80px;
    }
}

/* =========================================
   6. DESKTOP STYLES (min-width: 769px)
   ========================================= */
@media (min-width: 769px) {
    /* Desktop Navigation */
    .homepage-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 2%;
        height: 10dvh;
        font-family: "Inter", sans-serif;
    }
    .nav-menu-search {
        display: flex;
        align-items: right;
        padding-left: 1rem;
    }
    .homepage-menu-class {
        display: flex;
        gap: 2.5rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .homepage-menu-class li a {
        text-decoration: none;
        transition: color 0.3s;
        font-family: "Inter";
        font-weight: 300;
        letter-spacing: 0.4px;
    }
    .search-icon {
        margin-left: 20px;
        font-size: 18px;
        padding-left: 1rem;
    }
    
    /* Hide Mobile Menu Elements */
    .menu-toggle {
        display: none;
    }
    .close-menu {
        display: none;
    }
}

@media (min-width: 1600px) {
  .homepage-slider .slider-content h2 {
    font-size: calc(100vh / 20);
}
.homepage-slider .slider-content p {
    font-size: calc(100vh / 38);
}
    .homepage-menu-class li a {
        font-size: calc(100vh / 38);
    }
        .search-icon {
        font-size: calc(100vh / 38);
    }
    .banner-content h1{
        font-size: calc(100vh / 18) !important;

    }
    .about-details p{
        font-size: calc(100vh / 38) !important;

    }
    .about-heading-top p{
        font-size: calc(100vh / 38) !important;

    }
    .team-name-static h3{
        font-size: calc(100vh / 38) !important;

    }
}
