/* ========================================
   Blog Page Styles
   ======================================== */

/* Hero Section */
.blog-hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.6)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 80px 20px;
    width: 100%;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 40px;
    color: #ffffff;
    opacity: 0.95;
}

/* Search Form */
.hero-search-form {
    max-width: 900px;
    margin: 0 auto;
}

.blog-search-form {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input-wrapper {
    flex: 2;
}

.search-input {
    width: 100%;
    padding: 18px 24px;
    border: none;
    font-size: 16px;
    outline: none;
    color: #1f2937;
    background: transparent;
}

.search-input::placeholder {
    color: #9ca3af;
}

.location-input-wrapper {
    flex: 1;
    border-left: 1px solid #e5e7eb;
}

.location-select {
    width: 100%;
    padding: 18px 24px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
    cursor: pointer;
    color: #1f2937;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-explore {
    padding: 18px 40px;
    background: #06b6d4;
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-explore:hover {
    background: #0891b2;
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* Blog Posts Section */
.blog-posts-section {
    padding: 80px 0;
    background: #f9fafb;
}

.blog-posts-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: #06b6d4;
}

.blog-card-excerpt {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-link {
    color: #06b6d4;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}

.blog-card-link:hover {
    gap: 10px;
}

.arrow-icon {
    width: 16px;
    height: 16px;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: #0ea5e9;
    color: #ffffff;
    border: none;
    padding: 18px 60px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-load-more:hover {
    background: #0284c7;
}

.btn-load-more:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    font-size: 18px;
    color: #6b7280;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card-image img,
    .btn-explore,
    .btn-load-more,
    .blog-card-link {
        transition: none;
    }
    
    .blog-card:hover {
        transform: none;
    }
    
    .blog-card:hover .blog-card-image img {
        transform: none;
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-content {
        padding: 60px 20px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Blog Grid - Single Column */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Hero Section - Mobile Optimized */
    .blog-hero-section {
        min-height: 450px;
        background-attachment: scroll;
    }
    
    .hero-content {
        padding: 40px 16px;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }
    
    /* Search Form - Stacked Layout */
    .blog-search-form {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-input-wrapper,
    .location-input-wrapper,
    .btn-explore {
        width: 100%;
    }
    
    .location-input-wrapper {
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .search-input,
    .location-select {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .btn-explore {
        padding: 16px 20px;
        justify-content: center;
        font-size: 15px;
    }
    
    /* Blog Posts Section */
    .blog-posts-section {
        padding: 40px 0;
    }
    
    .blog-posts-section .container {
        padding: 0 16px;
    }
    
    /* Blog Cards */
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 20px;
    }
    
    .blog-card-excerpt {
        font-size: 14px;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    /* Load More Button */
    .btn-load-more {
        width: 100%;
        padding: 16px 40px;
        font-size: 15px;
    }
    
    .load-more-container {
        padding: 0 16px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .blog-hero-section {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .hero-content {
        padding: 32px 12px;
    }
    
    .search-input,
    .location-select,
    .btn-explore {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .blog-card-content {
        padding: 16px;
    }
    
    .blog-card-image {
        height: 180px;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .blog-hero-section {
        min-height: 350px;
    }
    
    .hero-content {
        padding: 30px 16px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .blog-card:hover {
        transform: none;
    }
    
    .blog-card:hover .blog-card-image img {
        transform: none;
    }
    
    .btn-explore,
    .btn-load-more,
    .blog-card-link {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .blog-card:active {
        transform: scale(0.98);
    }
    
    .btn-explore:active,
    .btn-load-more:active {
        opacity: 0.9;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .blog-hero-section {
        background-size: cover;
        image-rendering: -webkit-optimize-contrast;
    }
}
