/* ========================================
   Front Page Template Styles
   Based on blog-static.html design
======================================== */

/* ========================================
   HERO SECTION STYLES
======================================== */

.hero.is-medium.is-bold {
    position: relative;
    overflow: hidden;
}

.hero.is-medium.is-bold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-body {
    position: relative;
    z-index: 2;
    padding-top: 1.5rem !important;
    background-color: rgba(0, 0, 0, 0) !important;
    min-height: 35rem !important;
    padding-bottom: 1.5rem !important;
}

.hero-body .container h1,
.hero-body .container h2 {
    color: #fff !important;
}

/* ========================================
   BREADCRUMB STYLES
======================================== */

.breadcrumb {
    margin-top: 10px;
}

.breadcrumb ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '';
    margin: 0 0.5rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.card {
    border-color: transparent !important;
    cursor: pointer !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: auto;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 0.5rem;
    min-height: 0;
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* Bulma CSS Overrides for Cards */
.card .card-content {
    padding: 0.75rem !important;
}

.card .card-image {
    margin: 0 !important;
}

.card .card-image figure {
    margin: 0 !important;
}

.card .card-image figure img {
    margin: 0 !important;
}

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

.blog-card {
    height: 320px; /* Fixed height for consistent card sizes */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.blog-card .card {
    height: 400px; /* Fixed height for consistent card sizes */
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.blog-card .card:hover {
    border-color: #e0e0e0;
}

.blog-card .card-image {
    flex-shrink: 0; /* Prevent image from shrinking */
    height: 200px; /* Fixed image height */
}

.blog-card .card-content {
    flex: 1; /* Take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    background: #ffffff;
}

.blog-card .title {
    background-color: transparent;
    border: none;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0;
    line-height: 1.4;
    font-size: 1.1rem;
    /* Title truncation for consistent height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em; /* 2 lines * 1.4 line-height */
    max-height: 2.8em;
}

.blog-card .title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.blog-card .title a:hover {
    color: #118cf6;
}

.blog-card small {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    flex-shrink: 0; /* Prevent date from shrinking */
}

.blog-card .card-content small {
    margin-bottom: 0.5rem;
    display: block;
    color: #666;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.blog-card .card-content .title.is-5 {
    margin-top: 0.25rem;
    margin-bottom: 0;
    line-height: 1.3;
}

.blog-card .card-content .title.is-5 a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card .card-content .title.is-5 a:hover {
    color: #118cf6;
}

/* Image aspect ratio improvements */
.card-image figure.image.is-4by3 {
    margin: 0;
    height: 200px;
    overflow: hidden;
}

.card-image figure.image.is-4by3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

/* ========================================
   BLOG GRID LAYOUT
======================================== */

.columns.is-multiline {
    margin: 0 -0.75rem;
}

.columns.is-multiline .column {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
}

.columns.is-multiline .column:last-child {
    margin-bottom: 0;
}

/* ========================================
   BUTTON STYLES
======================================== */

.button.is-light.is-outlined {
    border-color: #ffffff;
    color: #ffffff;
    background-color: transparent;
    transition: all 0.3s ease;
}

.button.is-light.is-outlined:hover {
    background-color: #ffffff;
    color: #333333;
}

/* ========================================
   PAGINATION STYLES
======================================== */

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-next {
    background-color: #118cf6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.pagination-next:hover {
    background-color: #0d6fca;
    color: white;
}

/* ========================================
   SECTION STYLES
======================================== */

.section {
    padding: 3rem 1.5rem;
}

.section .title.is-4 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.section .title.is-4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #118cf6, #0d6fca);
    border-radius: 2px;
}

/* ========================================
   IMAGE STYLES
======================================== */

.image.is-4by3 {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   UTILITY CLASSES
======================================== */

.category-banner {
    background-color: red;
    color: white;
    padding: 20px 10px;
    text-align: center;
}

.custom-position {
    align-content: flex-end;
    padding-bottom: 7% !important;
}

.custom-width-desktop {
    width: 100%;
    margin: 0;
    margin-top: 10%;
}

.custom-width-desktop2 {
    width: 100%;
}

.clickable {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.clickable:hover {
    opacity: 0.8;
}

/* Override any Bulma default margins */
.title.is-5 {
    margin: 0 !important;
    padding: 0 !important;
}

.title.is-5 a {
    margin: 0 !important;
    padding: 0 !important;
}

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

@media screen and (min-width: 1024px) {
    .custom-width-desktop {
        width: 43% !important;
        margin-left: 0 !important;
        margin-top: 10% !important;
    }

    .custom-width-desktop2 {
        width: 50% !important;
    }
}

@media screen and (max-width: 768px) {
    .hero-body {
        min-height: 25rem !important;
    }
    
    .custom-width-desktop,
    .custom-width-desktop2 {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .columns.is-multiline .column {
        margin-bottom: 1rem;
    }
    
    .card-content {
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .blog-card .title {
        font-size: 1rem;
    }
    
    /* Adjust card height for mobile */
    .blog-card {
        height: 350px;
    }
    
    .blog-card .card {
        height: 350px;
    }
    
    .blog-card .card-image {
        height: 250px;
    }
}

@media screen and (max-width: 480px) {
    .card-content {
        padding: 0.5rem;
    }
    
    .section {
        padding: 2rem 1rem;
    }
    
    /* Further adjust card height for small mobile */
    .blog-card {
        height: 320px;
    }
    
    .blog-card .card {
        height: 320px;
    }
    
    .blog-card .card-image {
        height: 120px;
    }
    
    .blog-card .title {
        font-size: 0.95rem;
        -webkit-line-clamp: 1;
        min-height: 2.6em;
        max-height: 2.6em;
    }
}
