/* ============================================================
   Home page — light theme layout
   The site-wide light theme lives in techgrid.css / layout.css;
   this file holds the home page's own structure (hero, carousels,
   discover list). Home-only card tweaks stay scoped to .tg-shell--home.
   ============================================================ */

/* ============================================================
   Page shell
   ============================================================ */
.home {
    padding-bottom: 1rem;
}

.home-container {
    max-width: 84rem;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1024px) {
    .home-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.home .hx-inline-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.home .material-symbols-outlined {
    font-size: 1rem;
    vertical-align: middle;
}

/* ============================================================
   Hero
   ============================================================ */
.hx-hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.hx-hero__grid {
    display: grid;
    gap: 1.5rem;
}

.hx-feature {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--tg-border);
    background-color: var(--tg-bg-elev);
    border-radius: 1rem;
}

.hx-feature__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.hx-feature__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.hx-feature__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hx-feature:hover .hx-feature__image {
    transform: scale(1.05);
}

.hx-feature__cat {
    position: absolute;
    left: 1rem;
    top: 1rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--tg-primary);
    border-radius: 9999px;
}

.hx-feature__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
}

.hx-feature__title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--tg-text);
}

.hx-feature__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    line-height: 1.6;
    color: var(--tg-text-muted);
}

.hx-feature__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--tg-text-muted);
}

.hx-feature__author {
    font-weight: 500;
    color: var(--tg-text);
}

/* Side "Öne Çıkanlar" */
.hx-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.hx-side__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tg-text-muted);
}

.hx-side__bar {
    width: 0.25rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: var(--tg-primary);
}

.hx-side__list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.6rem;
}

.hx-story {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    border: 1px solid var(--tg-border);
    background-color: var(--tg-bg-elev);
    border-radius: 0.75rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.hx-story:hover {
    border-color: rgba(37, 99, 235, 0.4);
}

.hx-story__media {
    flex-shrink: 0;
    align-self: stretch;
    width: 6.5rem;
    overflow: hidden;
    border-radius: 0.5rem;
}

.hx-story__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hx-story:hover .hx-story__image {
    transform: scale(1.05);
}

.hx-story__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
}

.hx-story__cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tg-primary);
}

.hx-story__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tg-text);
}

.hx-story__meta {
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--tg-text-muted);
}

/* ============================================================
   Latest section (Son Haberler)
   ============================================================ */
.hx-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.hx-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hx-section__heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hx-section__title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--tg-text);
}

.hx-section__sub {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--tg-text-muted);
}

.hx-section__all {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tg-primary);
    text-decoration: none;
}

.hx-section__all:hover {
    text-decoration: underline;
}

.hx-section__tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* ---------- Horizontal carousel ---------- */
.hx-carousel__nav {
    display: flex;
    gap: 0.4rem;
}

.hx-carousel__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--tg-text-muted);
    background-color: var(--tg-bg-elev);
    border: 1px solid var(--tg-border);
    border-radius: 9999px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.hx-carousel__btn:hover {
    color: var(--tg-primary);
    border-color: rgba(37, 99, 235, 0.4);
    background-color: var(--tg-bg-elev-2);
}

.hx-carousel__row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--tg-border) transparent;
}

.hx-carousel__row > * {
    flex: 0 0 auto;
    width: 15rem;
    scroll-snap-align: start;
}

.hx-carousel__row::-webkit-scrollbar {
    height: 6px;
}

.hx-carousel__row::-webkit-scrollbar-thumb {
    background-color: var(--tg-border);
    border-radius: 9999px;
}

@media (min-width: 768px) {
    .hx-carousel__row > * {
        width: 17rem;
    }
}

/* ============================================================
   Guides & Solutions
   ============================================================ */
.hx-guides {
    border-top: 1px solid var(--tg-border);
    border-bottom: 1px solid var(--tg-border);
    background-color: #f2f4f8;
}

.hx-guides__inner {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.hx-guides__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hx-guides__nav {
    margin-left: auto;
}

.hx-guides__icon,
.hx-section__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--tg-primary);
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 0.75rem;
}

.hx-guides__icon .material-symbols-outlined,
.hx-section__icon .material-symbols-outlined {
    font-size: 1.25rem;
}

.hx-guides__title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tg-text);
}

.hx-guides__sub {
    margin: 0.15rem 0 0;
    font-size: 0.875rem;
    color: var(--tg-text-muted);
}

.hx-guide {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--tg-border);
    background-color: var(--tg-bg-elev);
    border-radius: 1rem;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hx-guide:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.15);
}

.hx-guide__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.hx-guide__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hx-guide:hover .hx-guide__image {
    transform: scale(1.05);
}

.hx-guide__badge {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--tg-primary);
    border-radius: 9999px;
}

.hx-guide__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
}

.hx-guide__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tg-text);
}

.hx-guide__arrow {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--tg-text-muted);
    transition: color 0.2s ease;
}

.hx-guide:hover .hx-guide__arrow {
    color: var(--tg-primary);
}

.hx-guide__desc {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--tg-text-muted);
}

/* ============================================================
   Discover (Keşfet)
   ============================================================ */
.hx-discover {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.hx-discover__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.hx-discover__sticky {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hx-discover__text {
    margin: 0;
    line-height: 1.6;
    color: var(--tg-text-muted);
}

.hx-discover__img {
    margin-top: 0.25rem;
    overflow: hidden;
    border: 1px solid var(--tg-border);
    border-radius: 1rem;
}

.hx-discover__img img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hx-discover__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tg-accent-fg);
    background-color: var(--tg-accent);
    border-radius: 9999px;
}

.hx-discover__heading {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--tg-text);
}

.hx-discover__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hx-discover__list li {
    list-style: none;
}

.hx-rank {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--tg-border);
    background-color: var(--tg-bg-elev);
    border-radius: 0.75rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.hx-rank:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background-color: #f3f5f9;
}

.hx-rank__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(37, 99, 235, 0.3);
    transition: color 0.2s ease;
}

.hx-rank:hover .hx-rank__num {
    color: var(--tg-primary);
}

.hx-rank__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.hx-rank__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tg-text);
}

.hx-rank__meta {
    font-size: 0.875rem;
    color: var(--tg-text-muted);
}

.hx-rank__arrow {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--tg-text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.hx-rank:hover .hx-rank__arrow {
    transform: translateX(0.25rem);
    color: var(--tg-primary);
}

/* ============================================================
   Skeletons + empty
   ============================================================ */
.hx-skeleton {
    background-color: var(--tg-bg-elev-2);
    border-radius: 0.75rem;
    animation: tg-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hx-skeleton--hero {
    height: 460px;
    border-radius: 1rem;
}

.hx-skeleton--card {
    aspect-ratio: 16 / 12;
}

.hx-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--tg-text-muted);
    background-color: var(--tg-bg-elev);
    border: 1px dashed var(--tg-border);
    border-radius: 0.75rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 768px) {
    .hx-hero,
    .hx-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hx-feature__media {
        aspect-ratio: 11 / 5;
    }

    .hx-feature__title {
        font-size: 1.75rem;
    }

    .hx-guides__inner,
    .hx-discover {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

@media (min-width: 1024px) {
    .hx-hero__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hx-feature {
        grid-column: span 2 / span 2;
        min-height: 40rem;
    }

    .hx-discover__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .hx-discover__intro {
        grid-column: span 2 / span 2;
    }

    .hx-discover__sticky {
        position: sticky;
        top: 6rem;
    }

    .hx-discover__list {
        grid-column: span 3 / span 3;
    }
}
