/*
Theme Name:  Niva RealValidito
Theme URI:   https://www.realvalidito.com
Description: Child theme of Niva for RealValidito — performance & SEO optimised
Author:      RealValidito
Template:    niva
Version:     1.0.1
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: niva-realvalidito
*/

/* -------------------------------------------------------
   SELF-HOSTED POPPINS — eliminates Google Fonts DNS lookup
   & render-blocking external stylesheet
------------------------------------------------------- */

/* 300 — latin-ext */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/poppins-300-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* 300 — latin */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/poppins-300-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

/* 400 — latin-ext */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/poppins-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* 400 — latin */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/poppins-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

/* 500 — latin-ext */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/poppins-500-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* 500 — latin */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/poppins-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

/* 600 — latin-ext */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/poppins-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* 600 — latin */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/poppins-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

/* 700 — latin-ext */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/poppins-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* 700 — latin */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/poppins-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

/* Apply Poppins globally with system-font fallback stack */
body,
h1, h2, h3, h4, h5, h6,
p, a, li, td, th,
input, textarea, select, button {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* -------------------------------------------------------
   IMAGE RULES — prevent CLS
   Only constrain images without an explicit height
------------------------------------------------------- */
img:not([height]) {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Images with explicit width + height: respect those dimensions */
img[width][height] {
    max-width: 100%;
    display: block;
}

/* -------------------------------------------------------
   LOGO — prevent layout shift
------------------------------------------------------- */
.niva-logo img {
    width: auto;
    height: auto;
    max-height: 60px;
}

/* -------------------------------------------------------
   HERO / HEADER SLIDER — prevent CLS
   Reserve space before image loads so nothing jumps
------------------------------------------------------- */
.theme_header_slider,
.hero-section,
.mt-hero,
[class*="header-slider"] {
    min-height: 400px;
}

/* -------------------------------------------------------
   NAVIGATION — prevent CLS
------------------------------------------------------- */
#page .header-wrapper,
.site-header {
    min-height: 80px;
}

/* -------------------------------------------------------
   WPBAKERY CUSTOM HEADING — LCP element
   Ensure text renders immediately with fallback font
   while Poppins loads (font-display: swap handles this
   in @font-face above, but belt-and-suspenders here)
------------------------------------------------------- */
.vc_custom_heading,
.vc_do_custom_heading {
    font-display: swap;
}

/* -------------------------------------------------------
   ACCESSIBILITY — focus styles
------------------------------------------------------- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0069ff;
    outline-offset: 2px;
}


/* -------------------------------------------------------
   FONT AWESOME — force font-display swap
   Overrides parent theme font-awesome.min.css
   which loads fa-solid, fa-brands, fa-regular without swap
------------------------------------------------------- */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../niva/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../niva/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../niva/webfonts/fa-brands-400.woff2') format('woff2');
}
/* Also cover Font Awesome 5 naming used by some plugins */
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../niva/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../niva/webfonts/fa-brands-400.woff2') format('woff2');
}
/* Font Awesome — force font-display swap */
@font-face { font-family: 'Font Awesome 6 Free';   font-weight: 900; font-display: swap; src: url('../niva/webfonts/fa-solid-900.woff2') format('woff2'); }
@font-face { font-family: 'Font Awesome 6 Free';   font-weight: 400; font-display: swap; src: url('../niva/webfonts/fa-regular-400.woff2') format('woff2'); }
@font-face { font-family: 'Font Awesome 6 Brands'; font-weight: 400; font-display: swap; src: url('../niva/webfonts/fa-brands-400.woff2') format('woff2'); }
@font-face { font-family: 'Font Awesome 5 Free';   font-weight: 900; font-display: swap; src: url('../niva/webfonts/fa-solid-900.woff2') format('woff2'); }
@font-face { font-family: 'Font Awesome 5 Brands'; font-weight: 400; font-display: swap; src: url('../niva/webfonts/fa-brands-400.woff2') format('woff2'); }

/* -------------------------------------------------------
   FONT AWESOME — force font-display: swap
   Overrides parent theme font-awesome.min.css which loads
   fa-solid, fa-brands, fa-regular without font-display
------------------------------------------------------- */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../niva/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../niva/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../niva/webfonts/fa-brands-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../niva/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../niva/webfonts/fa-brands-400.woff2') format('woff2');
}

/* Fix: Remove white gap between logo and mobile menu */
@media (max-width: 767px) {
    #navbar.navbar-collapse {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    .navbar-default .navbar-collapse {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Fix: Remove white gap between logo and mobile menu */
@media (max-width: 767px) {
    #navbar.navbar-collapse {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    .navbar-default .navbar-collapse {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}


/* ===================================
   POST NAVIGATION - PREV/NEXT STYLES
   =================================== */
.post-navigation {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 40px 0 30px;
    border-top: 2px solid #ebedf5;
    padding-top: 30px;
    clear: both;
}
.prev-post,
.next-post {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9ff;
    border: 1px solid #ebedf5;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.prev-post {
    width: calc(50% - 5px);
    margin-right: 5px;
}
.next-post {
    width: calc(50% - 5px);
    margin-left: 5px;
}
.prev-post:hover,
.next-post:hover {
    background: #fff;
    border-color: #0069ff;
    box-shadow: 0 4px 15px rgba(0, 105, 255, 0.1);
}
.post-navigation .navigation-thumbnail {
    flex-shrink: 0;
}
.post-navigation .navigation-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.post-navigation .navigation-thumbnail a {
    display: block;
    line-height: 0;
}
.prev-post-content,
.next-post-content {
    flex: 1;
    min-width: 0;
}
.prev-post-content span,
.next-post-content span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0069ff;
    margin-bottom: 5px;
}
.prev-post-content a,
.next-post-content a {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    text-decoration: none;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.prev-post-content a:hover,
.next-post-content a:hover {
    color: #0069ff;
}
@media (max-width: 767px) {
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    .prev-post,
    .next-post {
        width: 100% !important;
        margin: 0 !important;
    }
}