/* Blog Page Specific Styles */

/* Blog Hero Section - Consistent with Dive Map and Gallery */
.blog-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: var(--gradient-ocean);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin: 0;
    padding: 100px 0 10px 0; /* Reduced bottom padding from 40px to 10px */
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 V120 H0 Z" fill="rgba(255,255,255,0.05)"/></svg>') bottom center/cover no-repeat;
    opacity: 0.3;
}

.blog-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 138, 0.2);
    backdrop-filter: blur(1px);
}

.blog-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--spacing-md);
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-hero p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .blog-hero {
        min-height: 300px;
        padding: 80px 0 10px 0; /* Reduced bottom padding from 30px to 10px */
    }
    
    .blog-hero h1 {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }
    
    .blog-hero p {
        font-size: var(--font-size-base);
    }
}

/* ================================================
   BLOG SEARCH AND FILTER CONTROLS
   ================================================ */

.blog-controls {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
    box-shadow: 0 4px 20px var(--shadow);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.search-section {
    display: flex;
    justify-content: center;
}

.search-box {
    display: flex;
    max-width: 500px;
    width: 100%;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
}

.search-input {
    flex: 1;
    padding: var(--spacing-lg);
    border: none;
    font-size: var(--font-size-base);
    font-family: var(--font-family-primary);
    outline: none;
    background: transparent;
}

.search-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: var(--spacing-lg) var(--spacing-xl);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: var(--font-size-lg);
}

.search-btn:hover {
    background: var(--deep-blue);
}

.filter-section h3 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-xl);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--medium-gray);
    color: var(--text-color);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.sort-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.sort-section label {
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
}

.sort-select {
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-md);
    background: var(--white);
    color: var(--text-color);
    font-family: var(--font-family-primary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
}

@media (max-width: 768px) {
    .blog-controls {
        padding: var(--spacing-lg);
        gap: var(--spacing-lg);
    }
    
    .category-filters {
        justify-content: flex-start;
    }
    
    .filter-btn {
        font-size: var(--font-size-xs);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .sort-section {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .sort-select {
        width: 100%;
    }
}

.blog-section {
    padding: 20px 0; /* Reduced from 80px 0 to 20px 0 */
    background: var(--light-gray);
    margin-top: 0; /* Removed 70px margin-top */
}

.blog-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-post {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.blog-post.featured {
    border: 3px solid var(--secondary-color);
    transform: scale(1.02);
}

.blog-post.featured:hover {
    transform: scale(1.02) translateY(-5px);
}

.post-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.blog-post.featured .post-image {
    height: 300px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-content {
    padding: 2rem;
}

.blog-post.featured .post-content {
    padding: 2.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-date {
    position: relative;
}

.post-date::after {
    content: '•';
    margin-left: 1rem;
    color: var(--secondary-color);
}

.post-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.blog-post.featured .post-content h2 {
    font-size: 1.8rem;
}

.post-content p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: var(--secondary-color);
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 15px var(--shadow);
}

.sidebar-widget h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.3rem;
}

/* Search Form */
.search-form {
    display: flex;
    border: 2px solid #e1e8ed;
    border-radius: 50px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.search-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: var(--secondary-color);
}

/* Categories */
.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid #e1e8ed;
    padding: 0.8rem 0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list span {
    background: var(--light-blue);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-post {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e8ed;
}

.recent-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recent-content h4 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-weight: 600;
}

.recent-date {
    font-size: 0.8rem;
    color: #666;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: var(--white);
}

.newsletter-widget h3 {
    color: var(--white) !important;
}

.newsletter-widget p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 1rem;
    border: none;
    border-radius: 50px;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.newsletter-form button {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Social Follow */
.social-follow {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateX(5px);
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn.patreon {
    background: #f96854;
}

.social-btn.youtube {
    background: #ff0000;
}

.social-btn i {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

/* Load More Section */
.load-more-section {
    padding: 3rem 0;
    text-align: center;
    background: var(--light-gray);
}

#load-more-posts {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-post.featured {
        transform: none;
    }
    
    .blog-post.featured:hover {
        transform: translateY(-5px);
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .blog-post.featured .post-content {
        padding: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-date::after {
        display: none;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .recent-post {
        flex-direction: column;
    }
    
    .recent-post img {
        width: 100%;
        height: 120px;
    }
    
    .search-form {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-form input,
    .search-form button {
        border-radius: 0;
    }
    
    .search-form input {
        border-radius: 15px 15px 0 0;
    }
    
    .search-form button {
        border-radius: 0 0 15px 15px;
    }
}

@media (max-width: 480px) {
    .post-image {
        height: 200px;
    }
    
    .blog-post.featured .post-image {
        height: 250px;
    }
    
    .blog-post.featured .post-content h2 {
        font-size: 1.5rem;
    }
    
    .sidebar-widget {
        padding: 1rem;
    }
    
    .social-btn {
        justify-content: center;
    }
}

/* Blog Functionality Enhancements */

/* Active category styling */
.category-list a.active {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

/* Blog post animations */
.blog-post {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.blog-post.animate-in {
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search functionality styling */
.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-form button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Quick links hover effects */
.link-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.link-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--shadow);
}

/* Newsletter form enhancements */
.newsletter-form {
    position: relative;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.newsletter-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Social button hover effects */
.social-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.social-btn:hover::before {
    left: 100%;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-color);
    z-index: 1000;
    transition: width 0.3s ease;
}

/* Filter transition effects */
.blog-post[style*="opacity: 0"] {
    pointer-events: none;
}

/* Enhanced post meta styling */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-meta i {
    color: var(--primary-color);
}

/* Tag styling enhancements */
.post-tags {
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background: var(--light-gray);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

/* Load more button styling */
#load-more-posts {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2rem auto;
    display: block;
}

#load-more-posts:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#load-more-posts:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced sidebar widgets */
.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px var(--shadow);
}

/* Success states */
.success {
    background: #27ae60 !important;
    color: white !important;
}

.success:hover {
    background: #229954 !important;
}
