/*
Theme Name: Charito WP Child
Theme URI: 		http://thememascot.net
Description: 	Charito WP Child Theme
Author: 		ThemeMascot Team
Author URI: 	http://themeforest.net/user/thememascot
Version: 		2.0
License: 		GNU General Public License v2 or later
License URI: 	http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 	charito-wp-child
Template: 		charito-wp
*/

/* =============================================
   NEWS PAGES — Add to child theme style.css
   ============================================= */

/* --- Override parent theme: remove sidebar, page title, fix width --- */
.post-type-archive-news #secondary,
.post-type-archive-news .widget-area,
.post-type-archive-news .sidebar,
.single-news #secondary,
.single-news .widget-area,
.single-news .sidebar {
    display: none !important;
}

.post-type-archive-news #primary,
.post-type-archive-news .content-area,
.single-news #primary,
.single-news .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide parent theme page header / title bar */
.post-type-archive-news .page-header,
.post-type-archive-news .entry-header,
.post-type-archive-news .page-title-area,
.post-type-archive-news .page-title-wrap,
.post-type-archive-news .entry-title,
.post-type-archive-news h1.page-title,
.single-news .page-header,
.single-news .page-title-area,
.single-news .page-title-wrap {
    display: none !important;
}

/* Remove extra padding from parent theme content wrappers */
.post-type-archive-news .site-content,
.single-news .site-content {
    padding-top: 0 !important;
}

/* =============================================
   NEWS ARCHIVE — Card Grid
   ============================================= */
.news-archive-section {
    padding: 50px 0 60px;
    background: #f7f8fa;
}

.news-archive-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-archive-header {
    margin-bottom: 35px;
}

.news-archive-header h1 {
    font-size: 1.9rem;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    font-weight: 700;
}

.news-archive-subtitle {
    font-size: 0.95rem;
    color: #777;
    margin: 0;
}

/* 3 Column Grid */
.news-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Individual Card */
.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Card Image — compact, fixed height */
.news-card-image-link {
    display: block;
    text-decoration: none;
}

.news-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e8e8e8;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0, #c8c8c8);
}

/* Card Body */
.news-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-date {
    font-size: 0.78rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.news-card-title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.news-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card-title a:hover {
    color: #0073aa;
}

.news-card-excerpt {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
}

.news-card-excerpt p {
    margin: 0;
}

.news-card-readmore {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: auto;
}

.news-card-readmore:hover {
    color: #005177;
}

/* Pagination */
.news-archive-pagination {
    margin-top: 45px;
    text-align: center;
}

.news-archive-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.news-archive-pagination a,
.news-archive-pagination span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

.news-archive-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.news-none {
    text-align: center;
    color: #888;
    padding: 60px 0;
}

/* =============================================
   RESPONSIVE — 2 cols on tablet, 1 on mobile
   ============================================= */
@media (max-width: 900px) {
    .news-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .news-card-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .news-archive-section {
        padding: 30px 0 40px;
    }

    .news-archive-header h1 {
        font-size: 1.5rem;
    }

    .news-card-image {
        height: 220px !important;
    }
}

/* =============================================
   SINGLE NEWS PAGE
   ============================================= */
.single-news-section {
    padding: 50px 0 60px;
}

.single-news-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-featured-image {
    margin-bottom: 28px;
    border-radius: 10px;
    overflow: hidden;
}

.news-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-title {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #1a1a1a;
    line-height: 1.3;
    font-weight: 700;
}

.news-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 28px;
}

.news-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

.news-content p {
    margin-bottom: 1.1em;
}

.news-back-link {
    margin-top: 45px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e5;
}

.news-back-link a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.news-back-link a:hover {
    color: #005177;
}

@media (max-width: 600px) {
    .news-title {
        font-size: 1.5rem;
    }

    .single-news-section {
        padding: 30px 0 40px;
    }
}

/* =============================================
   HOMEPAGE NEWS SHORTCODE (grid)
   ============================================= */
