/*
Responsive Design Styles - Mobile, Tablet, Desktop
*/

/* Tablet and Mobile Layout (≤991px) */
@media (max-width: 991px) {
    .main-nav {
        display: none;
    }

    .archive-sidebar {
        display: none;
    }

    .archive-content-wrapper {
        grid-template-columns: 1fr;
    }

    .home .site-header.scrolled .search-input {
        width: 100%;
        padding: 8px 40px 8px 12px;
        font-size: 13px;
        height: 34px;
    }

    .home .site-header.scrolled .site-logo {
        height: 30px;
    }

    .home .site-header.scrolled .mobile-menu-toggle {
        position: relative;
        left: 0;

    }
    
    .home .mobile-menu-toggle {
        display: flex;
        position: fixed;
        left: 20px;
        z-index: 9999;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 1;
        justify-self: left;
    }
    
    .header-content {
        display: grid !important;
        justify-content: space-between;
        align-items: center;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .home .header-content {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
    
    .site-branding {
        flex: 0 0 auto;
        order: 2;
    }
    
    .search-section {
        flex: 1;
        order: 3;
        justify-self: right;
    }
    
    .search-input {
        width: 100%;
    }
    
    .single-post-wrapper {
        grid-template-columns: 1fr;
    }
    
    .single-post-content {
        order: 1;
    }
    
    .single-post-sidebar {
        display: none;
    }
    
    /* Hero Section - Mobile Layout */
    .hero-content-apt {
        grid-template-columns: 1fr;
        gap: 0px;
    }
    
    .hero-sidebar-articles {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 0;
        background: white;
    }
    
    .sidebar-article-item {
        padding: 15px 0;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        gap: 12px;
        align-items: center;
        transition: background-color 0.3s ease;
    }
    
    .sidebar-article-item:last-child {
        border-bottom: none;
    }
    
    .sidebar-article-item:hover {
        background-color: #f8f9fa;
        margin: 0 -10px;
        padding: 15px 10px;
    }
    
    .sidebar-article-image {
        width: 50%;
        height: 120px;
        border-radius: 5px;
    }
    
    .sidebar-article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }
    
    .sidebar-article-content {
        flex: 1;
        min-width: 0;
        padding: 0;
    }
    
    .sidebar-category-label {
        background: transparent;
        color: #1a936f;
        padding: 0;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 5px;
    }
    
    .sidebar-article-title {
        font-size: 18px;
        font-weight: 400;
        line-height: 22px;
        color: #333;
        margin: 0 0 5px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .sidebar-article-excerpt {
        font-size: 11px;
        color: #666;
        line-height: 1.4;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Latest Articles - Mobile Layout */
    .articles-grid-apt {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card-apt {
        background: white;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: row;
    }
    
    .article-card-apt:hover {
        transform: translateY(-2px);
    }
    
    .article-image-apt {
        height: 120px;
        max-width: 50%;
        flex: auto;
    }
    
    .article-image-apt img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }
    
    .article-content-apt {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .article-excerpt-apt {
        font-size: 12px;
        color: #666;
        line-height: 1.4;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .discover-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .hero-main-article {
        margin-bottom: 0;
        grid-column: 2;
    }
}

/* Mobile Specific Styles (≤768px) */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .discover-more.container {
        padding: 0;
    }

    .home .search-section {
        width: 100%;
        max-width: 100%;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .site-header {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .home .site-header.scrolled .header-content {
        padding: 0;
    }  
    
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
    }

    

    
    .search-form {
        margin: 0;
    }
    
    .search-input {
        width: 100%;
        padding: 8px 40px 8px 12px;
        font-size: 14px;
        border: 1px solid #ddd;
        background: #f8f9fa;
    }
    
    .search-input:focus {
        background: white;
        border-color: #1a936f;
    }
    
    .search-input::placeholder {
        color: #999;
    }
    
    .search-button {
        right: 8px;
        width: 32px;
        height: 32px;
    }
    
    /* Hero Section Mobile */
    .hero-section-apt {
        padding-top: 20px;
        margin-bottom: 30px;
    }
    
    .hero-main-article {
        margin-bottom: 0;
        grid-column: 2;
    }
    
    .featured-article-large {
        overflow: hidden;
    }
    
    .featured-image-large img {
        height: 200px;
    }
    
    /* Latest Articles Mobile */
    .latest-articles-section-apt {
        padding: 30px 0;
    }
    
    .section-header-apt {
        margin-bottom: 25px;
    }
    
    .section-title-apt {
        font-size: 20px;
        color: #1a936f;
        text-align: center;
    }
    
    .articles-grid-apt {
        grid-template-columns: 1fr;
        gap: 20px;
    }

/* Placeholder Mini Cards */
    .placeholder-card .placeholder-mini {
        height: 60px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #dee2e6;
        position: relative;
        overflow: hidden;
    }
    
    .article-card-apt {
        background: white;
        align-items: center;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: row;
    }
    
    .article-card-apt:hover {
        transform: translateY(-2px);
    }
    
    .article-image-apt {
        height: 120px;
        max-width: 50%;
        flex: auto;
    }
    
    .article-image-apt img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }
    
    .article-content-apt {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .article-excerpt-apt {
        font-size: 12px;
        color: #666;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .single-post-page {
        padding-top: 20px !important;
    }
    
    /* Mobile Navigation */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 9999;
        transition: right 0.3s ease;
    }
    
    .mobile-nav.active {
        right: 0;
    }
    
    .mobile-nav-content {
        padding: 10px;
        height: 100%;
        overflow-y: auto;
    }
    
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 10px;
    }

 
    
    .mobile-nav-title {
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }
    
    .mobile-menu-list a {
        padding-top: 10px;
        display: block;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
        transition: color 0.3s ease;
    }
    
    .mobile-menu-list a:hover {
        color: #1a936f;
        padding-left: 10px;
    }
    
    /* Single Post Mobile */
    .single-post-container {
        padding: 20px;
    }
    
    .single-post-wrapper {
        gap: 20px;
        display: flex;
        flex-direction: column;
    }
    
    .single-post-content {
        order: 1;
    }
    
    .article-title {
        font-size: 20px;
        line-height: 1.3;
        color: #2e7d32;
    }
    
    .content-wrapper {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .content-wrapper h2 {
        font-size: 18px;
        color: #2e7d32;
    }
    
    .content-wrapper h3 {
        font-size: 16px;
        color: #2e7d32;
    }
    
    .sidebar-section {
        background: white;
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .related-article-link-simple {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .related-article-image-simple {
        width: 60px;
        height: 45px;
    }
    
    .related-article-title-simple {
        font-size: 12px;
        color: #2e7d32;
    }
    
    .discover-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .discover-article {
        background: white;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        transition: background-color 0.3s ease;
        overflow: hidden;
    }
    
    .discover-article:last-child {
        border-bottom: none;
    }
    
    .discover-article:hover {
        background-color: #f8f9fa;
        transform: none;
        box-shadow: none;
        margin: 0 -15px;
        padding: 15px;
    }
    
    .discover-article-link {
        display: flex;
        width: 100%;
        text-decoration: none;
        color: inherit;
        gap: 12px;
        align-items: center;
    }
    
    .discover-article-image {
        width: 90px;
        height: 70px;
        flex-shrink: 0;
        border-radius: 4px;
        overflow: hidden;
    }
    
    .discover-article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    
    .discover-article:hover .discover-article-image img {
        transform: scale(1.05);
    }
    
    .discover-article-content {
        flex: 1;
    }
    
    .discover-article-category {
        background: transparent;
        color: #1a936f;
        padding: 0;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 5px;
        display: block;
        font-weight: 700;
        font-family: 'Roboto Condensed';
    }
    
    .discover-article-title {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 10px;
        color: #151515;
    }
    
    .discover-article-excerpt {
        font-size: 11px;
        color: #666;
        line-height: 1.4;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .discover-title {
        font-size: 18px;
        font-weight: 500;
        color: #151515;
        margin-bottom: 18px;
        text-transform: uppercase;
        font-family: 'Roboto Condensed', sans-serif;
        letter-spacing: 1px;
        text-align: left;
        position: relative;
    }
    
    .discover-title::after {
        content: '';
        position: absolute;
        left: 20px;
        width: 40px;
        height: 3px;
        background: #1a936f;
    }

    .archive-content-wrapper {
        grid-template-columns: 2fr;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .search-input {
        font-size: 13px;
    }

    
    .container {
        padding: 0 10px;
    }
    
    .featured-image-large img {
        height: 160px;
    }
    
    .sidebar-article-image {
        width: 50%;
        height: 120px;
        border-radius: 5px;
    }
    
    .article-image-apt {
        height: 120px;
        max-width: 50%;
        flex: auto;
    }
    
    .article-image-apt img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }
    
    
    .single-post-container {
        padding: 20px;
        padding-top: 40px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .content-wrapper {
        font-size: 13px;
    }
    
    .content-wrapper h2 {
        font-size: 16px;
    }
    
    .content-wrapper h3 {
        font-size: 14px;
    }
    
    .sidebar-section {
        padding: 12px;
    }
    
    .related-article-image-simple {
        width: 50px;
        height: 40px;
    }
    
    .related-article-title-simple {
        font-size: 11px;
    }
    
    /* Ensure proper order on very small screens */
    .single-post-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .single-post-content {
        order: 1;
    }

    .single-post-sidebar {
        display: none;
    }
    
    .discover-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .discover-article-image {
        width: 80px;
        height: 60px;
    }
    
    .discover-article-category {
        font-size: 12px;
    }
    
    .discover-article-title {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 10px;
        color: #151515;
    }
    
    .discover-article-excerpt {
        font-size: 10px;
    }
    .search-section {
        display: none;
    }

    .home .search-section {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .header-content {
        grid-template-columns: 1fr 2fr 1fr;
    }

     .site-logo {
        height: 30px !important;
    }
    
    
    
} 