/* ==========================================================================
   CATEGORY TOURISME-LOCALE - Le Kasseria
   Cuisine du Monde - Design Magazine Premium 2026
   Couleurs : #7f1d1d (rouge profond) | #fed7aa (peche douce) | #fde047 (jaune soleil)
   ========================================================================== */

/* BASE & RESET */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

img, video, iframe, svg, canvas {
    max-width: 100%;
    height: auto;
}

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

.cat-hero {
    display: flex;
    align-items: center;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 32px 48px;
}

.cat-hero__inner {
    flex: 1 1 0;
    min-width: 0;
}

.cat-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fed7aa;
    color: #7f1d1d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.cat-hero__label svg {
    flex-shrink: 0;
}

.cat-hero__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: #1a0a0a;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

.cat-hero__subtitle {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #5a3030;
    margin: 0 0 32px;
    max-width: 520px;
    overflow-wrap: break-word;
}

.cat-hero__stats {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    row-gap: 12px;
}

.cat-hero__stat {
    display: flex;
    flex-direction: column;
    padding: 0 24px 0 0;
}

.cat-hero__stat:first-child {
    padding-left: 0;
}

.cat-hero__stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #7f1d1d;
    line-height: 1;
}

.cat-hero__stat-label {
    font-size: 0.75rem;
    color: #8a5c5c;
    margin-top: 4px;
    font-weight: 500;
}

.cat-hero__stat-sep {
    width: 1px;
    height: 40px;
    background-color: #e8d0c8;
    margin: 0 24px 0 0;
    flex-shrink: 0;
}

.cat-hero__visual {
    flex: 0 0 auto;
    width: 420px;
    max-width: 45%;
}

.cat-hero__visual img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   DISCLAIMER
   ========================================================================== */

.cat-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 1200px;
    margin: 0 32px 48px;
    padding: 14px 20px;
    background-color: #fff8f0;
    border-left: 4px solid #fde047;
    border-radius: 0 8px 8px 0;
}

.cat-disclaimer svg {
    flex-shrink: 0;
    color: #92400e;
    margin-top: 2px;
}

.cat-disclaimer p {
    margin: 0;
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.55;
    overflow-wrap: break-word;
}

/* ==========================================================================
   ARTICLES SECTION
   ========================================================================== */

.cat-articles {
    max-width: 1200px;
    margin: 0 auto 64px;
    padding: 0 32px;
}

.cat-articles__header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3e8e0;
}

.cat-articles__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a0a0a;
    margin: 0;
}

.cat-articles__count {
    font-size: 0.82rem;
    background-color: #7f1d1d;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* ==========================================================================
   CARDS GRID - MAGAZINE ASYMETRIQUE
   ========================================================================== */

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* Premiere card en featured (large) */
.cat-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #f0e0d6;
}

.cat-card--featured .cat-card__img-wrap {
    aspect-ratio: auto;
    height: 100%;
    min-height: 300px;
}

.cat-card--featured .cat-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.cat-card--featured .cat-card__body {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cat-card--featured .cat-card__title {
    font-size: 1.55rem;
    line-height: 1.25;
}

/* Cards standard */
.cat-card {
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f0e0d6;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-card:hover,
.cat-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(127, 29, 29, 0.12);
}

.cat-card__img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f5ece7;
}

.cat-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.cat-card:hover .cat-card__img-wrap img {
    transform: scale(1.04);
}

.cat-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #7f1d1d;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 10px;
}

.cat-card__body {
    padding: 22px 24px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a07070;
    font-size: 0.78rem;
}

.cat-card__meta svg {
    flex-shrink: 0;
}

.cat-card__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1a0a0a;
    margin: 0;
    overflow-wrap: break-word;
}

.cat-card__title a {
    color: inherit;
    text-decoration: none;
}

.cat-card__title a:hover,
.cat-card__title a:focus {
    color: #7f1d1d;
    text-decoration: underline;
    outline: 2px solid #7f1d1d;
    outline-offset: 2px;
    border-radius: 2px;
}