.homepage-news .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.homepage-news .news-box {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.homepage-news .news-box .news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-button-wrapper {
    text-align: center;
    margin-top: 30px;
}

.all-news-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.all-news-btn:hover {
    background: #005177;
}

@media (max-width: 768px) {
    .homepage-news .news-grid {
        grid-template-columns: 1fr;
    }
}

/* NEWS SECTION */
.homepage-news {
    padding: 40px 20px;
    background: #f8f9fa;
}

/* GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* CARD */
.news-box {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    padding: 15px;
}

.news-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

/* IMAGE */
.news-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* TITLE */
.news-box h3 {
    font-size: 20px;
    padding: 20px 0px 10px 0px;
    margin: 0;
    color: #1a1a1a;
}

/* TEXT */
.news-box p {
    /*padding: 0 20px;*/
    flex-grow: 1;
    color: #555;
    line-height: 1.6;
}

/* READ MORE BUTTON */
.read-more-btn {
    margin: 20px;
    padding: 6px;
    text-align: center;
    background: #d0383c; /* theme blue */
    color: #ffffff !important;
    text-decoration: none;
        font-size: 25px !important;
    border-radius: 40px !important;
}

.read-more-btn:hover, .read-more-btn a {
    text-decoration: none !important;
}

/* SE FLERE NYHETER BUTTON */
.news-button-wrapper {
    text-align: center;
    margin-top: 50px;
}

.all-news-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #d0383c; /* theme blue */
    color: #ffffff !important;
    text-decoration: none;
        font-size: 25px !important;
    border-radius: 40px !important;
}

.all-news-btn:hover, .all-news-btn a {
    text-decoration: none !important;
    
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.tm-sc.tm-sc-section-title.section-title.section-title-style1.text-center.lead.vc_custom_1770987686064 {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
}
#page-21481 > div > div > div.vc_row.wpb_row.vc_row-fluid.om-oss-section.vc-row-tm-section-padding > div > div > div > div:nth-child(1) > div > div > div > div.tm-sc.tm-sc-section-title.section-title.section-title-style1.text-center.lead {
    margin-bottom: 0 !important;
}

/* JESSHEIM TREATMENT SIDEBAR REDESIGN V1 */
#nav_menu-3,
#nav_menu-3 * {
    box-sizing: border-box;
}

#nav_menu-3 {
    --jst-sidebar-accent: #d0383c;
    --jst-sidebar-accent-soft: rgba(208, 56, 60, 0.09);
    --jst-sidebar-text: #17233f;
    --jst-sidebar-border: #e6e9ef;
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
    padding: clamp(12px, 1.5vw, 18px);
    background: #ffffff;
    border: 1px solid var(--jst-sidebar-border);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(23, 35, 63, 0.08);
    overflow: hidden;
}

#nav_menu-3 .widget-title {
    margin: 0 0 12px;
    color: var(--jst-sidebar-text);
    font-size: clamp(18px, 1.4vw, 22px);
    line-height: 1.25;
}

#nav_menu-3 .menu,
#nav_menu-3 ul {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

#nav_menu-3 .menu-item {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

#nav_menu-3 .menu-item + .menu-item {
    border-top: 1px solid #eef0f4;
}

#nav_menu-3 .menu-item > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--jst-sidebar-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: normal;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#nav_menu-3 .menu-item > a::before {
    display: none;
}

#nav_menu-3 .menu-item > a::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin: 0 3px 0 8px;
    border-top: 2px solid var(--jst-sidebar-accent);
    border-right: 2px solid var(--jst-sidebar-accent);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    #nav_menu-3 .menu-item > a:hover {
        background: var(--jst-sidebar-accent-soft);
        color: var(--jst-sidebar-accent);
        transform: translateX(2px);
    }

    #nav_menu-3 .menu-item > a:hover::after {
        transform: translateX(2px) rotate(45deg);
    }
}

#nav_menu-3 .current-menu-item > a,
#nav_menu-3 .current_page_item > a,
#nav_menu-3 a[aria-current="page"] {
    background: var(--jst-sidebar-accent-soft);
    color: var(--jst-sidebar-accent);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--jst-sidebar-accent);
}

