
/* HARDWARE ACCELERATION */
.header,
.news-card,
.filters,
.loader {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/*tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

a, button, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

/*MINIMUM TOUCH TARGETS (48×48dp)*/
.category-btn,
.continent-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.btn-auth,
.btn-undo,
.load-more-btn,
.search-bar button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/*PREVENT INPUT ZOOM */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    font-size: 16px !important;
}



/* SAFE AREA INSETS */
.header {
    padding-top: env(safe-area-inset-top, 0px);
}

.footer {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

main {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* DISABLE HOVER STATES ON TOUCH */
@media (hover: none) and (pointer: coarse) {
    .news-card:hover {
        transform: none;
        border-color: var(--border);
        box-shadow: none;
    }

    .category-btn:hover,
    .continent-btn:hover {
        border-color: var(--border);
        color: var(--text-2);
        background: transparent;
    }

    .btn-auth:hover {
        color: var(--text-2);
        border-color: var(--border);
        background: transparent;
    }

    /*active state */
    .news-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .category-btn:active,
    .continent-btn:active {
        background: rgba(232, 184, 75, 0.15);
        border-color: var(--gold-dim);
        color: var(--gold);
    }

    .btn-auth:active,
    .load-more-btn:active {
        opacity: 0.75;
    }
}

/* FONT RENDERING */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/*IMAGE PERFORMANCE */
.news-card-image {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
    content-visibility: auto;
    contain-intrinsic-size: 320px 190px;
}

/*HORIZONTAL SCROLL ON MOBILE */
@media (max-width: 480px) {
    .category-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        gap: 8px;
    }

    .category-buttons::-webkit-scrollbar {
        display: none;
    }

    .category-btn,
    .continent-btn {
        flex-shrink: 0;
    }

    /* Stack header vertically on very small screens */
    .header .container {
        height: auto;
        padding: 10px 14px;
    }
}

/* SELECTION COLOR */
::selection {
    background: rgba(232, 184, 75, 0.3);
    color: var(--text);
}