.cat-card__desc {
    font-size: 0.88rem;
    color: #6b4040;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}

/* ==========================================================================
   ETAT VIDE
   ========================================================================== */

.cat-empty {
    text-align: center;
    padding: 64px 24px;
    background-color: #fff8f4;
    border-radius: 16px;
    border: 2px dashed #f0c8b0;
}

.cat-empty__icon {
    margin-bottom: 20px;
}

.cat-empty__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7f1d1d;
    margin: 0 0 10px;
}

.cat-empty__text {
    font-size: 0.92rem;
    color: #8a6060;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   TABLEAU DONNEES
   ========================================================================== */

.cat-data {
    background-color: #1a0a0a;
    padding: 64px 0;
    margin-bottom: 0;
}

.cat-data__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.cat-data__header {
    margin-bottom: 36px;
}

.cat-data__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
}

.cat-data__subtitle {
    font-size: 1rem;
    color: #e8c8b8;
    margin: 0 0 10px;
    line-height: 1.6;
    max-width: 620px;
}

.cat-data__disclaimer {
    font-size: 0.78rem;
    color: #a08080;
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

.cat-data__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

.cat-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2a1010;
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.9rem;
}

.cat-table thead tr {
    background-color: #7f1d1d;
}

.cat-table thead th {
    padding: 14px 18px;
    text-align: left;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cat-table tbody tr {
    border-bottom: 1px solid #3a1818;
    transition: background-color 0.15s ease;
}

.cat-table tbody tr:last-child {
    border-bottom: none;
}

.cat-table tbody tr:hover {
    background-color: #3a1818;
}

.cat-table tbody td {
    padding: 14px 18px;
    color: #e8d0c0;
    line-height: 1.5;
    vertical-align: middle;
    overflow-wrap: break-word;
    min-width: 0;
}

.cat-table tbody td:first-child {
    font-weight: 600;
    color: #fde047;
}

.cat-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cat-badge--green {
    background-color: #14532d;
    color: #bbf7d0;
}

.cat-badge--yellow {
    background-color: #713f12;
    color: #fef08a;
}

.cat-badge--red {
    background-color: #7f1d1d;
    color: #fecaca;
}

/* ==========================================================================
   CALCULATEUR
   ========================================================================== */

.cat-calc {
    background-color: #fff8f4;
    padding: 64px 0;
}

.cat-calc__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.cat-calc__intro {
    margin-bottom: 36px;
}

.cat-calc__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a0a0a;
    margin: 0 0 10px;
}

.cat-calc__subtitle {
    font-size: 0.98rem;
    color: #6b4040;
    margin: 0;
    line-height: 1.6;
    max-width: 560px;
}

.cat-calc__widget {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.cat-calc__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cat-calc__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-calc__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #4a1a1a;
}

.cat-calc__input-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #f0d8c8;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    max-width: 220px;
}

.cat-calc__btn-step {
    background-color: #f5ece7;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    color: #7f1d1d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

.cat-calc__btn-step:hover {
    background-color: #fed7aa;
}

.cat-calc__btn-step:focus {
    outline: 2px solid #7f1d1d;
    outline-offset: -2px;
}

.cat-calc__input {
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #1a0a0a;
    width: 70px;
    padding: 10px 4px;
    font-family: inherit;
    -moz-appearance: textfield;
}

.cat-calc__input::-webkit-outer-spin-button,
.cat-calc__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cat-calc__input:focus {
    outline: none;
    background-color: #fff9f5;
}

.cat-calc__results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cat-calc__result-card {
    background-color: #fff;
    border: 2px solid #f0d8c8;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-calc__result-card--accent {
    background-color: #7f1d1d;
    border-color: #7f1d1d;
}

.cat-calc__result-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a07070;
}

.cat-calc__result-card--accent .cat-calc__result-label {
    color: #fca0a0;
}

.cat-calc__result-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: #7f1d1d;
    line-height: 1;
}

.cat-calc__result-card--accent .cat-calc__result-value {
    color: #fde047;
}

/* ==========================================================================
   GALERIE
   ========================================================================== */

