
/* =====================================
   KW — RESPONSIVE DESIGN SYSTEM
===================================== */


/* =====================================
   01 — GLOBAL RESPONSIVE SETTINGS
===================================== */

html {
    max-width: 100%;
}

body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
}

section {
    scroll-margin-top: 100px;
}


/* =====================================
   02 — MOBILE MENU BUTTON
===================================== */

.kw-menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    background: #111113;
    border: 1px solid #ffffff20;
    border-radius: 10px;

    cursor: pointer;
    flex-shrink: 0;

    position: relative;

    transition: border-color 0.3s ease;
}

.kw-menu-toggle:hover {
    border-color: #df1238;
}

.kw-menu-toggle span {
    position: absolute;

    left: 10px;
    right: 10px;

    height: 2px;

    background: #ffffff;
    border-radius: 5px;

    transition: 0.35s ease;
}

.kw-menu-toggle span:nth-child(1) {
    top: 13px;
}

.kw-menu-toggle span:nth-child(2) {
    top: 19px;
}

.kw-menu-toggle span:nth-child(3) {
    top: 25px;
}

.kw-menu-toggle.active {
    border-color: #df1238;
}

.kw-menu-toggle.active span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
    background: #df1238;
}

.kw-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}

.kw-menu-toggle.active span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
    background: #df1238;
}


/* =====================================
   03 — TABLET RESPONSIVE
===================================== */

@media (max-width: 1100px) {

    .navbar {
        padding: 15px 25px;
    }

    .hero {
        gap: 35px;
    }

    .hero h1 {
        font-size: clamp(40px, 6vw, 75px);
    }

    .hero-content,
    .hero-image {
        min-width: 0;
    }

    .achievement-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .collection-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =====================================
   04 — MOBILE NAVIGATION
===================================== */

@media (max-width: 950px) {

    .navbar {
        display: flex;
        align-items: center;

        gap: 12px;
        padding: 12px 20px;

        z-index: 1000;
    }

    .navbar .logo {
        margin-right: auto;
    }

    .kw-menu-toggle {
        display: block;
        order: 100;
    }

    .navbar nav {
        position: absolute;

        top: 100%;
        left: 12px;
        right: 12px;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 5px;
        padding: 18px;

        background: #111113f5;

        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);

        border: 1px solid #df123840;
        border-radius: 0 0 16px 16px;

        box-shadow: 0 25px 50px #0009;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-15px);

        transition:
            opacity 0.35s ease,
            transform 0.35s ease,
            visibility 0.35s;
    }

    .navbar.kw-menu-open nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .navbar nav a {
        display: block;

        width: 100%;
        padding: 14px 16px;

        font-size: 14px;

        color: #a1a1aa;
        border-radius: 8px;

        box-sizing: border-box;
    }

    .navbar nav a:hover,
    .navbar nav a.active {
        color: white;
        background: #df123815;
    }

    .navbar nav a::after {
        display: none;
    }

}


/* =====================================
   05 — MOBILE HOMEPAGE
===================================== */

@media (max-width: 768px) {

    body:not(.collection-page) section {
        padding-left: 20px;
        padding-right: 20px;
    }

    body:not(.collection-page) .hero {
        display: flex;
        flex-direction: column;

        align-items: center;

        min-height: auto;

        padding: 75px 22px 50px;

        gap: 35px;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;

        text-align: center;
    }

    .hero h1 {
        font-size: clamp(35px, 9vw, 60px);
        line-height: 1.15;

        overflow-wrap: anywhere;
    }

    .hero-content p {
        font-size: 14px;
        line-height: 1.8;
    }

    .hero-image {
        width: 100%;
        max-width: 350px;

        margin: auto;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        max-height: 450px;

        object-fit: cover;
    }

    .hero-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    section h2 {
        font-size: clamp(27px, 6vw, 42px);
        overflow-wrap: anywhere;
    }

    .about {
        min-width: 0;
    }

    .about p {
        font-size: 14px;
        line-height: 1.8;
    }

}


/* =====================================
   06 — MOBILE CARDS
===================================== */

