/* Homepage Typography Reset — Open Sans throughout */
.hp-section-title, .hp-featured-title,
.hp-small-news-content h4, .hp-list-content h4,
.hp-overlay-content h3, .hp-featured-card h3,
.hp-science-card h3 {
    font-family: 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/*
 * TTO Theme - Homepage Styles
 * Front Page Layout
 */

/* ====================================
   HOMEPAGE BASE
   ==================================== */
.homepage {
    padding: 30px 0 50px;
}


/* Section Headers */

.hp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    white-space: nowrap;
}

.hp-section-title a {
    color: var(--black);
}

.hp-section-title a:hover {
    color: var(--primary);
}

.hp-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #ddd,
        #ddd 2px,
        transparent 2px,
        transparent 6px
    );
}

.hp-section-header-with-tabs {
    flex-wrap: wrap;
}

.hp-tabs {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.hp-tabs a {
    font-size: 13px;
    color: var(--gray);
    transition: color 0.3s ease;
}

.hp-tabs a:hover {
    color: var(--primary);
}

.hp-tabs a i {
    font-size: 10px;
    margin-left: 3px;
}

/* Category Badge */
.hp-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Meta Info */
.hp-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gray);
}

.hp-author {
    color: var(--black);
    font-weight: 500;
}

.hp-dot {
    color: var(--gray);
}

.hp-date {
    color: var(--gray);
    font-size: 12px;
}

.hp-excerpt {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* ====================================
   HERO SECTION (Section 1)
   ==================================== */

/* Featured Large Post */
.hp-featured-large {
    margin-bottom: 25px;
}


/* Small News Grid */
.hp-small-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 25px;
}

.hp-small-news-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.hp-small-news-content {
    flex: 1;
    min-width: 0;
}

.hp-small-news-content h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-small-news-content h4 a {
    color: var(--black);
}

.hp-small-news-content h4 a:hover {
    color: var(--primary);
}

.hp-small-news-thumb {
    width: 85px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
}

.hp-small-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* List Items */
.hp-list-items {
    display: flex;
    flex-direction: column;
}

.hp-list-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.hp-list-item:first-child {
    padding-top: 0;
}

.hp-list-item:last-child {
    border-bottom: none;
}

.hp-list-thumb {
    width: 80px;
    height: 55px;
    flex-shrink: 0;
    overflow: hidden;
}

.hp-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hp-list-content {
    flex: 1;
    min-width: 0;
}

.hp-list-content h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-list-content h4 a {
    color: var(--black);
}

.hp-list-content h4 a:hover {
    color: var(--primary);
}

/* Overlay Cards */
.hp-overlay-card {
    position: relative;
    overflow: hidden;
}

.hp-overlay-link {
    display: block;
    position: relative;
    height: 100%;
}

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

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

.hp-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    color: var(--white);
}

.hp-overlay-content .hp-cat-badge {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
}

.hp-overlay-content h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--white);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-overlay-content .hp-meta {
    color: rgba(255,255,255,0.8);
}

.hp-overlay-content .hp-author {
    color: var(--white);
}

/* ====================================
   MULTI-COLUMN SECTION (Section 3)
   ==================================== */
.hp-featured-with-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hp-featured-card {
    
}

.hp-featured-card-image {
    display: block;
    position: relative;
    margin-bottom: 12px;
    overflow: hidden;
}

.hp-featured-card-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hp-featured-card-image:hover img {
    transform: scale(1.03);
}

.hp-featured-card h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-featured-card h3 a {
    color: var(--black);
}

.hp-featured-card h3 a:hover {
    color: var(--primary);
}

/* ====================================
   BLOGS SECTION (Section 4)
   ==================================== */
.hp-overlay-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ====================================
   SCIENCE & SPACE SECTION (Section 6)
   ==================================== */
.hp-science-link {
    display: block;
    position: relative;
    margin-bottom: 12px;
    overflow: hidden;
}

.hp-science-link img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hp-science-link:hover img {
    transform: scale(1.03);
}

.hp-science-link .hp-cat-badge {
    top: auto;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}


/* ====================================
   AUTO SECTION (Section 8)
   ==================================== */
.hp-overlay-auto {
    aspect-ratio: 16/10;
}

.hp-overlay-auto .hp-overlay-content {
    padding: 25px;
}

.hp-overlay-auto .hp-overlay-content h3 {
    font-size: 16px;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 1200px) {
    .hp-hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hp-hero-right {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .hp-hero-right .hp-section-header:first-child {
        grid-column: 1;
    }
    
    .hp-science-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hp-hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hp-hero-right {
        grid-column: span 1;
        display: block;
    }
    
    .hp-small-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hp-multi-grid {
        grid-template-columns: 1fr;
    }
    
    .hp-overlay-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hp-tabs {
        display: none;
    }
}

@media (max-width: 768px) {
    .hp-small-news-grid {
        grid-template-columns: 1fr;
    }
    
    .hp-featured-with-list {
        grid-template-columns: 1fr;
    }
    
    .hp-overlay-row {
        grid-template-columns: 1fr;
    }
    
    .hp-science-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hp-featured-title {
        font-size: 17px;
    }
    
    .hp-section-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hp-science-grid {
        grid-template-columns: 1fr;
    }

    /* Section title size */
    .hp-section-title {
        font-size: 14px;
    }

    /* Hero title */
    .hp-featured-title {
        font-size: 15px;
    }
    
    .hp-list-thumb {
        width: 70px;
        height: 50px;
    }
    
    .hp-small-news-thumb {
        width: 70px;
        height: 50px;
    }
}

/* Selected homepage category / child-category navigation */
.tto-subcategory-nav--homepage {
    margin: 0 0 22px;
    padding: 18px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__heading span {
    color: #d71920;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__heading a {
    color: inherit;
    text-decoration: none;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__items a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    background: #fafafa;
}

.tto-subcategory-nav--homepage .tto-subcategory-nav__items small {
    color: #777;
    font-size: 11px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .tto-subcategory-nav--homepage {
        padding: 14px;
    }

    .tto-subcategory-nav--homepage .tto-subcategory-nav__heading {
        display: block;
    }

    .tto-subcategory-nav--homepage .tto-subcategory-nav__heading h2 {
        margin-top: 4px;
        font-size: 19px;
    }
}