#nav_menu-3 .menu-item > a:focus-visible {
    outline: 3px solid rgba(208, 56, 60, 0.25);
    outline-offset: 2px;
}

@media (max-width: 991px) {
    #nav_menu-3 {
        width: 100%;
        max-width: none;
        margin-bottom: 22px;
    }
}

@media (max-width: 767px) {
    #nav_menu-3 {
        padding: 12px;
        border-radius: 14px;
        box-shadow: 0 8px 22px rgba(23, 35, 63, 0.07);
    }

    #nav_menu-3 .menu-item > a {
        min-height: 46px;
        padding: 12px;
        gap: 10px;
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    #nav_menu-3 {
        padding: 10px;
        border-radius: 12px;
    }

    #nav_menu-3 .menu-item > a {
        padding: 11px 10px;
        font-size: 14.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #nav_menu-3 .menu-item > a,
    #nav_menu-3 .menu-item > a::after {
        transition: none;
    }

    #nav_menu-3 .menu-item > a:hover,
    #nav_menu-3 .menu-item > a:hover::after {
        transform: none;
    }
}

/* JESSHEIM TREATMENT SIDEBAR REDESIGN V1.1
   Fix duplicate theme arrows and replace clipped flyout menus
   with responsive inline submenus. */
#nav_menu-3 {
    position: relative;
    z-index: 20;
    overflow: visible !important;
}

#nav_menu-3 .menu,
#nav_menu-3 .menu-item {
    overflow: visible !important;
}

/* Remove the Charito theme's original left-side arrow/icon. */
#nav_menu-3 .menu-item::before,
#nav_menu-3 .menu-item::after,
#nav_menu-3 .menu-item > a::before {
    content: none !important;
    display: none !important;
}

#nav_menu-3 .menu-item > a > i,
#nav_menu-3 .menu-item > a > .fa,
#nav_menu-3 .menu-item > a > .fas,
#nav_menu-3 .menu-item > a > .far,
#nav_menu-3 .menu-item > a > .menu-arrow,
#nav_menu-3 .menu-item > a > .submenu-toggle {
    display: none !important;
}

/* Reset the V1 arrow on nested links, then keep one arrow on top-level rows. */
#nav_menu-3 .menu-item > a::after {
    content: none !important;
    display: none !important;
}

#menu-single-service-sidebar > .menu-item > a::after {
    content: "" !important;
    display: block !important;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin: 0 3px 0 8px;
    border: 0 !important;
    border-top: 2px solid var(--jst-sidebar-accent) !important;
    border-right: 2px solid var(--jst-sidebar-accent) !important;
    transform: rotate(45deg) !important;
}

/* Keep the row stable on hover; the old horizontal shift caused clipping. */
#nav_menu-3 .menu-item > a:hover,
#nav_menu-3 .menu-item > a:focus {
    transform: none !important;
}

#menu-single-service-sidebar > .menu-item > a:hover::after,
#menu-single-service-sidebar > .menu-item > a:focus::after {
    transform: rotate(45deg) !important;
}

/* Responsive inline submenu: no flyout over the page content. */
#nav_menu-3 .sub-menu {
    position: static !important;
    inset: auto !important;
    float: none !important;
    display: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 2px 8px 10px 18px !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#nav_menu-3 .menu-item:hover > .sub-menu,
#nav_menu-3 .menu-item:focus-within > .sub-menu,
#nav_menu-3 .current-menu-parent > .sub-menu,
#nav_menu-3 .current-menu-ancestor > .sub-menu,
#nav_menu-3 .current-menu-item.menu-item-has-children > .sub-menu {
    display: block !important;
}

#nav_menu-3 .sub-menu .menu-item {
    border: 0 !important;
}

#nav_menu-3 .sub-menu .menu-item + .menu-item {
    border-top: 1px solid rgba(23, 35, 63, 0.07) !important;
}

#nav_menu-3 .sub-menu .menu-item > a {
    min-height: 40px;
    padding: 9px 10px 9px 13px !important;
    border-radius: 8px;
    color: #46516a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    background: transparent;
    box-shadow: none;
}

