/* Blog Layout Styles */
.blog-layout {
    padding: 4rem 0;
    background: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.blog-main {
    background: transparent;
}

/* Masonry Layout */
.blog-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    grid-auto-rows: masonry;
}

/* Fallback for browsers without masonry support */
@supports not (grid-template-rows: masonry) {
    .blog-masonry {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .blog-card {
        width: calc(50% - 1rem);
        margin-bottom: 2rem;
    }
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    break-inside: avoid;
    page-break-inside: avoid;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.blog-category {
    background: linear-gradient(135deg, #c76c3b 0%, #d4875a 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(199, 108, 59, 0.3);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.blog-card-content h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-content h3 a:hover {
    color: #c76c3b;
}

.blog-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.reading-time,
.blog-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #c76c3b;
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50%;
    height: 2px;
    background: linear-gradient(135deg, #c76c3b 0%, #d4875a 100%);
}

/* Blog Navigation */
.blog-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-navigation li {
    margin-bottom: 0.8rem;
}

.blog-navigation .nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.blog-navigation .nav-item:hover {
    background: #f8f9fa;
    border-left-color: #c76c3b;
    transform: translateX(3px);
    color: #2c3e50;
}

.nav-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Accommodation Widget */
.accommodation-widget img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.accommodation-widget p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #666;
}

.widget-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.widget-features span {
    font-size: 0.8rem;
    color: #555;
    padding: 0.3rem 0;
}

/* Map Widget */
.map-widget p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.attractions-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.attraction-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #555;
}

.attraction-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Tips Widget */
.tips-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-item {
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #c76c3b;
}

.tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.tip-content strong {
    display: block;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.tip-content p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Blog CTA Section */
.blog-cta {
    background: linear-gradient(135deg, #c76c3b 0%, #d4875a 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.blog-cta h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.blog-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-buttons .btn-secondary:hover {
    background: white;
    color: #c76c3b;
}

/* Navigation Active State */
.nav-link.active {
    color: #c76c3b;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
    background: linear-gradient(135deg, #c76c3b 0%, #d4875a 100%);
}

/* Page Header with warm colors */
.page-header {
    background: linear-gradient(135deg, #c76c3b 0%, #d4875a 100%);
    color: white;
    padding: 8rem 0 4rem;
    margin-top: 70px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .blog-masonry {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-layout {
        padding: 3rem 0;
    }
    
    .blog-masonry {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        width: 100%;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-content {
        padding: 1.2rem;
    }
    
    .sidebar-widget {
        margin-bottom: 1.5rem;
        padding: 1.2rem;
    }
    
    .blog-cta h2 {
        font-size: 1.6rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .blog-card-content h3 {
        font-size: 1.1rem;
    }
    
    .blog-excerpt {
        font-size: 0.85rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.3rem;
        font-size: 0.75rem;
    }
    
    .sidebar-widget {
        padding: 1rem;
    }
    
    .sidebar-widget h3 {
        font-size: 1.1rem;
    }
    
    .nav-text {
        font-size: 0.85rem;
    }
    
    .tip-item {
        padding: 0.8rem;
    }
    
    .attraction-item {
        font-size: 0.8rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* Smooth scrolling for sidebar */
.blog-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #c76c3b #f1f1f1;
}

.blog-sidebar::-webkit-scrollbar {
    width: 6px;
}

.blog-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.blog-sidebar::-webkit-scrollbar-thumb {
    background: #c76c3b;
    border-radius: 3px;
}

.blog-sidebar::-webkit-scrollbar-thumb:hover {
    background: #b25d32;
}

/* Print Styles */
@media print {
    .blog-sidebar,
    .blog-cta {
        display: none;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-masonry {
        display: block;
    }
    
    .blog-card {
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .blog-card-image {
        height: 150px;
    }
}

/* Focus and Accessibility */
.blog-navigation .nav-item:focus,
.blog-card:focus {
    outline: 2px solid #c76c3b;
    outline-offset: 2px;
}

.blog-card-content h3 a:focus {
    outline: 2px solid #c76c3b;
    outline-offset: 2px;
    text-decoration: underline;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .blog-card {
        border: 2px solid #333;
    }
    
    .blog-category {
        background: #000;
        color: #fff;
    }
    
    .sidebar-widget {
        border: 2px solid #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-navigation .nav-item,
    .blog-card-image img {
        transition: none;
        animation: none;
    }
    
    .blog-card:hover {
        transform: none;
    }
}
