/**
 * GI Blog Section Block Styles
 * 
 * Custom styles for the blog section block
 * Maintains visual consistency with front-page implementation
 */

/* ===================================
   SECTION CONTAINER
   =================================== */

.gi-blog-section {
    position: relative;
}

/* ===================================
   BLOG CARD STYLES
   =================================== */

.gi-blog-item {
    width: 100%;
}

.blog-info {
    position: relative;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-info:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Blog Image */
.blog-img {
    position: relative;
    overflow: hidden;
}

.blog-img img {
    transition: all 0.3s ease-in-out;
    display: block;
    width: 100%;
    height: auto;
}

.blog-info:hover .blog-img img {
    transform: rotate(-3deg) scale(1.1);
}

/* Blog Detail */
.blog-info .detail {
    padding: 20px;
}

.blog-info .detail label {
    transition: all 0.3s ease-in-out;
    display: block;
    margin-bottom: 5px;
}

.blog-info .detail label a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-info .detail label a:hover {
    color: #8e0000;
}

.blog-info .detail h3 {
    transition: all 0.3s ease;
}

.blog-info .detail h3 a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-info .detail h3 a:hover {
    color: #8e0000;
}

/* Read More Link */
.blog-info .detail .more-info a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-info .detail .more-info a:hover {
    color: #8e0000;
}

.blog-info .detail .more-info a:hover i {
    color: #8e0000;
    transform: translateX(3px);
}

.blog-info .detail .more-info a i {
    transition: all 0.3s ease-in-out;
}

/* ===================================
   OWL CAROUSEL CUSTOMIZATION
   =================================== */

.gi-blog-carousel.owl-carousel {
    width: 100%;
}

.gi-blog-carousel .owl-stage-outer {
    overflow: hidden;
}

.gi-blog-carousel .owl-item {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Owl Navigation */
.gi-blog-carousel .owl-nav {
    position: absolute;
    top: -60px;
    right: 12px;
    display: flex;
    gap: 10px;
}

.gi-blog-carousel .owl-nav button {
    width: 35px;
    height: 35px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 3px;
    color: #4b5966;
    font-size: 18px;
    line-height: 35px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gi-blog-carousel .owl-nav button:hover {
    background: #aa1c1c;
    border-color: #8e0000;
    color: #fff;
}

.gi-blog-carousel .owl-nav button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gi-blog-carousel .owl-nav button span {
    font-size: 0;
}

.gi-blog-carousel .owl-nav button::before {
    font-family: 'dashicons';
    font-size: 20px;
    display: block;
}

.gi-blog-carousel .owl-nav .owl-prev::before {
    content: '\f341'; /* dashicons-arrow-left-alt2 */
}

.gi-blog-carousel .owl-nav .owl-next::before {
    content: '\f345'; /* dashicons-arrow-right-alt2 */
}

/* Owl Dots */
.gi-blog-carousel .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.gi-blog-carousel .owl-dots .owl-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gi-blog-carousel .owl-dots .owl-dot.active,
.gi-blog-carousel .owl-dots .owl-dot:hover {
    background: #aa1c1c;
    transform: scale(1.2);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 991px) {
    .gi-blog-section .gi-title {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .gi-blog-section .gi-title {
        font-size: 22px;
    }
    
    .blog-info .detail {
        padding: 15px;
    }
}

@media (max-width: 575px) {
    .gi-blog-section .gi-title {
        font-size: 20px;
    }
    
    .section-title {
        flex-direction: column;
    }
    
    .title-link {
        margin-top: 15px;
        font-size: 14px;
    }
}

/* ===================================
   GRID LAYOUT (when not carousel)
   =================================== */

.gi-blog-section .gi-blog-grid {
    display: grid;
    gap: 24px;
}

.gi-blog-section .gi-blog-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gi-blog-section .gi-blog-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gi-blog-section .gi-blog-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991px) {
    .gi-blog-section .gi-blog-grid.cols-3,
    .gi-blog-section .gi-blog-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .gi-blog-section .gi-blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

.blog-info a:focus {
    outline: 2px solid #aa1c1c;
    outline-offset: 2px;
}

.gi-blog-carousel .owl-nav button:focus {
    outline: 2px solid #aa1c1c;
    outline-offset: 2px;
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */

.gi-blog-section.bg-\[\#4b5966\] .blog-info {
    background: rgba(255, 255, 255, 0.95);
}

.gi-blog-section.bg-\[\#4b5966\] .detail h3 a,
.gi-blog-section.bg-\[\#4b5966\] .detail label,
.gi-blog-section.bg-\[\#4b5966\] .detail p {
    color: #4b5966;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .gi-blog-section {
        page-break-inside: avoid;
    }
    
    .owl-nav,
    .owl-dots {
        display: none !important;
    }
    
    .blog-info {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .gi-blog-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ===================================
   BLOCK PREVIEW LABEL
   =================================== */

.gi-block-preview-label {
    display: inline-block;
    margin-bottom: 10px;
}