#nav_menu-3 .sub-menu .menu-item > a:hover,
#nav_menu-3 .sub-menu .menu-item > a:focus-visible,
#nav_menu-3 .sub-menu .current-menu-item > a,
#nav_menu-3 .sub-menu .current_page_item > a,
#nav_menu-3 .sub-menu a[aria-current="page"] {
    color: var(--jst-sidebar-accent) !important;
    background: var(--jst-sidebar-accent-soft) !important;
    box-shadow: inset 3px 0 0 var(--jst-sidebar-accent) !important;
}

@media (max-width: 767px) {
    #nav_menu-3 .sub-menu {
        padding: 2px 4px 9px 12px !important;
    }

    #nav_menu-3 .sub-menu .menu-item > a {
        min-height: 44px;
        padding: 11px 10px 11px 12px !important;
        font-size: 14px;
        overflow-wrap: anywhere;
    }
}
/* END JESSHEIM TREATMENT SIDEBAR REDESIGN V1.1 */

/* JESSHEIM FOOTER OPENING HOURS ALIGNMENT */
#text-2 .textwidget p.mon,
#text-2 .textwidget p.tue,
#text-2 .textwidget p.wed,
#text-2 .textwidget p.thu,
#text-2 .textwidget p.fri {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    margin: 0;
    padding: 10px 0;
}

#text-2 .jt-opening-hours-day,
#text-2 .jt-opening-hours-time {
    display: block;
    line-height: 1.45;
}

#text-2 .jt-opening-hours-day {
    text-align: left;
}

#text-2 .jt-opening-hours-time {
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 767px) {
    #text-2 .textwidget p.mon,
    #text-2 .textwidget p.tue,
    #text-2 .textwidget p.wed,
    #text-2 .textwidget p.thu,
    #text-2 .textwidget p.fri {
        grid-template-columns: 92px minmax(0, 1fr);
        column-gap: 10px;
    }
}
/* END JESSHEIM FOOTER OPENING HOURS ALIGNMENT */

/* JESSHEIM SITE-WIDE RESPONSIVE REVIEW — 2026-08-06 */
/* Keep media and embedded content inside their columns at every breakpoint. */
.wpb_wrapper img,
.wpb_wrapper svg,
.wpb_wrapper video,
.wpb_wrapper iframe,
.entry-content img,
.entry-content video,
.entry-content iframe {
    max-width: 100%;
}

.wpb_wrapper img,
.entry-content img {
    height: auto;
}

/* Allow flex/grid/WPBakery children to shrink instead of creating horizontal overflow. */
.vc_column_container,
.vc_column-inner,
.wpb_wrapper,
.entry-content {
    min-width: 0;
}

/* Long links and headings should wrap safely on narrow screens. */
.entry-content a,
.wpb_text_column a,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.wpb_text_column h1,
.wpb_text_column h2,
.wpb_text_column h3 {
    overflow-wrap: break-word;
}

@media (max-width: 1024px) {
    /* Force the homepage hero name to remain exactly two lines:
       JESSHEIM / TANNLEGESENTER. */
    html body.home #page-21481 .jt-hero-heading {
        width: 100% !important;
        max-width: 100% !important;
        font-size: clamp(31px, 3.6vw, 38px) !important;
        line-height: 1.03 !important;
        letter-spacing: -1.15px !important;
    }

    html body.home #page-21481 .jt-hero-heading span {
        display: block !important;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    html body.home #page-21481 .jt-hero-copy {
        width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 767px) {
    html body.home #page-21481 .jt-hero-heading {
        font-size: clamp(29px, 8.8vw, 38px) !important;
        letter-spacing: -1.2px !important;
    }

    /* Form fields remain usable without overflowing the viewport. */
    .wpcf7-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    .wpcf7-form select,
    .wpcf7-form textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

@media (max-width: 420px) {
    html body.home #page-21481 .jt-hero-heading {
        font-size: clamp(28px, 8.5vw, 35px) !important;
        letter-spacing: -1.3px !important;
    }
}
/* END JESSHEIM SITE-WIDE RESPONSIVE REVIEW */

