/*
Theme Name: Flatsome Child
Description: Child theme for Flatsome - Noci88 Casino Vietnam - SEO Optimized
Author: Noci88 Team
Template: flatsome
Version: 3.0
*/

/* ============================================================
   CRITICAL CSS - Above the fold / Core Layout
   ============================================================ */

/* Force hardware acceleration for animations */
.header,
.header-wrapper,
.nav-bar,
.main-nav {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Prevent layout shift (CLS optimization) */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reserve space for images before load (prevent CLS) */
img[width][height] {
    height: auto;
}

/* ============================================================
   CASINO BRAND COLORS - Noci88
   ============================================================ */
:root {
    --noci-primary: #e30613;      /* Noci88 red */
    --noci-primary-dark: #b50010;
    --noci-secondary: #f5a623;    /* Gold accent */
    --noci-dark: #1a1a2e;
    --noci-dark-alt: #16213e;
    --noci-text: #333333;
    --noci-text-light: #666666;
    --noci-bg: #f8f8f8;
    --noci-white: #ffffff;
    --noci-border: #e0e0e0;
    --noci-success: #28a745;
    --noci-gold: #ffd700;
}

/* ============================================================
   TYPOGRAPHY OPTIMIZATION
   ============================================================ */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HEADER OPTIMIZATION
   ============================================================ */
#header {
    background: var(--noci-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Logo */
#logo img {
    max-height: 50px;
    width: auto;
}

/* Navigation */
.nav-bar {
    background: var(--noci-dark-alt);
}

ul.nav > li > a {
    color: var(--noci-white) !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 12px 15px;
    transition: color 0.2s ease, background 0.2s ease;
}

ul.nav > li > a:hover,
ul.nav > li.current-menu-item > a {
    color: var(--noci-secondary) !important;
    background: rgba(255,255,255,0.05);
}

/* ============================================================
   HERO / BANNER SECTION
   ============================================================ */
.banner-section,
.hero-section,
[class*="banner"] {
    position: relative;
    overflow: hidden;
}

/* Lazy loaded background images */
.lazy-bg {
    background-color: #1a1a2e;
    min-height: 300px;
}

/* ============================================================
   CTA BUTTONS - Casino Style
   ============================================================ */
.button,
.btn,
a.button {
    background: linear-gradient(135deg, var(--noci-primary), var(--noci-primary-dark));
    color: var(--noci-white) !important;
    border: none;
    border-radius: 4px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(227, 6, 19, 0.3);
}

.button:hover,
.btn:hover,
a.button:hover {
    background: linear-gradient(135deg, var(--noci-primary-dark), #8b0000);
    box-shadow: 0 5px 15px rgba(227, 6, 19, 0.4);
    transform: translateY(-1px);
}

/* Gold/VIP button variant */
.button.button-secondary,
.button.outline {
    background: linear-gradient(135deg, var(--noci-secondary), #d4870a);
    color: var(--noci-dark) !important;
    box-shadow: 0 3px 8px rgba(245, 166, 35, 0.3);
}

/* ============================================================
   BLOG POSTS / ARTICLE CARDS
   ============================================================ */
.blog-posts .col,
.post-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: var(--noci-white);
}

.blog-posts .col:hover,
.post-item:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Post thumbnail */
.post-thumbnail img,
.blog-posts img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Post title */
.post-title a,
h1.page-title,
.entry-title a {
    color: var(--noci-text);
    text-decoration: none;
    font-weight: 700;
}

.post-title a:hover,
.entry-title a:hover {
    color: var(--noci-primary);
}

/* ============================================================
   SINGLE POST / ARTICLE STYLES
   ============================================================ */
.entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--noci-text);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--noci-dark);
    font-weight: 700;
    margin: 1.5em 0 0.75em;
    line-height: 1.3;
}

.entry-content h2 {
    font-size: 1.5rem;
    border-left: 4px solid var(--noci-primary);
    padding-left: 12px;
    margin-top: 2em;
}

.entry-content h3 {
    font-size: 1.25rem;
    color: var(--noci-primary);
}

.entry-content p {
    margin-bottom: 1.2em;
}

/* Internal links */
.entry-content a {
    color: var(--noci-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: var(--noci-primary-dark);
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9rem;
}

.entry-content table th {
    background: var(--noci-dark);
    color: var(--noci-white);
    padding: 10px 12px;
    text-align: left;
}

.entry-content table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--noci-border);
}

