/* ============================================================
   index4.css
   Tiered tile layout for index4.html.
   Layered ON TOP of styles.css - only overrides size/structure
   for hero and archive variants, plus section dividers.
   ============================================================ */


/* ===== HERO SECTION (carousel of giant tiles) ===== */

.hero-section {
    margin-bottom: 30px;
    position: relative;
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 460px;
    overflow: hidden;
    border-radius: 10px;
}

.hero-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    will-change: transform;
}

.hero-section .hero-track .hero-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

/* Side navigation buttons */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 64px;
    background-color: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.hero-nav:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.hero-nav-prev {
    left: 12px;
}

.hero-nav-next {
    right: 12px;
}

/* CSS-drawn arrow triangles */
.hero-nav::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.hero-nav-prev::after {
    border-right: 14px solid #fff;
    margin-right: 4px;
}

.hero-nav-next::after {
    border-left: 14px solid #fff;
    margin-left: 4px;
}

/* Dot indicators below the carousel */
.hero-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #444;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-dot:hover {
    background-color: #777;
}

.hero-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.hero-section .blog-tile {
    height: 460px;
}

.hero-section .blog-tile .content {
    display: grid;
    grid-template-columns: 60% 1fr;
    grid-template-rows: auto 1fr;
    gap: 0 30px;
    padding: 25px;
    padding-bottom: 50px;
}

.hero-section .blog-tile img {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.hero-section .blog-tile h2 {
    grid-column: 2;
    grid-row: 1;
    font-size: 2.2rem;
    margin-bottom: 15px;
    align-self: end;
}

.hero-section .blog-tile p {
    grid-column: 2;
    grid-row: 2;
    font-size: 1.1rem;
    line-height: 1.5;
    -webkit-line-clamp: 8;
}

.hero-section .blog-tile .date {
    font-size: 1rem;
    top: 15px;
    right: 20px;
}

.hero-section .category-footer {
    font-size: 0.9rem;
    padding: 12px;
}


/* ===== SECTION DIVIDERS ===== */

.section-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 40px 0 25px;
}

.section-divider .divider-line {
    flex: 1;
    height: 1px;
    background-color: #333;
}

.section-divider .divider-label {
    color: #888;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

.section-divider .divider-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    opacity: 0.7;
    object-fit: cover;
}


/* ===== ARCHIVE GRID (half-size tiles) ===== */

.archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.archive-grid .blog-tile {
    height: 220px;
}

.archive-grid .blog-tile .content {
    padding: 10px;
}

.archive-grid .blog-tile img {
    height: 90px;
    margin-bottom: 8px;
    border-radius: 3px;
}

.archive-grid .blog-tile h2 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.2;
}

.archive-grid .blog-tile p {
    font-size: 0.75rem;
    line-height: 1.35;
    -webkit-line-clamp: 3;
}

.archive-grid .blog-tile .date {
    font-size: 0.65rem;
    top: 6px;
    right: 8px;
}

.archive-grid .category-footer {
    padding: 4px 8px;
    font-size: 0.55rem;
    letter-spacing: 0.5px;
}

/* YouTube tiles inside archive grid */
.archive-grid .youtube-tile .youtube-thumbnail {
    margin-bottom: 8px;
}

.archive-grid .youtube-tile .youtube-thumbnail img {
    height: 90px;
}

.archive-grid .play-button {
    width: 36px;
    height: 24px;
    border-radius: 6px;
}

.archive-grid .play-button::after {
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #fff;
    margin-left: 3px;
}


/* ===== MAIN + SIDEBAR LAYOUT ===== */

.main-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    align-items: start;
    margin-bottom: 50px;
}

.main-with-sidebar > .blog-grid {
    margin-bottom: 0;
}


/* ===== YOUTUBE SIDEBAR ===== */

.youtube-sidebar {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 15px;
    position: sticky;
    top: 20px;
}

.youtube-sidebar h3 {
    color: #ffffff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.youtube-sidebar .youtube-status {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.youtube-sidebar .youtube-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.youtube-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    overflow: hidden;
    background-color: #2a2a2a;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.youtube-item:hover {
    transform: translateY(-2px);
    background-color: #333;
}

.youtube-item-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.youtube-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.youtube-item-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.9;
}

.youtube-item-play::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
    margin-left: 3px;
}

.youtube-item-title {
    padding: 8px 10px 2px;
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.youtube-item-date {
    padding: 0 10px 8px;
    font-size: 0.7rem;
    color: #888;
}


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

@media (max-width: 900px) {
    /* Sidebar stacks below the main grid on narrower screens */
    .main-with-sidebar {
        grid-template-columns: 1fr;
    }

    .youtube-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    /* Hero stacks vertically on mobile */
    .hero-carousel {
        height: auto;
        min-height: 500px;
    }

    .hero-section .blog-tile {
        height: auto;
        min-height: 500px;
    }

    .hero-nav {
        width: 36px;
        height: 48px;
    }

    .hero-section .blog-tile .content {
        display: flex;
        flex-direction: column;
        padding: 15px;
        padding-bottom: 50px;
    }

    .hero-section .blog-tile img {
        height: 220px;
        margin-bottom: 15px;
    }

    .hero-section .blog-tile h2 {
        font-size: 1.6rem;
    }

    .hero-section .blog-tile p {
        font-size: 1rem;
        -webkit-line-clamp: 5;
    }

    /* Keep archive tiles small even on mobile (don't let styles.css blow them up to 50vh) */
    .archive-grid .blog-tile {
        height: 240px;
    }

    .archive-grid .blog-tile img {
        height: 90px;
    }

    .archive-grid .blog-tile h2 {
        font-size: 1rem;
    }

    .archive-grid .blog-tile p {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
    }

    .archive-grid .category-footer {
        font-size: 0.6rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
