/*
Theme Name: tombolstart-child-theme
Theme URI: https://elementor.com/hello-theme/
Description: Hello Elementor Child Theme with Gaming Vista custom design
Author: Lanang Agung
Author URI: https://lanangedan.my.id/
Template: hello-elementor
Version: 1.6.5
*/

/* Font loaded via functions.php for better performance */

:root {
    /* Default WordPress Styles Alignment */
    --wp--style--global--content-size: 800px;
    --wp--style--global--wide-size: 1200px;

    /* Ported from index.css */
    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Gaming Red Accent: RGB(196, 30, 58) = HSL(350, 73%, 44%) */
    --gaming-red: #c41e3a;
    /* Converted to HEX for better compatibility */
    --gaming-red-hover: #a01830;

    --background: #ffffff;
    --foreground: #0f172a;

    --muted: #f1f5f9;
    --muted-foreground: #64748b;

    --border: #e2e8f0;

    --radius: 0.5rem;

    /* Card styling */
    --card: #ffffff;
    --card-foreground: #0f172a;

    /* Accent colors */
    --accent: #f8fafc;
    --accent-foreground: #0f172a;

    /* Primary (using gaming red) */
    --primary: #c41e3a;
    --primary-foreground: #ffffff;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Container utility class for max-width and centering */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.hidden {
    display: none;
}

.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:flex {
        display: flex;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:block {
        display: block;
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--gaming-red);
}

/* Button UI Component Port */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border: none;
    background: transparent;
}

.btn-primary {
    background-color: var(--gaming-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--gaming-red-hover);
}

.btn-ghost {
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background-color: var(--muted);
    color: var(--gaming-red);
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: var(--gaming-red);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-secondary {
    background-color: var(--muted);
    color: var(--foreground);
}

/* Header Specifics */
.site-header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
}

.logo-box {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--gaming-red);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Footer Specifics */
.site-footer {
    background-color: var(--foreground);
    color: var(--background);
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
    color: var(--gaming-red);
}

/* Card Styles */
.article-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.article-card img {
    border-radius: var(--radius);
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
}

/* Image zoom effect on hover */
.img-zoom {
    overflow: hidden;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* Wordpess Alignments */
.alignwide {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   10. ANIMATIONS (Tailwind Ports)
   ========================================================================== */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slide-up 0.4s ease-out forwards;
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Card Zoom Effect Correction */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-500 {
    transition-duration: 500ms;
}

/* ==========================================================================
   11. RESPONSIVE DESIGN
   ========================================================================== */

/* Mobile adjustments */
@media (max-width: 767px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Typography scale down */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Button full width on mobile */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-ghost {
        width: auto;
    }

    /* Card adjustments */
    .article-card {
        margin-bottom: 1rem;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        max-width: 720px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    .badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }

    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   Category Nav Bar Auto-Hide on Scroll
   ============================================ */

.category-nav-bar {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.category-nav-bar.category-nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   Responsive Iframe & Embed Styles
   ============================================ */

/* Article content: constrain width only — never force height:auto on all iframes */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video,
.post-content iframe,
.site-main iframe,
article iframe {
    max-width: 100%;
}

/* Video embeds: responsive 16:9 wrapper (YouTube, Vimeo, etc.) */
.wp-block-embed.is-provider-youtube,
.wp-block-embed.is-provider-vimeo,
.wp-block-embed.is-provider-video,
.wp-block-embed.wp-embed-aspect-16-9,
.embed-responsive,
.video-container {
    position: relative;
    max-width: 100%;
}

.wp-block-embed.is-provider-youtube .wp-block-embed__wrapper,
.wp-block-embed.is-provider-vimeo .wp-block-embed__wrapper,
.wp-block-embed.is-provider-video .wp-block-embed__wrapper,
.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper,
.embed-responsive,
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.wp-block-embed.is-provider-youtube .wp-block-embed__wrapper iframe,
.wp-block-embed.is-provider-vimeo .wp-block-embed__wrapper iframe,
.wp-block-embed.is-provider-video .wp-block-embed__wrapper iframe,
.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe,
.embed-responsive iframe,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border: 0;
}

/* YouTube/Vimeo iframes outside block wrapper */
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
iframe[src*="youtube-nocookie.com"],
iframe[src*="player.vimeo.com"] {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 8px;
}

/* Social embeds (Instagram, Twitter, Facebook): no 16:9 box — keep proportional height */
.wp-block-embed.is-provider-instagram,
.wp-block-embed.is-provider-twitter,
.wp-block-embed.is-provider-facebook,
.wp-block-embed.is-provider-instagram .wp-block-embed__wrapper,
.wp-block-embed.is-provider-twitter .wp-block-embed__wrapper,
.wp-block-embed.is-provider-facebook .wp-block-embed__wrapper {
    position: static;
    padding-bottom: 0;
    height: auto;
    overflow: visible;
    max-width: 100%;
}

.wp-block-embed.is-provider-instagram iframe,
.wp-block-embed.is-provider-twitter iframe,
.wp-block-embed.is-provider-facebook iframe,
iframe[src*="instagram.com"],
iframe[src*="twitter.com"],
iframe[src*="platform.twitter.com"],
iframe[src*="facebook.com/plugins"] {
    position: static;
    display: block;
    width: 100%;
    max-width: 658px;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    min-height: 360px;
    border: 0;
}

/* Typical Instagram post/profile embed ratio when WP omits inline height */
.wp-block-embed.is-provider-instagram iframe,
iframe[src*="instagram.com"] {
    aspect-ratio: 658 / 720;
}

/* Blockquote-style Instagram (legacy oEmbed) */
.instagram-media,
blockquote.instagram-media {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
}

.twitter-tweet,
.twitter-tweet iframe {
    max-width: 100% !important;
}

@media (max-width: 768px) {
    iframe[width="560"][height="315"],
    iframe[width="640"][height="360"] {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .wp-block-embed.is-provider-instagram iframe,
    iframe[src*="instagram.com"] {
        min-height: 320px;
    }
}

/* Homepage category nav — hide on scroll down (JS toggles .category-nav-hidden) */
.category-nav-bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.category-nav-bar.category-nav-hidden {
    transform: translateY(calc(-100% - 4px));
    opacity: 0;
    pointer-events: none;
}

/* Print styles */
@media print {

    .site-header,
    .site-footer,
    .btn {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}