.entry-content table tr:nth-child(even) td {
    background: #f5f5f5;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background: var(--noci-dark);
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
}

#footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

#footer a:hover {
    color: var(--noci-secondary);
}

#footer .footer-widget-title,
#footer h3,
#footer h4 {
    color: var(--noci-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    font-size: 0.9rem;
}

.sidebar .widget {
    background: var(--noci-white);
    border: 1px solid var(--noci-border);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}

.sidebar .widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--noci-dark);
    border-bottom: 2px solid var(--noci-primary);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* ============================================================
   BREADCRUMB - SEO Friendly
   ============================================================ */
.breadcrumb,
.rank-math-breadcrumb,
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--noci-text-light);
    padding: 8px 0;
    margin-bottom: 20px;
}

.breadcrumb a,
.rank-math-breadcrumb a {
    color: var(--noci-primary);
    text-decoration: none;
}

.breadcrumb a:hover,
.rank-math-breadcrumb a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE - MOBILE OPTIMIZATION
   ============================================================ */
@media only screen and (max-width: 48em) {
    /* Mobile navigation */
    .mobile-nav,
    .hamburger-menu {
        background: var(--noci-dark);
        color: var(--noci-white);
    }

    /* Stack columns */
    .row > .col {
        margin-bottom: 15px;
    }

    /* Post thumbnail */
    .post-thumbnail img {
        height: 180px;
    }

    /* Typography scaling */
    .entry-content h2 {
        font-size: 1.3rem;
    }

    .entry-content h3 {
        font-size: 1.1rem;
    }

    /* CTA Buttons full width on mobile */
    .button,
    .btn,
    a.button {
        display: block;
        text-align: center;
        padding: 14px 20px;
        margin-bottom: 10px;
    }

    /* Table horizontal scroll */
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Navigation link buttons on homepage */
    [class*="col"] a[href*="/go/"] {
        width: 100% !important;
        display: block;
        box-sizing: border-box;
        margin-bottom: 10px;
    }
}

/* ============================================================
   PERFORMANCE: REDUCE PAINT / REPAINT
   ============================================================ */

/* Use transform instead of top/left for animations */
.animated,
[data-animate] {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Contain paint for cards */
.post-item,
.blog-posts .col,
.widget {
    contain: layout style;
}

/* ============================================================
   ACCESSIBILITY & UX
   ============================================================ */

/* Focus styles */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--noci-primary);
    outline-offset: 2px;
}

/* Skip to content */
.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    background: var(--noci-primary);
    color: var(--noci-white);
    padding: 8px 16px;
}

/* ============================================================
   FLOATING CTA (Mobile) - Call to Action
   ============================================================ */
.floating-register-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    background: linear-gradient(135deg, var(--noci-primary), var(--noci-primary-dark));
    color: var(--noci-white) !important;
    text-align: center;
    padding: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
}

@media only screen and (max-width: 48em) {
    .floating-register-btn {
        display: block;
    }
    /* Add padding so content isn't hidden behind floating button */
    body {
        padding-bottom: 56px;
    }
}

/* ============================================================
   PRINT STYLES - SEO & Accessibility
   ============================================================ */
@media print {
    #header,
    #footer,
    .sidebar,
    .nav-bar,
    .floating-register-btn,
    .ads,
    [class*="ad-"] {
        display: none !important;
    }
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }
}

/* ============================================================
   NOCI88 BOOKMAKER UI - DISTINCT VISUAL OVERRIDES
   ============================================================ */

:root {
    --book-bg-1: #07121f;
    --book-bg-2: #0c2038;
    --book-panel: #0f2742;
    --book-panel-2: #102c4d;
    --book-line: rgba(255, 208, 0, 0.2);
    --book-glow: rgba(27, 214, 193, 0.2);
    --book-accent: #1bd6c1;
    --book-accent-dark: #12a092;
    --book-gold: #ffd35a;
    --book-text: #eaf4ff;
    --book-text-soft: #b7cbe0;
}

body {
    background:
        radial-gradient(circle at 12% 12%, rgba(27, 214, 193, 0.1) 0, rgba(27, 214, 193, 0) 34%),
        radial-gradient(circle at 88% 8%, rgba(255, 211, 90, 0.12) 0, rgba(255, 211, 90, 0) 32%),
        linear-gradient(140deg, var(--book-bg-1) 0%, var(--book-bg-2) 55%, #08172a 100%);
    color: var(--book-text);
}

body:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 26px 26px;
}