.cat-gallery {
    padding: 64px 0;
    background-color: #fff;
}

.cat-gallery__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.cat-gallery__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a0a0a;
    margin: 0 0 10px;
}

.cat-gallery__subtitle {
    font-size: 0.98rem;
    color: #6b4040;
    margin: 0 0 32px;
    line-height: 1.6;
}

.cat-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cat-gallery__item {
    position: relative;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    display: block;
}

.cat-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cat-gallery__item:hover img,
.cat-gallery__item:focus img {
    transform: scale(1.06);
}

.cat-gallery__item:focus {
    outline: 3px solid #fde047;
    outline-offset: 3px;
}

.cat-gallery__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(127, 29, 29, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cat-gallery__item:hover .cat-gallery__overlay,
.cat-gallery__item:focus .cat-gallery__overlay {
    opacity: 1;
}

/* ==========================================================================
   MODALE GALERIE
   ========================================================================== */

.cat-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cat-modal[hidden] {
    display: none;
}

.cat-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(26, 10, 10, 0.88);
    cursor: pointer;
}

.cat-modal__content {
    position: relative;
    z-index: 1;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.cat-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background-color: #7f1d1d;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.15s ease;
}

.cat-modal__close:hover {
    background-color: #991b1b;
}

.cat-modal__close:focus {
    outline: 2px solid #fde047;
    outline-offset: 2px;
}

.cat-modal__img-wrap {
    width: 100%;
    background-color: #f5ece7;
    flex: 1;
    overflow: hidden;
}

.cat-modal__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-height: 60vh;
}

.cat-modal__caption {
    padding: 14px 20px 8px;
    font-size: 0.9rem;
    color: #4a1a1a;
    text-align: center;
    font-style: italic;
    margin: 0;
}

.cat-modal__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px 18px;
}

.cat-modal__nav-btn {
    background-color: #f5ece7;
    border: 2px solid #f0d8c8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #7f1d1d;
    transition: background-color 0.15s ease;
}

.cat-modal__nav-btn:hover {
    background-color: #fed7aa;
}

.cat-modal__nav-btn:focus {
    outline: 2px solid #7f1d1d;
    outline-offset: 2px;
}

.cat-modal__counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b4040;
    min-width: 50px;
    text-align: center;
}

/* ==========================================================================
   UNIVERS TOURISME CULINAIRE LOCAL
   ========================================================================== */

.cat-universes {
    background-color: #fff8f4;
    padding: 64px 0;
}

.cat-universes__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.cat-universes__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a0a0a;
    margin: 0 0 10px;
}

.cat-universes__subtitle {
    font-size: 0.98rem;
    color: #6b4040;
    margin: 0 0 36px;
    line-height: 1.6;
    max-width: 600px;
}

.cat-universes__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cat-universe-card {
    background-color: #fff;
    border: 2px solid #f0e0d6;
    border-radius: 14px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: default;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    min-width: 0;
}

.cat-universe-card:hover,
.cat-universe-card:focus {
    border-color: #7f1d1d;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(127, 29, 29, 0.1);
}

.cat-universe-card:focus {
    outline: 2px solid #7f1d1d;
    outline-offset: 2px;
}

.cat-universe-card__icon {
    width: 52px;
    height: 52px;
    background-color: #fff5ee;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.cat-universe-card:hover .cat-universe-card__icon,
.cat-universe-card:focus .cat-universe-card__icon {
    background-color: #fed7aa;
}

.cat-universe-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a0a0a;
    display: block;
    overflow-wrap: break-word;
}

.cat-universe-card__desc {
    font-size: 0.86rem;
    color: #6b4040;
    line-height: 1.6;
    margin: 0;
    overflow-wrap: break-word;
}

.cat-universe-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.cat-universe-card__tags span {
    font-size: 0.72rem;
    background-color: #fff0e6;
    color: #7f1d1d;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid #fdd8b8;
}