@media (max-width: 768px) {

    .achievement-grid,
    .category-grid,
    .collection-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }

    .achievement-card,
    .category-card,
    .collection-card {
        min-width: 0;
        max-width: 100%;

        overflow: hidden;
    }

    .achievement-card h3,
    .category-card h3,
    .collection-card h3 {
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .category-card {
        padding: 20px 15px;
    }

    .achievement-card p,
    .category-card p,
    .collection-card p {
        font-size: 12px;
        line-height: 1.7;
    }

}


/* =====================================
   07 — COLLECTION PAGE
===================================== */

@media (max-width: 768px) {

    .collection-page main {
        min-width: 0;
    }

    .collection-hero {
        padding: 65px 20px 35px;
    }

    .collection-hero h1 {
        font-size: clamp(35px, 9vw, 65px);
        overflow-wrap: anywhere;
    }

    .collection-tabs {
        display: flex;
        flex-wrap: nowrap;

        overflow-x: auto;

        gap: 10px;
        padding: 12px 16px;

        scrollbar-width: thin;
        scrollbar-color: #df1238 transparent;
    }

    .collection-tabs a {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .collection-toolbar,
    .collection-controls {
        flex-wrap: wrap;
        gap: 12px;
    }

    #search-input,
    #year-filter {
        max-width: 100%;
        min-width: 0;

        font-size: 16px;
    }

    #detail-modal {
        box-sizing: border-box;

        width: calc(100% - 24px);
        max-width: 100%;
        max-height: 90dvh;

        margin: auto;

        overflow-y: auto;
    }

    #modal-title {
        font-size: clamp(25px, 6vw, 40px);
        overflow-wrap: anywhere;
    }

    #modal-description {
        font-size: 14px;
        line-height: 1.8;
    }

}


/* =====================================
   08 — BABY FOCUS RESPONSIVE
===================================== */

@media (max-width: 600px) {

    .kw-launcher {
        right: 16px;
        bottom: 16px;

        width: 54px;
        height: 54px;

        border-radius: 17px;
    }

    .kw-chat {
        right: 12px;
        bottom: 82px;

        width: calc(100% - 24px);
        max-width: 420px;

        height: min(530px, calc(100dvh - 100px));

        border-radius: 16px;
    }

    .kw-messages {
        min-height: 0;
        overflow-y: auto;
    }

    .kw-input {
        min-width: 0;
        font-size: 16px;
    }

    .kw-suggestions {
        overflow-x: auto;
        max-width: 100%;
    }

}


/* =====================================
   09 — SMALL MOBILE SCREENS
===================================== */

@media (max-width: 480px) {

    .navbar {
        padding: 12px;
        gap: 8px;
    }

    .achievement-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .category-card {
        padding: 18px 12px;
    }

    .category-card h3 {
        font-size: 14px;
    }

    .kw-media-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .kw-media-thumbnail {
        height: 115px;
    }

    .kw-media-info {
        padding: 12px;
    }

    .kw-media-info h4 {
        font-size: 12px;
    }

    .kw-resume-modal {
        width: calc(100% - 20px);
        padding: 20px;
    }

    .kw-language-switch {
        flex-shrink: 0;
    }

}


/* =====================================
   10 — TOUCH DEVICES
===================================== */

@media (hover: none) {

    .achievement-card:hover,
    .category-card:hover,
    .collection-card:hover {
        transform: none;
    }

    .achievement-card::after,
    .category-card::before {
        animation: none;
        transition: none;
    }

}


/* =====================================
   11 — ACCESSIBILITY
===================================== */

@media (prefers-reduced-motion: reduce) {

    .kw-menu-toggle span,
    .navbar nav {
        transition: none !important;
    }

}
/* MOBILE NAVIGATION FIX */

@media (max-width: 950px) {

    .navbar nav {
        left: 12px;
        right: 12px;

        width: auto;
        max-width: none;
        min-width: 0;

        box-sizing: border-box;

        background: #111113;

        max-height: 75dvh;
        overflow-y: auto;

        border-radius: 0 0 16px 16px;
    }

    .navbar nav a {
        width: 100%;
        color: #d4d4d8;
    }

    .navbar nav a.active {
        color: #df1238;
        background: #df123810;
    }

}