#wrapper,
#main,
.section,
.row,
.col {
    position: relative;
    z-index: 1;
}

#header,
.header,
.header-wrapper,
.header-main,
.header-bottom {
    background: linear-gradient(160deg, rgba(9, 20, 35, 0.95) 0%, rgba(14, 35, 58, 0.96) 100%) !important;
    border-bottom: 1px solid var(--book-line);
}

.header:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, var(--book-gold) 50%, rgba(0, 0, 0, 0) 100%);
}

#logo img {
    filter: drop-shadow(0 0 14px rgba(255, 211, 90, 0.35));
}

.nav > li > a,
ul.nav > li > a {
    color: var(--book-text) !important;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-size: 0.86rem;
    border-radius: 6px;
}

.nav > li > a:hover,
.nav > li.active > a,
ul.nav > li > a:hover,
ul.nav > li.current-menu-item > a {
    color: #072130 !important;
    background: linear-gradient(120deg, var(--book-gold) 0%, #ffbe2f 100%) !important;
    box-shadow: 0 0 18px rgba(255, 211, 90, 0.35);
}

.section,
.box,
.box-text,
.post-item,
.blog-posts .col,
.sidebar .widget {
    background: linear-gradient(145deg, rgba(15, 39, 66, 0.95) 0%, rgba(10, 30, 53, 0.96) 100%);
    border: 1px solid rgba(103, 142, 186, 0.28);
    border-radius: 12px;
    box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.blog-posts .col:hover,
.post-item:hover,
.box:hover {
    transform: translateY(-3px);
    border-color: rgba(27, 214, 193, 0.55);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(27, 214, 193, 0.18),
        0 0 22px rgba(27, 214, 193, 0.14);
}

h1,
h2,
h3,
h4,
.section-title,
.widget-title,
.entry-title,
.entry-title a {
    color: var(--book-gold) !important;
    letter-spacing: 0.2px;
}

.entry-content,
.entry-content p,
.box-text,
.post-title a,
.post-meta,
.sidebar,
.sidebar a {
    color: var(--book-text-soft);
}

.entry-content h2 {
    border-left: 4px solid var(--book-accent);
    background: linear-gradient(90deg, rgba(27, 214, 193, 0.12) 0%, rgba(27, 214, 193, 0) 100%);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
}

.button,
.btn,
a.button,
button,
input[type="submit"] {
    background: linear-gradient(125deg, var(--book-accent) 0%, var(--book-accent-dark) 100%) !important;
    border: 1px solid rgba(27, 214, 193, 0.7);
    border-radius: 9px;
    color: #072130 !important;
    font-weight: 800;
    letter-spacing: 0.7px;
    box-shadow: 0 8px 18px rgba(27, 214, 193, 0.23);
}

.button:hover,
.btn:hover,
a.button:hover,
button:hover,
input[type="submit"]:hover {
    background: linear-gradient(125deg, #28ecd6 0%, #18b8a8 100%) !important;
    box-shadow: 0 12px 22px rgba(27, 214, 193, 0.28);
}

.button.secondary,
.button.is-outline,
.button.outline,
.button.button-secondary {
    background: linear-gradient(125deg, var(--book-gold) 0%, #ffbe2f 100%) !important;
    border-color: rgba(255, 211, 90, 0.8);
    color: #302000 !important;
    box-shadow: 0 8px 18px rgba(255, 211, 90, 0.25);
}

.post-thumbnail img,
.blog-posts img,
.box-image img {
    border-bottom: 2px solid rgba(27, 214, 193, 0.4);
}

.rank-math-breadcrumb,
.breadcrumbs,
.breadcrumb {
    background: linear-gradient(90deg, rgba(27, 214, 193, 0.1) 0%, rgba(255, 211, 90, 0.1) 100%);
    border: 1px solid rgba(255, 211, 90, 0.22);
    border-radius: 8px;
    padding: 10px 12px;
}

.rank-math-breadcrumb a,
.breadcrumb a,
.breadcrumbs a {
    color: var(--book-accent);
}

#footer,
.footer-wrapper {
    background: linear-gradient(155deg, #091a2b 0%, #071422 100%);
    border-top: 1px solid rgba(255, 211, 90, 0.28);
}

#footer a {
    color: #c2d8ee;
}

#footer a:hover {
    color: var(--book-gold);
}

#footer .footer-widget-title,
#footer h3,
#footer h4 {
    color: var(--book-gold);
}

.floating-register-btn {
    background: linear-gradient(120deg, var(--book-gold) 0%, #ffbe2f 100%);
    color: #2d2000 !important;
    border-top: 1px solid rgba(255, 211, 90, 0.7);
    box-shadow: 0 -4px 20px rgba(255, 190, 47, 0.35);
}

/* Quick links on homepage become bookmaker-style action chips */
[class*="col"] a[href*="/go/"] {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

[class*="col"] a[href*="/go/"]:before {
    content: "LIVE";
    position: absolute;
    top: 0;
    right: 0;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #03252c;
    background: var(--book-gold);
}

@media only screen and (max-width: 48em) {
    body {
        background:
            radial-gradient(circle at 18% 10%, rgba(27, 214, 193, 0.12) 0, rgba(27, 214, 193, 0) 38%),
            linear-gradient(160deg, #081727 0%, #0b2037 60%, #09192c 100%);
    }

    .section,
    .box,
    .post-item,
    .blog-posts .col,
    .sidebar .widget {
        border-radius: 10px;
    }

    .nav > li > a,
    ul.nav > li > a {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
}

/* ============================================================
   CONTRAST HOTFIX - MENU & FOOTER LEGIBILITY
   ============================================================ */

/* Header menu text contrast */
.header-nav-main.nav > li > a,
.nav.header-nav-main > li > a,
ul.nav.header-nav-main > li > a,
.header .nav > li > a {
    color: #eef7ff !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.header-nav-main.nav > li > a:hover,
.header-nav-main.nav > li.current-menu-item > a,
.header-nav-main.nav > li.active > a,
.header .nav > li > a:hover,
.header .nav > li.current-menu-item > a,
.header .nav > li.active > a {
    color: #fff5cf !important;
    background: rgba(255, 211, 90, 0.18) !important;
}

/* Dropdown menu readability */
.nav-dropdown,
.sub-menu.nav-dropdown {
    background: #0b223a !important;
    border: 1px solid rgba(255, 211, 90, 0.25) !important;
}

.nav-dropdown > li > a,
.sub-menu.nav-dropdown > li > a {
    color: #d5e7fb !important;
}

.nav-dropdown > li > a:hover,
.sub-menu.nav-dropdown > li > a:hover {
    color: #fff6d5 !important;
    background: rgba(255, 211, 90, 0.14) !important;
}

/* Footer text contrast */
#footer,
#footer p,
#footer li,
#footer span,
#footer strong,
#footer .widget,
#footer .widget p,
#footer .widget li,
#footer .is-divider,
.absolute-footer,
.absolute-footer p,
.absolute-footer span,
.copyright-footer,
.footer-primary,
.footer-secondary {
    color: #d7e7f8 !important;
}

#footer a,
.absolute-footer a,
.footer a {
    color: #eef7ff !important;
}

#footer a:hover,
.absolute-footer a:hover,
.footer a:hover {
    color: #ffd35a !important;
}

/* Footer color fix v2 (Flatsome-specific selectors) */
#footer,
#footer.dark,
.footer-wrapper,
.footer-1,
.footer-2,
.absolute-footer,
.absolute-footer.dark {
    color: #deecfa !important;
}

#footer .widget,
#footer .widget p,
#footer .widget li,
#footer .widget span,
#footer .widget-text,
#footer .post-meta,
#footer .menu li,
#footer .menu li a,
.footer-1 .widget,
.footer-1 .widget p,
.footer-1 .widget li,
.footer-2 .widget,
.footer-2 .widget p,
.footer-2 .widget li,
.absolute-footer,
.absolute-footer p,
.absolute-footer span {
    color: #deecfa !important;
}

#footer .widget-title,
#footer h1,
#footer h2,
#footer h3,
#footer h4,
#footer h5,
#footer h6,
.footer-1 .widget-title,
.footer-2 .widget-title,
.dark .widget-title {
    color: #ffd35a !important;
}

#footer a,
#footer .menu li a,
.footer-1 a,
.footer-2 a,
.absolute-footer a {
    color: #f4f9ff !important;
}

#footer a:hover,
#footer .menu li a:hover,
.footer-1 a:hover,
.footer-2 a:hover,
.absolute-footer a:hover {
    color: #ffd35a !important;
}

#footer .is-divider,
#footer .is-divider.small,
.absolute-footer,
.absolute-footer.dark {
    border-color: rgba(255, 211, 90, 0.28) !important;
}