/* ==========================================================================
   RESPONSIVE - TABLETTES (1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .cat-hero {
        gap: 32px;
        padding: 48px 24px 40px;
    }

    .cat-hero__visual {
        width: 320px;
        max-width: 40%;
    }

    .cat-hero__stat-number {
        font-size: 1.55rem;
    }

    .cat-articles {
        padding: 0 24px;
    }

    .cat-disclaimer {
        margin-left: 24px;
        margin-right: 24px;
    }

    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 22px;
    }

    .cat-card--featured .cat-card__body {
        padding: 28px 24px;
    }

    .cat-card--featured .cat-card__title {
        font-size: 1.35rem;
    }

    .cat-data__inner {
        padding: 0 24px;
    }

    .cat-data__title {
        font-size: 1.6rem;
    }

    .cat-calc__inner {
        padding: 0 24px;
    }

    .cat-calc__title {
        font-size: 1.55rem;
    }

    .cat-calc__widget {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cat-calc__input-row {
        max-width: 280px;
    }

    .cat-gallery__inner {
        padding: 0 24px;
    }

    .cat-gallery__title {
        font-size: 1.55rem;
    }

    .cat-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .cat-universes__inner {
        padding: 0 24px;
    }

    .cat-universes__title {
        font-size: 1.55rem;
    }

    .cat-universes__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cat-universe-card {
        padding: 22px 20px;
    }

    .cat-modal__content {
        max-width: 720px;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE (768px)
   ========================================================================== */

