/*
Theme Name: CESFAM Norman Voullieme V2
Theme URI: https://cesfamnvoullieme.cl/
Author: CESFAM Dr. Norman Voullieme
Description: Tema institucional independiente con portada, accesos, programas y noticias.
Version: 0.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cesfam-nvoullieme
Tags: custom-logo, custom-menu, featured-images, news
*/
:root{--blue:#1266ac;--navy:#103754;--red:#ed3846;--ink:#203646;--muted:#536979;--pale:#f0f6fa;--line:#dce6ec;--white:#fff}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:24px}body{margin:0;color:var(--ink);background:white;font:16px/1.65 Arial,Helvetica,sans-serif}a{color:var(--blue);text-underline-offset:4px}img{max-width:100%;height:auto}button,input,textarea,select{font:inherit}button,.button,input[type=submit]{cursor:pointer}.container{width:min(1160px,calc(100% - 48px));margin-inline:auto}.topbar{background:var(--navy);color:white;font-size:12px;padding:8px 0;letter-spacing:.04em}.topbar .container{display:flex;justify-content:space-between}.site-header{background:white;border-bottom:1px solid var(--line)}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:116px}.identity{display:flex;align-items:center;gap:15px}.identity img{width:76px;height:76px;object-fit:contain;display:block}.brand{font-size:21px;font-weight:800;text-decoration:none;line-height:1.3;color:var(--blue)}.brand span{display:block;font-size:15px;color:var(--navy);font-weight:600}.menu{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:25px}.menu a{text-decoration:none;font-weight:600;color:var(--navy);display:block;padding:12px 0}.menu li{position:relative}.menu .sub-menu{display:none;position:absolute;z-index:5;min-width:200px;background:white;padding:10px 20px;box-shadow:0 8px 24px #10375422;list-style:none}.menu li:hover>.sub-menu,.menu li:focus-within>.sub-menu{display:block}.hero{background:linear-gradient(120deg,#edf5fb,#fff);border-bottom:1px solid var(--line);padding:52px 0 0}.hero-copy{max-width:780px;padding-bottom:32px}.eyebrow{font-size:12px;letter-spacing:.16em;font-weight:800;color:var(--blue);margin:0 0 12px}h1,h2,h3{color:var(--navy);line-height:1.16;margin:0 0 18px;overflow-wrap:anywhere}h1{font-size:clamp(36px,4.8vw,60px);letter-spacing:-.04em;max-width:820px}h2{font-size:clamp(28px,3vw,38px);letter-spacing:-.025em}h3{font-size:23px}.lead{font-size:19px;max-width:640px;color:var(--muted);margin:20px 0 26px}.button,button,input[type=submit]{display:inline-flex;gap:28px;background:var(--blue);border:0;color:white;padding:13px 21px;border-radius:5px;font-weight:700;text-decoration:none}.button:hover,button:hover{background:var(--navy)}.facility{margin:0;position:relative;border-top:4px solid var(--red);background:white}.facility img{display:block;width:100%;height:auto}.facility figcaption{font-size:12px;padding:8px 14px;color:var(--muted);background:white}.section{padding-block:64px}.pathways{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin-top:30px}.pathway{padding:26px;border:1px solid var(--line);border-top:4px solid var(--blue);border-radius:7px;background:white}.pathway:nth-child(3){border-top-color:var(--red)}.number{display:block;color:var(--blue);font-size:13px;letter-spacing:.12em;font-weight:bold;margin-bottom:22px}.pathway p{color:var(--muted);min-height:54px}.text-link{font-weight:700;text-decoration:none}.pending{display:block;color:var(--ink)}.pending small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:5px}.quick-band{background:var(--navy);padding:30px 0 36px}.quick-band h2{font-size:23px;color:white}.quick-links{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.quick-link{padding:17px;background:#ffffff0d;border:1px solid #ffffff40;border-radius:5px;font-weight:700;text-decoration:none;color:white}.quick-link.pending,.quick-link.pending small{color:white}.section-intro{color:var(--muted);margin:0 0 28px}.program-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.program{border:1px solid var(--line);border-radius:6px;background:var(--pale)}.program-link{display:block;padding:24px;text-decoration:none;font-weight:700}.news-section{background:var(--pale)}.news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:28px}.news-card{background:white;border:1px solid var(--line);border-radius:6px;overflow:hidden}.thumbnail{display:block}.thumbnail img{display:block;aspect-ratio:16/9;object-fit:cover;width:100%}.card-content{padding:24px}.card-content time,.post-date{font-size:12px;color:var(--muted)}.card-content h3{margin-top:12px;font-size:22px}.card-content h3 a{text-decoration:none}.card-content p{color:var(--muted)}.empty-state{grid-column:1/-1;padding:28px;background:white;border-left:3px solid var(--blue)}.site-footer{background:var(--navy);color:white;padding-top:42px;font-size:14px}.site-footer a,.site-footer .pending,.site-footer .pending small{color:white}.footer-grid{display:grid;grid-template-columns:2fr 1fr;gap:30px}.footer-grid strong{font-size:20px}.footer-bottom{border-top:1px solid #ffffff30;padding-block:20px;margin-top:28px;font-size:12px}.reading-width{max-width:860px;min-height:55vh}.entry-content{overflow-wrap:anywhere}.entry-content h2,.entry-content h3{margin-top:1.5em}.entry-content iframe{max-width:100%}.entry-content table{border-collapse:collapse;display:block;overflow-x:auto;max-width:100%}.entry-content td,.entry-content th{padding:10px;border:1px solid var(--line)}blockquote{border-left:4px solid var(--blue);padding-left:20px;margin-left:0}.aligncenter{display:block;margin-inline:auto}.alignleft{float:left;margin:0 24px 16px 0}.alignright{float:right;margin:0 0 16px 24px}.wp-caption{max-width:100%}.wp-caption-text,.gallery-caption{font-size:13px;color:var(--muted)}.sticky{border-top:3px solid var(--blue)}.bypostauthor{border-left:2px solid var(--blue)}.entry-content:after{content:'';display:table;clear:both}.nav-links{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;margin-top:30px}.page-numbers{padding:8px 12px}.search-form{display:flex;gap:12px;align-items:end;flex-wrap:wrap}input:not([type=checkbox]),textarea,select{max-width:100%;border:1px solid #8da3b2;border-radius:4px;padding:10px}input[type=search]{display:block;width:100%}textarea{width:100%}.comment-form label{display:block}.comments-area{margin-top:50px}.comment-list{padding-left:22px}.menu-toggle{display:none}.screen-reader-text,.skip-link{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip-link:focus{clip:auto;width:auto;height:auto;margin:12px;padding:12px;background:white;z-index:100000}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #d52e3d;outline-offset:4px}a:hover{text-decoration:underline}
@media(max-width:860px){.header-inner{flex-wrap:wrap;padding-block:18px;gap:15px}.has-js .menu-toggle{display:block}.has-js #primary-navigation{display:none}.has-js #primary-navigation.is-open{display:block}#primary-navigation{width:100%}.menu{align-items:stretch;gap:0;flex-direction:column}.menu .sub-menu{display:block;position:static;box-shadow:none;padding-left:20px}.pathways{gap:14px}.pathway{padding:20px}.quick-links{grid-template-columns:repeat(3,minmax(0,1fr))}.news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{padding-top:36px}}
@media(max-width:600px){.container{width:calc(100% - 32px)}.topbar span{display:none}.identity img{width:58px;height:58px}.brand{font-size:18px}.brand span{font-size:12px}.menu-toggle{padding:9px 12px}.section{padding-block:42px}.pathways,.program-grid,.news-grid,.footer-grid{grid-template-columns:1fr}.quick-links{grid-template-columns:repeat(2,minmax(0,1fr))}.pathway p{min-height:0}.hero-copy{padding-bottom:24px}.facility figcaption{font-size:11px}.lead{font-size:17px}.alignleft,.alignright{float:none;margin-inline:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{.topbar,nav,.menu-toggle,.site-footer{display:none}.hero,.news-section{background:white}.container{width:100%}.section{padding-block:20px}}


/* Version 2: institutional reference layout. */
body{font-size:1rem;line-height:1.4;color:#073666}h1{font-size:clamp(2rem,4.1vw,3.3rem);letter-spacing:-.025em}h2{font-size:1.65rem}h3{font-size:1.15rem}.container{width:min(1200px,calc(100% - 64px))}.site-header{border-top:20px solid var(--blue)}.masthead{display:flex;justify-content:space-between;align-items:center;gap:25px;padding-block:22px}.identity{text-decoration:none;gap:22px}.identity img{width:112px;height:112px}.brand{font-size:1.65rem;line-height:1.04}.brand strong{display:block;font-size:1.9rem}.brand .location{color:var(--blue);font-size:1.3rem;font-weight:400}.brand small{display:block;font-size:.78rem;letter-spacing:.13em;margin-top:8px}.header-tools{width:310px;flex-shrink:0}.utility{display:flex;justify-content:flex-end;align-items:center;gap:14px;font-size:.75rem;margin-bottom:24px}.utility button{padding:2px;background:none;color:var(--navy)}.search-form{display:flex;flex-wrap:nowrap;gap:0;background:#f7fbff;border:1px solid #b7cfe4;border-radius:8px;padding:2px 8px;align-items:center}.search-form label{flex:1;min-width:0}.search-form input[type=search]{border:0;background:transparent;font-size:.85rem;outline-offset:0}.search-form button{background:none;color:var(--blue);padding:5px}.nav-band{background:linear-gradient(100deg,#006cb3,#005493)}.menu{justify-content:space-between;gap:12px}.menu a{color:white;font-size:.95rem;font-weight:400;padding:14px 8px}.menu li:hover{background:#ffffff15}.menu .sub-menu a{color:var(--navy)}.hero{padding:25px 0 0;background:linear-gradient(120deg,#eff8ff,#e4f4fb 70%,#fff);border:0}.hero-grid{display:grid;grid-template-columns:38% 62%;align-items:center;min-height:260px}.hero-copy{padding:12px 0 20px;z-index:1}.hero-copy h1{margin-bottom:12px}.hero-copy>p{font-size:1rem;line-height:1.55;margin:0;max-width:370px}.motto,.hero-copy>.motto{font:italic 1.5rem/1.3 Georgia,serif;color:var(--blue);margin-top:22px}.hero-copy>.motto:after{content:'';display:block;background:var(--red);width:135px;height:3px;transform:rotate(-4deg);margin:4px 0 0 110px}.building{overflow:hidden;border-radius:140px 0 0 140px;align-self:center;background:#e5f2f9}.building img{display:block}.building.source-crop img{width:166%;max-width:none;margin-left:-66%;height:auto}.building.custom-image img{width:100%;height:260px;object-fit:cover}.values{display:flex;justify-content:flex-end;gap:0;padding:12px 0}.icon{width:34px;height:34px;flex-shrink:0;color:var(--blue)}.values .tile{display:flex;align-items:center;gap:10px;border:0;border-right:1px solid #9db8cf;border-radius:0;padding:0 20px;max-width:180px;font-size:.75rem;background:transparent}.values .icon{width:28px;height:28px}.values .tile:last-child{border-right:0}.tile{color:var(--navy);text-decoration:none;border:1px solid #e0e9f0;border-radius:9px;background:linear-gradient(#fff,#fcfdff)}.tile strong{display:block;font-size:1rem;line-height:1.2}.tile span{display:block;font-size:.8rem;line-height:1.4;margin-top:7px}.tile .arrow{margin-left:auto}.pathways{margin-top:6px;gap:16px}.pathways .tile{padding:23px 25px;display:flex;align-items:center;gap:22px;min-height:127px;box-shadow:0 4px 8px #12375408}.pathways .tile strong{font-size:1.35rem}.pathways .icon{width:46px;height:46px}.tone-blue{background:linear-gradient(125deg,#159ae3,var(--blue));color:white}.tone-red{background:linear-gradient(125deg,#ff3541,var(--red));color:white}.tone-blue .icon,.tone-red .icon{color:white}.section{padding-block:17px}.section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:18px;margin:8px 0 12px}.section-heading h2{margin:0}.section-heading>a{font-size:.8rem;text-decoration:none}.quick-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.program-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.quick-grid .tile,.program-grid .tile{text-align:center;padding:17px 10px;display:flex;flex-direction:column;align-items:center;gap:10px}.program-grid .tile strong{font-size:.85rem}.program-grid .tile span{font-size:.75rem}.program-grid .tile:nth-child(3n+1) .icon{color:var(--red)}.program-grid .tile:nth-child(3n) .icon{color:#009450}.news-layout{display:grid;grid-template-columns:2.1fr 1fr;gap:24px;padding-bottom:35px}.news-grid{margin-top:0;gap:13px}.news-card{border-radius:7px}.card-content{padding:13px}.card-content h3{font-size:.95rem;margin-top:8px}.card-content p,.card-content .text-link{font-size:.8rem}.card-content time{font-size:.68rem}.notice-panel{background:#edf7ff;padding:17px 14px;border-radius:8px;margin-top:8px;align-self:start;min-height:125px}.notice-panel h2{font-size:1.25rem;display:flex;gap:10px;align-items:center}.notice-panel h2 .icon{color:var(--red);width:26px}.notice-list .tile{display:flex;align-items:center;gap:8px;padding:9px 10px;margin:6px 0;border:0}.notice-list .tile strong{font-size:.8rem;font-weight:400}.notice-list .icon{width:16px;height:16px}.phone-box{display:flex;align-items:center;gap:12px;background:white;padding:13px;border-radius:8px;margin-top:12px;font-size:.8rem}.phone-box strong{display:block;font-size:1rem}.empty-state{font-size:.9rem;margin:0;border-radius:7px;border:1px solid var(--line);padding:26px}.site-footer{background:linear-gradient(110deg,#00497c,#06436c);padding:25px 0}.footer-grid{grid-template-columns:2fr 1.8fr .6fr 1fr;gap:22px;align-items:center}.footer-brand{display:flex;align-items:center;gap:16px}.footer-brand img{width:90px;height:90px}.footer-brand strong{font-size:1rem}.footer-brand p{margin:5px 0}.footer-brand small{font-size:.75rem}.contact-list p{display:flex;align-items:center;gap:10px;font-size:.8rem;margin:10px 0}.contact-list .icon{width:19px;height:19px;color:white}.site-footer .motto{font-size:1.35rem;color:white;margin:0}.social-list .tile{display:block;background:none;border:0;color:white;padding:7px}.social-list .icon{display:none}.social-list .tile strong{font-size:.8rem}.footer-bottom{background:#edf6fc;margin:0;border:0;color:var(--blue);font-size:.7rem;padding:18px 0}.footer-bottom>.container{display:flex;justify-content:space-between;gap:20px}.footer-bottom .menu a{color:var(--blue);font-size:.75rem;padding:0}.footer-bottom nav{display:flex;gap:15px}.values .tile strong{font-size:.75rem}.reading-width{padding-block:45px}
@media(max-width:1000px){.brand strong{font-size:1.5rem}.header-tools{width:240px}.program-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pathways .tile{padding:18px 15px;gap:12px}.pathways .tile strong{font-size:1.1rem}.footer-grid{grid-template-columns:1fr 1fr}.hero-grid{grid-template-columns:42% 58%}.container{width:calc(100% - 40px)}}
@media(max-width:860px){.nav-band .container{padding-block:8px}.has-js .menu-toggle{background:#ffffff20}.menu .sub-menu{background:transparent}.menu .sub-menu a{color:white}.masthead{flex-wrap:wrap}.header-tools{width:100%;display:flex;align-items:center;justify-content:space-between;gap:20px}.utility{margin:0}.search-form{max-width:350px}.hero-grid{grid-template-columns:1fr 1fr}.hero-copy h1{font-size:2.3rem}.quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.news-layout{grid-template-columns:1fr}.news-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.values .tile{padding:0 12px}.values{justify-content:center}.pathways .icon{width:28px;height:28px}.pathways .tile{gap:10px}}
@media(max-width:600px){.container{width:calc(100% - 28px)}.masthead{padding-block:15px}.identity{gap:14px}.identity img{width:75px;height:75px}.brand{font-size:1.15rem}.brand strong{font-size:1.3rem}.brand .location{font-size:1rem}.brand small{font-size:.56rem}.header-tools{flex-direction:column;gap:10px;align-items:stretch}.utility{justify-content:flex-end}.search-form{max-width:none}.hero-grid{grid-template-columns:1fr}.hero-copy{padding:5px 0 14px}.hero-copy h1{max-width:310px}.hero-copy>.motto{margin-top:12px}.building{margin-bottom:15px}.building.custom-image img{height:190px}.values{display:grid;grid-template-columns:1fr 1fr;gap:12px}.values .tile{max-width:none;border:0;padding:0}.pathways{grid-template-columns:1fr;gap:10px}.pathways .tile{min-height:95px;padding:17px;gap:20px}.pathways .icon{width:40px;height:40px}.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.program-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.news-grid{grid-template-columns:1fr}.section-heading{align-items:start}.section-heading h2{font-size:1.45rem}.footer-grid{grid-template-columns:1fr}.footer-bottom>.container{flex-direction:column}.footer-bottom nav{flex-wrap:wrap}}

.footer-brand img{border-radius:50%}.building.source-crop{clip-path:inset(0 1.5% 0 0 round 140px 0 0 140px)}

.menu-instagram > a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white !important;
    font-weight: 700;
}

.instagram-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.menu-instagram > a:hover {
    opacity: 0.85;
}


/* ==========================================
   CESFAM V2 - SALUD MENTAL
   Diseno institucional responsive
   ========================================== */

.cnv-sm.section {
    padding-block: 38px 45px;
}

.cnv-sm__intro {
    margin-bottom: 22px;
}

.cnv-sm__eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: #267b82;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.cnv-sm__intro h2 {
    margin: 0 0 9px;
    color: #123b58;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.2;
}

.cnv-sm__intro p {
    margin: 0;
    color: #536a7a;
    line-height: 1.6;
}

.cnv-sm__banner {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
    gap: 20px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid #d8e9ed;
    border-radius: 22px;
    background: linear-gradient(125deg, #f1faf9, #e9f3fd);
}

.cnv-sm__main {
    position: relative;
    min-width: 0;
    padding: 15px 15px 70px 4px;
}

.cnv-sm__label {
    display: inline-block;
    margin-bottom: 13px;
    color: #267b82;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .07em;
}

.cnv-sm__main h3 {
    max-width: 550px;
    margin: 0 0 15px;
    color: #123b58;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.22;
}

.cnv-sm__main p {
    max-width: 570px;
    margin: 0 0 18px;
    color: #405b6e;
    font-size: .94rem;
    line-height: 1.7;
}

.cnv-sm__official {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #075b86;
    font-weight: 700;
    font-size: .87rem;
    text-decoration: none;
}

.cnv-sm__official:hover {
    text-decoration: underline;
}

.cnv-sm__decor {
    position: absolute;
    right: 0;
    bottom: -7px;
    width: 150px;
    opacity: .9;
    pointer-events: none;
}

.cnv-sm__decor svg {
    display: block;
    width: 100%;
    height: auto;
}

.cnv-sm__phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding: 27px;
    border-radius: 18px;
    background: #123b58;
    color: #fff;
}

.cnv-sm__phone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 13px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 30px;
}

.cnv-sm__phone small {
    color: #d3e9f1;
    font-size: .76rem;
}

.cnv-sm__phone strong {
    display: block;
    margin: 9px 0;
    color: #fff;
    font-size: clamp(2.6rem, 5vw, 3.7rem);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.cnv-sm__phone p {
    margin: 0 0 22px;
    color: #edf7fb;
    font-size: .9rem;
    line-height: 1.65;
}

.cnv-sm__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 45px;
    padding: 11px 18px;
    border-radius: 11px;
    background: #fff;
    color: #123b58;
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.cnv-sm__call:hover {
    background: #dff4f1;
    transform: translateY(-2px);
}

.cnv-sm__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.cnv-sm__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 21px 18px;
    border: 1px solid #e2eaf0;
    border-radius: 17px;
    background: #fff;
    color: #123b58;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(18,59,88,.045);
    transition: transform .2s ease, box-shadow .2s ease;
}

a.cnv-sm__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(18,59,88,.1);
}

.cnv-sm__card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 49px;
    height: 49px;
    margin-bottom: 17px;
    border-radius: 15px;
}

.cnv-sm__card-icon svg {
    width: 25px;
    height: 25px;
}

.cnv-sm__card--rose .cnv-sm__card-icon {
    background: #fff0f1;
    color: #c45b72;
}

.cnv-sm__card--blue .cnv-sm__card-icon {
    background: #eaf4ff;
    color: #3479b4;
}

.cnv-sm__card--violet .cnv-sm__card-icon {
    background: #f2edff;
    color: #7b63b6;
}

.cnv-sm__card--teal .cnv-sm__card-icon {
    background: #e5f7f1;
    color: #268c79;
}

.cnv-sm__card h3 {
    margin: 0 0 10px;
    color: #123b58;
    font-size: 1rem;
    line-height: 1.3;
}

.cnv-sm__card p {
    margin: 0;
    color: #536a7a;
    font-size: .85rem;
    line-height: 1.6;
}

.cnv-sm__card-more {
    margin-top: auto;
    padding-top: 15px;
    color: #096b92;
    font-size: .82rem;
    font-weight: 800;
}

.cnv-sm__urgent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 19px;
    padding: 15px 17px;
    border: 1px solid #f3dfd6;
    border-radius: 12px;
    background: #fff8f5;
}

.cnv-sm__urgent > span {
    display: flex;
    flex: 0 0 23px;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #bc624a;
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
}

.cnv-sm__urgent p {
    margin: 0;
    color: #644f47;
    font-size: .82rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .cnv-sm__banner {
        grid-template-columns: 1fr;
    }

    .cnv-sm__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cnv-sm__main {
        padding-bottom: 55px;
    }
}

@media (max-width: 600px) {
    .cnv-sm.section {
        padding-block: 28px 34px;
    }

    .cnv-sm__banner {
        padding: 14px;
        gap: 12px;
        border-radius: 17px;
    }

    .cnv-sm__main {
        padding: 13px 8px 62px;
    }

    .cnv-sm__main h3 {
        font-size: 1.5rem;
    }

    .cnv-sm__decor {
        width: 115px;
    }

    .cnv-sm__phone {
        padding: 23px;
        border-radius: 15px;
    }

    .cnv-sm__cards {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .cnv-sm__card {
        padding: 17px;
    }

    .cnv-sm__card-icon {
        margin-bottom: 12px;
    }

    .cnv-sm__urgent {
        padding: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cnv-sm__call,
    .cnv-sm__card {
        transition: none;
    }
}


/* ==========================================
   SALUD MENTAL - CARRUSEL SOLO EN CELULAR
   ========================================== */

@media screen and (max-width: 767px) {

    .cnv-sm .cnv-sm__cards {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        gap: 12px !important;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        overflow-x: auto !important;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;

        padding: 8px 2px 18px;
        scrollbar-width: none;
    }

    .cnv-sm .cnv-sm__cards::-webkit-scrollbar {
        display: none;
    }

    .cnv-sm .cnv-sm__card {
        box-sizing: border-box;
        flex: 0 0 78% !important;
        width: 78% !important;
        max-width: 290px;
        min-width: 0;

        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .cnv-sm .cnv-sm__card h3 {
        font-size: 1rem;
    }

    .cnv-sm .cnv-sm__card p {
        font-size: .88rem;
        line-height: 1.6;
    }
}


/* Fin de seccion salud mental */

/* ==========================================================
   CESFAM DR. NORMAN VOULLIEME
   HISTORIAS DE SALUD - CARRUSEL RESPONSIVO
   Compatible con historias-salud.php
   ========================================================== */

/* SECCION GENERAL */

.cnv-stories.section {
    padding-block: 25px 35px;
    min-width: 0;
}

.cnv-stories__intro {
    margin: 0 0 18px;
    color: var(--muted, #536979);
    font-size: .95rem;
    line-height: 1.5;
}

/* CONTENEDOR DEL CARRUSEL */

.cnv-stories__carousel-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

/* DESPLAZAMIENTO HORIZONTAL */

.cnv-stories__carousel-wrap .cnv-stories__grid {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 16px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;

    padding: 8px 4px 18px;
}

.cnv-stories__carousel-wrap .cnv-stories__grid::-webkit-scrollbar {
    display: none;
}

/* TARJETAS VERTICALES */

.cnv-stories__carousel-wrap .cnv-stories__card {
    flex: 0 0 195px;
    min-width: 0;

    scroll-snap-align: start;

    border: 1px solid var(--line, #dce6ec);
    border-radius: 15px;

    background: #fff;
    overflow: hidden;

    box-shadow: 0 4px 12px rgba(16, 55, 84, .09);

    transition:
        box-shadow .2s ease,
        transform .2s ease;
}

.cnv-stories__link {
    display: block;
    height: 100%;

    color: var(--navy, #103754);
    text-decoration: none;
}

/* PORTADAS 9:16 */

.cnv-stories__poster,
.cnv-stories__placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

.cnv-stories__placeholder {
    display: flex;
    justify-content: center;
    align-items: center;

    background: #eaf4fc;
    color: var(--blue, #1266ac);

    font-weight: 800;
}

/* TITULOS Y CONTENIDO */

.cnv-stories__content {
    padding: 12px 13px 14px;
}

.cnv-stories__content h3 {
    margin: 0 0 8px;

    font-size: .9rem;
    line-height: 1.35;
    font-weight: 700;

    color: var(--navy, #103754);
}

.cnv-stories__content span {
    font-size: .8rem;
    font-weight: 700;
    color: var(--blue, #1266ac);
}

/* INTERACCION */

@media (hover: hover) and (pointer: fine) {
    .cnv-stories__card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(16, 55, 84, .16);
    }
}

.cnv-stories__link:focus-visible {
    outline: 3px solid var(--red, #ed3846);
    outline-offset: -3px;
}

/* FLECHAS PARA COMPUTADORES */

.cnv-stories__arrow {
    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #c8dce9;
    border-radius: 50%;

    background: #fff;
    color: var(--blue, #1266ac);

    font-size: 20px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;
}

.cnv-stories__arrow:hover {
    background: var(--blue, #1266ac);
    color: #fff;
}

/* TABLET */

@media (max-width: 900px) {
    .cnv-stories__carousel-wrap {
        gap: 8px;
    }

    .cnv-stories__carousel-wrap .cnv-stories__card {
        flex-basis: 180px;
    }

    .cnv-stories__carousel-wrap .cnv-stories__grid {
        gap: 14px;
    }
}

/* CELULARES - CARRUSEL TACTIL */

@media (max-width: 600px) {

    .cnv-stories.section {
        padding-block: 20px 28px;
    }

    .cnv-stories__intro {
        margin-bottom: 12px;
        font-size: .88rem;
    }

    .cnv-stories__carousel-wrap {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .cnv-stories__carousel-wrap .cnv-stories__grid {
        display: flex;
        width: 100%;
        flex: none;

        gap: 12px;

        padding: 8px 4px 16px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 4px;

        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }

    .cnv-stories__carousel-wrap .cnv-stories__card {
        flex: 0 0 72%;
        max-width: 280px;

        scroll-snap-align: start;

        border-radius: 16px;
    }

    .cnv-stories__content {
        padding: 11px 12px 13px;
    }

    .cnv-stories__content h3 {
        font-size: .88rem;
        line-height: 1.35;
    }

    .cnv-stories__content span {
        font-size: .76rem;
    }

    /* Navegacion mediante deslizamiento */
    .cnv-stories__arrow {
        display: none;
    }
}

/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {

    .cnv-stories__carousel-wrap .cnv-stories__grid {
        scroll-behavior: auto;
    }

    .cnv-stories__card,
    .cnv-stories__arrow {
        transition: none;
    }
}

/* CORRECCION MOVIL - CARRUSEL HISTORIAS */

@media screen and (max-width: 767px) {

    .cnv-stories__carousel-wrap {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .cnv-stories__carousel-wrap .cnv-stories__grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 8px 4px 16px !important;
    }

    .cnv-stories__carousel-wrap .cnv-stories__card {
        display: block !important;
        flex: 0 0 72% !important;
        width: 72% !important;
        max-width: 280px !important;
        min-width: 0 !important;
        scroll-snap-align: start;
    }

    .cnv-stories__carousel-wrap .cnv-stories__poster {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 9 / 16;
        object-fit: cover;
    }

    .cnv-stories__carousel-wrap .cnv-stories__arrow {
        display: none !important;
    }

    .cnv-stories__carousel-wrap .cnv-stories__content h3 {
        font-size: .85rem !important;
        line-height: 1.35 !important;
    }
}