@media (max-width: 768px) {
    .cat-hero {
        flex-direction: column;
        padding: 36px 18px 32px;
        gap: 28px;
    }

    .cat-hero__visual {
        width: 100%;
        max-width: 100%;
        order: -1;
    }

    .cat-hero__title {
        font-size: 1.9rem;
    }

    .cat-hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .cat-hero__stats {
        gap: 0;
        row-gap: 10px;
    }

    .cat-hero__stat {
        padding: 0 16px 0 0;
    }

    .cat-hero__stat-number {
        font-size: 1.4rem;
    }

    .cat-hero__stat-label {
        font-size: 0.72rem;
    }

    .cat-hero__stat-sep {
        height: 32px;
        margin-right: 16px;
    }

    .cat-disclaimer {
        margin-left: 18px;
        margin-right: 18px;
        margin-bottom: 32px;
        padding: 12px 16px;
    }

    .cat-disclaimer p {
        font-size: 0.82rem;
    }

    .cat-articles {
        padding: 0 18px;
        margin-bottom: 48px;
    }

    .cat-articles__header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cat-articles__title {
        font-size: 1.25rem;
    }

    .cat-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cat-card--featured {
        grid-template-columns: 1fr;
    }

    .cat-card--featured .cat-card__img-wrap {
        height: 220px;
        min-height: 0;
    }

    .cat-card--featured .cat-card__body {
        padding: 22px 20px;
    }

    .cat-card--featured .cat-card__title {
        font-size: 1.2rem;
    }

    .cat-card__body {
        padding: 18px 18px 22px;
    }

    .cat-card__title {
        font-size: 1rem;
    }

    .cat-card__desc {
        font-size: 0.85rem;
    }

    .cat-empty {
        padding: 48px 18px;
    }

    .cat-empty__title {
        font-size: 1.1rem;
    }

    .cat-empty__text {
        font-size: 0.88rem;
    }

    .cat-data {
        padding: 48px 0;
    }

    .cat-data__inner {
        padding: 0 18px;
    }

    .cat-data__title {
        font-size: 1.4rem;
    }

    .cat-data__subtitle {
        font-size: 0.92rem;
    }

    .cat-table {
        font-size: 0.82rem;
    }

    .cat-table thead th {
        padding: 10px 12px;
        font-size: 0.72rem;
    }

    .cat-table tbody td {
        padding: 10px 12px;
    }

    .cat-calc {
        padding: 48px 0;
    }

    .cat-calc__inner {
        padding: 0 18px;
    }

    .cat-calc__title {
        font-size: 1.4rem;
    }

    .cat-calc__subtitle {
        font-size: 0.92rem;
    }

    .cat-calc__widget {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cat-calc__input-row {
        max-width: 100%;
    }

    .cat-calc__result-card {
        padding: 16px 18px;
    }

    .cat-calc__result-value {
        font-size: 1.6rem;
    }

    .cat-gallery {
        padding: 48px 0;
    }

    .cat-gallery__inner {
        padding: 0 18px;
    }

    .cat-gallery__title {
        font-size: 1.4rem;
    }

    .cat-gallery__subtitle {
        font-size: 0.92rem;
    }

    .cat-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cat-modal {
        padding: 12px;
    }

    .cat-modal__content {
        border-radius: 10px;
        max-height: 92vh;
    }

    .cat-modal__img-wrap img {
        max-height: 50vh;
    }

    .cat-modal__caption {
        font-size: 0.82rem;
        padding: 10px 14px 6px;
    }

    .cat-modal__nav {
        gap: 14px;
        padding: 10px 14px 14px;
    }

    .cat-modal__nav-btn {
        width: 36px;
        height: 36px;
    }

    .cat-modal__close {
        width: 34px;
        height: 34px;
        top: 10px;
        right: 10px;
    }

    .cat-universes {
        padding: 48px 0;
    }

    .cat-universes__inner {
        padding: 0 18px;
    }

    .cat-universes__title {
        font-size: 1.4rem;
    }

    .cat-universes__subtitle {
        font-size: 0.92rem;
    }

    .cat-universes__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cat-universe-card {
        padding: 20px 18px;
    }

    .cat-universe-card__icon {
        width: 44px;
        height: 44px;
    }
}

/* ===== RESPONSIVE (auto-repair) ===== */
@media (max-width: 1024px) {
    .cat-hero {
        gap: 32px;
        padding: 48px 24px 40px;
    }

    .cat-hero__visual {
        width: 320px;
        max-width: 40%;
    }

    .cat-hero__stat-number {
        font-size: 1.55rem;
    }

    .cat-articles {
        padding: 0 24px;
    }

    .cat-disclaimer {
        margin-left: 24px;
        margin-right: 24px;
    }

    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 22px;
    }

    .cat-card--featured .cat-card__body {
        padding: 28px 24px;
    }

    .cat-card--featured .cat-card__title {
        font-size: 1.35rem;
    }

    .cat-data__inner {
        padding: 0 24px;
    }

    .cat-data__title {
        font-size: 1.6rem;
    }

    .cat-calc__inner {
        padding: 0 24px;
    }

    .cat-calc__title {
        font-size: 1.55rem;
    }

    .cat-calc__widget {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cat-calc__input-row {
        max-width: 280px;
    }

    .cat-gallery__inner {
        padding: 0 24px;
    }

    .cat-gallery__title {
        font-size: 1.55rem;
    }

    .cat-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .cat-universes__inner {
        padding: 0 24px;
    }

    .cat-universes__title {
        font-size: 1.55rem;
    }

    .cat-universes__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cat-universe-card {
        padding: 22px 20px;
    }

    .cat-modal__content {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .cat-hero {
        flex-direction: column;
        padding: 36px 18px 32px;
        gap: 28px;
    }

    .cat-hero__visual {
        width: 100%;
        max-width: 100%;
        order: -1;
    }

    .cat-hero__title {
        font-size: 1.9rem;
    }

    .cat-hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .cat-hero__stats {
        gap: 0;
        row-gap: 10px;
    }

    .cat-hero__stat {
        padding: 0 16px 0 0;
    }

    .cat-hero__stat-number {
        font-size: 1.4rem;
    }

    .cat-hero__stat-label {
        font-size: 0.72rem;
    }

    .cat-hero__stat-sep {
        height: 32px;
        margin-right: 16px;
    }

    .cat-disclaimer {
        margin-left: 18px;
        margin-right: 18px;
        margin-bottom: 32px;
        padding: 12px 16px;
    }

    .cat-disclaimer p {
        font-size: 0.82rem;
    }

    .cat-articles {
        padding: 0 18px;
        margin-bottom: 48px;
    }

    .cat-articles__header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cat-articles__title {
        font-size: 1.25rem;
    }

    .cat-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cat-card--featured {
        grid-template-columns: 1fr;
    }

    .cat-card--featured .cat-card__img-wrap {
        height: 220px;
        min-height: 0;
    }

    .cat-card--featured .cat-card__body {
        padding: 22px 20px;
    }

    .cat-card--featured .cat-card__title {
        font-size: 1.2rem;
    }

    .cat-card__body {
        padding: 18px 18px 22px;
    }

    .cat-card__title {
        font-size: 1rem;
    }

    .cat-card__desc {
        font-size: 0.85rem;
    }

    .cat-empty {
        padding: 48px 18px;
    }

    .cat-empty__title {
        font-size: 1.1rem;
    }

    .cat-empty__text {
        font-size: 0.88rem;
    }

    .cat-data {
        padding: 48px 0;
    }

    .cat-data__inner {
        padding: 0 18px;
    }

    .cat-data__title {
        font-size: 1.4rem;
    }

    .cat-data__subtitle {
        font-size: 0.92rem;
    }

    .cat-table {
        font-size: 0.82rem;
    }

    .cat-table thead th {
        padding: 10px 12px;
        font-size: 0.72rem;
    }

    .cat-table tbody td {
        padding: 10px 12px;
    }

    .cat-calc {
        padding: 48px 0;
    }

    .cat-calc__inner {
        padding: 0 18px;
    }

    .cat-calc__title {
        font-size: 1.4rem;
    }

    .cat-calc__subtitle {
        font-size: 0.92rem;
    }

    .cat-calc__widget {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cat-calc__input-row {
        max-width: 100%;
    }

    .cat-calc__result-card {
        padding: 16px 18px;
    }

    .cat-calc__result-value {
        font-size: 1.6rem;
    }

    .cat-gallery {
        padding: 48px 0;
    }

    .cat-gallery__inner {
        padding: 0 18px;
    }

    .cat-gallery__title {
        font-size: 1.4rem;
    }

    .cat-gallery__subtitle {
        font-size: 0.92rem;
    }

    .cat-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cat-modal {
        padding: 12px;
    }

    .cat-modal__content {
        border-radius: 10px;
        max-height: 92vh;
    }

    .cat-modal__img-wrap img {
        max-height: 50vh;
    }

    .cat-modal__caption {
        font-size: 0.82rem;
        padding: 10px 14px 6px;
    }

    .cat-modal__nav {
        gap: 14px;
        padding: 10px 14px 14px;
    }

    .cat-modal__nav-btn {
        width: 36px;
        height: 36px;
    }

    .cat-modal__close {
        width: 34px;
        height: 34px;
        top: 10px;
        right: 10px;
    }

    .cat-universes {
        padding: 48px 0;
    }

    .cat-universes__inner {
        padding: 0 18px;
    }

    .cat-universes__title {
        font-size: 1.4rem;
    }

    .cat-universes__subtitle {
        font-size: 0.92rem;
    }

    .cat-universes__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cat-universe-card {
        padding: 20px 18px;
    }

    .cat-universe-card__icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .cat-hero {
        padding: 24px 14px 24px;
        gap: 20px;
    }

    .cat-hero__label {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    .cat-hero__title {
        font-size: 1.55rem;
        margin-bottom: 12px;
    }

    .cat-hero__subtitle {
        font-size: 0.88rem;
        margin-bottom: 18px;
    }

    .cat-hero__stat-number {
        font-size: 1.2rem;
    }

    .cat-hero__stat-label {
        font-size: 0.68rem;
    }

    .cat-hero__stat {
        padding: 0 12px 0 0;
    }

    .cat-hero__stat-sep {
        height: 28px;
        margin-right: 12px;
    }

    .cat-disclaimer {
        margin-left: 14px;
        margin-right: 14px;
        margin-bottom: 24px;
        padding: 10px 12px;
        gap: 8px;
    }

    .cat-disclaimer p {
        font-size: 0.78rem;
    }

    .cat-articles {
        padding: 0 14px;
        margin-bottom: 36px;
    }

    .cat-articles__title {
        font-size: 1.1rem;
    }

    .cat-articles__count {
        font-size: 0.75rem;
        padding: 2px 8px;
    }

    .cat-grid {
        gap: 16px;
    }

    .cat-card--featured .cat-card__img-wrap {
        height: 180px;
    }

    .cat-card--featured .cat-card__body {
        padding: 16px 14px;
    }

    .cat-card--featured .cat-card__title {
        font-size: 1.05rem;
    }

    .cat-card__body {
        padding: 14px 14px 18px;
        gap: 8px;
    }

    .cat-card__title {
        font-size: 0.95rem;
    }

    .cat-card__desc {
        font-size: 0.82rem;
    }

    .cat-card__meta {
        font-size: 0.72rem;
    }

    .cat-card__tag {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .cat-empty {
        padding: 36px 14px;
    }

    .cat-empty__title {
        font-size: 1rem;
    }

    .cat-empty__text {
        font-size: 0.82rem;
    }

    .cat-data {
        padding: 36px 0;
    }

    .cat-data__inner {
        padding: 0 14px;
    }

    .cat-data__title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .cat-data__subtitle {
        font-size: 0.86rem;
    }

    .cat-data__disclaimer {
        font-size: 0.72rem;
    }

    .cat-table {
        font-size: 0.76rem;
    }

    .cat-table thead th {
        padding: 8px 10px;
        font-size: 0.68rem;
    }

    .cat-table tbody td {
        padding: 8px 10px;
    }

    .cat-badge {
        font-size: 0.65rem;
        padding: 2px 7px;
    }

    .cat-calc {
        padding: 36px 0;
    }

    .cat-calc__inner {
        padding: 0 14px;
    }

    .cat-calc__title {
        font-size: 1.2rem;
    }

    .cat-calc__subtitle {
        font-size: 0.86rem;
    }

    .cat-calc__label {
        font-size: 0.82rem;
    }

    .cat-calc__input-row {
        max-width: 100%;
    }

    .cat-calc__input {
        font-size: 0.92rem;
        width: 56px;
    }

    .cat-calc__btn-step {
        padding: 8px 10px;
    }

    .cat-calc__result-card {
        padding: 12px 14px;
    }

    .cat-calc__result-value {
        font-size: 1.35rem;
    }

    .cat-calc__result-label {
        font-size: 0.72rem;
    }

    .cat-gallery {
        padding: 36px 0;
    }

    .cat-gallery__inner {
        padding: 0 14px;
    }

    .cat-gallery__title {
        font-size: 1.2rem;
    }

    .cat-gallery__subtitle {
        font-size: 0.86rem;
        margin-bottom: 20px;
    }

    .cat-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .cat-modal {
        padding: 8px;
    }

    .cat-modal__content {
        border-radius: 8px;
        max-height: 95vh;
    }

    .cat-modal__img-wrap img {
        max-height: 44vh;
    }

    .cat-modal__caption {
        font-size: 0.76rem;
        padding: 8px 10px 4px;
    }

    .cat-modal__nav {
        gap: 10px;
        padding: 8px 10px 12px;
    }

    .cat-modal__nav-btn {
        width: 32px;
        height: 32px;
    }

    .cat-modal__close {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }

    .cat-modal__counter {
        font-size: 0.76rem;
        min-width: 36px;
    }

    .cat-universes {
        padding: 36px 0;
    }

    .cat-universes__inner {
        padding: 0 14px;
    }

    .cat-universes__title {
        font-size: 1.2rem;
    }

    .cat-universes__subtitle {
        font-size: 0.86rem;
        margin-bottom: 24px;
    }

    .cat-universes__grid {
        gap: 12px;
    }

    .cat-universe-card {
        padding: 16px 14px;
        gap: 10px;
    }

    .cat-universe-card__icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .cat-universe-card__name {
        font-size: 0.92rem;
    }

    .cat-universe-card__desc {
        font-size: 0.8rem;
    }

    .cat-universe-card__tags span {
        font-size: 0.68rem;
        padding: 2px 8px;
    }
}