/*
Theme Name: TPREPARA
Theme URI: https://tprepara.cl
Author: TPREPARA OTEC
Description: Tema oficial TPREPARA - Organismo Tecnico de Capacitacion.
Version: 3.0.0
License: GNU General Public License v2 or later
Text Domain: tprepara
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800;900&family=Source+Sans+3:wght@400;600;700&display=swap');

:root{
  --teal:#11B5BD;--teal-dk:#0E9298;--navy:#3C3B59;--dark:#222439;
  --white:#fff;--light:#F0FAFA;--gray:#F4F6F9;
  --text:#2D2D44;--muted:#6B6B82;--border:#D4EEF0;
  --r:10px;--rl:18px;
  --sh:0 2px 12px rgba(17,181,189,.12);
  --shm:0 6px 28px rgba(17,181,189,.18);
  --fh:'Nunito',sans-serif;
  --fb:'Source Sans 3','Segoe UI',sans-serif;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--fb);color:var(--text);background:var(--gray);line-height:1.75}
img{max-width:100%;height:auto;display:block}
a{color:var(--teal);text-decoration:none}
a:hover{color:var(--teal-dk)}
ul{list-style:none}
h1,h2,h3,h4,h5,h6{font-family:var(--fh);color:var(--navy);line-height:1.25;font-weight:800}
p{margin-bottom:1rem}
p:last-child{margin-bottom:0}

/* LAYOUT */
.wrap{max-width:1180px;margin:0 auto;padding:0 24px}
.site-wrapper{display:flex;flex-direction:column;min-height:100vh}
.site-main{flex:1}
.layout-sidebar{display:grid;grid-template-columns:1fr 300px;gap:40px;padding:48px 0}
.layout-full{padding:48px 0}

/* TOPBAR */
.topbar{background:var(--dark);color:rgba(255,255,255,.65);font-size:12.5px;padding:7px 0}
.topbar-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px}
.topbar-group{display:flex;gap:20px;align-items:center}
.topbar a{color:rgba(255,255,255,.65)}
.topbar a:hover{color:var(--teal)}

/* HEADER */
.site-header{background:var(--white);border-bottom:3px solid var(--teal);box-shadow:0 2px 16px rgba(17,181,189,.12);position:sticky;top:0;z-index:999}
.header-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;gap:20px;position:relative}
.site-logo{display:flex;align-items:center;gap:12px}
.site-logo img{height:60px;width:auto}
.logo-text{display:flex;flex-direction:column;line-height:1.1}
.logo-name{font-family:var(--fh);font-size:26px;font-weight:900;color:var(--teal);letter-spacing:-1px}
.logo-tag{font-family:var(--fh);font-size:9px;font-weight:700;color:var(--navy);letter-spacing:2px;text-transform:uppercase}

/* NAV */
.main-nav ul{display:flex;gap:2px;align-items:center;flex-wrap:wrap}
.main-nav li{position:relative}
.main-nav a{display:block;padding:9px 14px;font-family:var(--fh);font-weight:700;font-size:13.5px;color:var(--navy);border-radius:var(--r);white-space:nowrap;transition:background .2s,color .2s}
.main-nav a:hover,.main-nav .current-menu-item>a{background:var(--light);color:var(--teal)}
.main-nav .menu-cta>a{background:var(--teal);color:var(--white)!important;border-radius:24px;padding:9px 20px;box-shadow:0 4px 14px rgba(17,181,189,.35)}
.main-nav .menu-cta>a:hover{background:var(--teal-dk)}
.main-nav li ul{display:none;position:absolute;top:calc(100% + 6px);left:0;background:var(--white);border-radius:var(--r);box-shadow:var(--shm);min-width:210px;padding:6px;border-top:3px solid var(--teal);z-index:200;flex-direction:column}
.main-nav li:hover>ul{display:flex}
.main-nav li ul a{font-size:13px;padding:8px 12px;color:var(--text);border-radius:7px}
.main-nav li ul a:hover{background:var(--light);color:var(--teal)}
.nav-toggle{display:none;background:none;border:2px solid var(--teal);border-radius:8px;color:var(--teal);padding:7px 10px;cursor:pointer;font-size:18px;line-height:1}

/* BOTONES */
.btn{display:inline-flex;align-items:center;gap:7px;padding:13px 26px;border-radius:28px;font-family:var(--fh);font-weight:800;font-size:14px;border:none;cursor:pointer;text-decoration:none;transition:transform .2s,box-shadow .2s,background .2s}
.btn-primary{background:var(--teal);color:var(--white);box-shadow:0 6px 22px rgba(17,181,189,.4)}
.btn-primary:hover{background:var(--teal-dk);color:var(--white);transform:translateY(-2px)}
.btn-outline{background:transparent;color:var(--white);border:2px solid rgba(255,255,255,.35)}
.btn-outline:hover{border-color:var(--teal);color:var(--teal)}
.btn-teal{background:var(--teal);color:var(--white)}
.btn-teal:hover{background:var(--teal-dk);color:var(--white)}

/* HERO */
.hero{background:linear-gradient(135deg,var(--dark) 0%,var(--navy) 55%,#05393B 100%);color:var(--white);padding:80px 0 70px;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 75% 40%,rgba(17,181,189,.2) 0%,transparent 60%);pointer-events:none}
.hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center;position:relative;z-index:1}
.hero-badge{display:inline-block;background:rgba(17,181,189,.18);border:1px solid rgba(17,181,189,.4);color:var(--teal);font-size:11px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase;padding:5px 14px;border-radius:24px;margin-bottom:18px}
.hero h1{color:var(--white);font-size:42px;font-weight:900;line-height:1.12;margin-bottom:18px}
.hero h1 em{color:var(--teal);font-style:normal}
.hero-lead{color:rgba(255,255,255,.75);font-size:16px;margin-bottom:32px}
.hero-btns{display:flex;gap:14px;flex-wrap:wrap}
.hero-stats{display:flex;gap:36px;margin-top:44px;padding-top:36px;border-top:1px solid rgba(255,255,255,.1)}
.stat-num{font-family:var(--fh);font-size:28px;font-weight:900;color:var(--teal);line-height:1}
.stat-lbl{font-size:11px;color:rgba(255,255,255,.48);margin-top:3px}
.hero-visual{background:rgba(17,181,189,.1);border:1px solid rgba(17,181,189,.2);border-radius:var(--rl);min-height:320px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.hero-visual img{width:100%;height:100%;object-fit:cover}

/* SECCIONES */
.section{padding:68px 0}
.section-white{background:var(--white)}
.section-gray{background:var(--gray)}
.sec-head{text-align:center;margin-bottom:48px}
.sec-label{display:inline-block;background:rgba(17,181,189,.1);color:var(--teal);font-size:11px;font-weight:800;letter-spacing:2px;text-transform:uppercase;padding:4px 14px;border-radius:24px;margin-bottom:10px}
.sec-head h2{font-size:32px;margin-bottom:12px}
.sec-head p{color:var(--muted);max-width:520px;margin:0 auto;font-size:15px}

/* GRILLAS */
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.grid-5{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}

/* CARD BASE */
.card{background:var(--white);border-radius:var(--rl);border:1px solid var(--border);box-shadow:var(--sh);transition:transform .25s,box-shadow .25s,border-color .25s}
.card:hover{transform:translateY(-5px);box-shadow:var(--shm);border-color:var(--teal)}

/* FEATURE CARDS */
.feat-card{padding:32px 24px;text-align:center}
.feat-icon{width:60px;height:60px;background:linear-gradient(135deg,var(--teal),var(--teal-dk));border-radius:14px;display:flex;align-items:center;justify-content:center;margin:0 auto 18px;font-size:24px;box-shadow:0 8px 20px rgba(17,181,189,.28)}
.feat-card h3{font-size:15px;margin-bottom:8px}
.feat-card p{font-size:13px;color:var(--muted);margin:0}

/* CURSOS */
.course-card{overflow:hidden}
.course-thumb{height:150px;background:linear-gradient(135deg,var(--navy) 0%,#05393B 100%);position:relative;display:flex;align-items:flex-end;padding:14px}
.course-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.6}
.course-badge{position:relative;z-index:1;background:var(--teal);color:var(--white);font-size:10px;font-weight:800;padding:3px 10px;border-radius:16px}
.course-body{padding:20px}
.course-body h3{font-size:14px;font-weight:800;margin-bottom:8px;line-height:1.35;color:var(--navy)}
.course-body p{font-size:12.5px;color:var(--muted);margin-bottom:14px}
.course-foot{display:flex;justify-content:space-between;align-items:center}
.course-foot a{font-size:13px;font-weight:700;color:var(--teal)}
.course-tag{font-size:10.5px;font-weight:700;background:var(--light);color:var(--teal-dk);padding:2px 9px;border-radius:14px}

/* CLIENTES */
.client-box{background:var(--white);border:1px solid var(--border);border-radius:var(--r);padding:16px 12px;display:flex;align-items:center;justify-content:center;min-height:78px;font-family:var(--fh);font-weight:800;font-size:12px;color:var(--navy);text-align:center;transition:border-color .2s,box-shadow .2s}
.client-box:hover{border-color:var(--teal);box-shadow:var(--sh)}

/* BLOG */
.posts-stack{display:flex;flex-direction:column;gap:24px}
.post-card{display:grid;grid-template-columns:240px 1fr}
.post-thumb{background:linear-gradient(135deg,var(--navy),#05393B);position:relative;overflow:hidden;min-height:150px}
.post-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.post-body{padding:24px 28px;display:flex;flex-direction:column;justify-content:center}
.post-cat{display:inline-block;background:var(--light);color:var(--teal);font-size:10.5px;font-weight:800;padding:2px 10px;border-radius:14px;margin-bottom:10px}
.post-date{font-size:11.5px;color:var(--muted);margin-bottom:8px}
.post-body h2{font-size:17px;margin-bottom:8px}
.post-body h2 a{color:var(--navy)}
.post-body h2 a:hover{color:var(--teal)}
.post-body p{font-size:13.5px;color:var(--muted);margin-bottom:14px}
.read-more{font-size:13px;font-weight:700;color:var(--teal)}

/* SIDEBAR */
.sidebar{display:flex;flex-direction:column;gap:22px}
.widget{background:var(--white);border-radius:var(--rl);border:1px solid var(--border);box-shadow:var(--sh);padding:22px}
.widget-title{font-size:14px;font-weight:800;color:var(--navy);margin-bottom:16px;padding-bottom:10px;border-bottom:2px solid var(--teal)}
.search-wrap{display:flex}
.search-wrap input{flex:1;padding:9px 13px;border:2px solid var(--border);border-right:none;border-radius:var(--r) 0 0 var(--r);font-family:var(--fb);font-size:13px;color:var(--text);outline:none}
.search-wrap input:focus{border-color:var(--teal)}
.search-wrap button{background:var(--teal);color:var(--white);border:none;padding:9px 14px;border-radius:0 var(--r) var(--r) 0;cursor:pointer;font-size:14px}
.search-wrap button:hover{background:var(--teal-dk)}
.w-list li{padding:9px 0;border-bottom:1px solid var(--border)}
.w-list li:last-child{border:none;padding-bottom:0}
.w-list li a{font-size:13px;font-weight:600;color:var(--navy);line-height:1.4}
.w-list li a:hover{color:var(--teal)}
.w-sub{font-size:11px;color:var(--muted);margin-top:2px}
.cat-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}
.cat-row:last-child{border:none}
.cat-row a{font-size:13px;font-weight:600;color:var(--text)}
.cat-row a:hover{color:var(--teal)}
.cat-count{background:var(--light);color:var(--teal);font-size:10.5px;font-weight:800;padding:1px 8px;border-radius:12px}
.cline{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--navy);font-weight:600;margin-bottom:9px}
.cline:last-of-type{margin-bottom:0}
.cline a{color:var(--navy)}
.cline a:hover{color:var(--teal)}

/* ENTRY CONTENT */
.entry-header{margin-bottom:28px}
.entry-title{font-size:32px;margin-bottom:12px}
.entry-content{font-size:16px;line-height:1.85}
.entry-content h2,.entry-content h3{margin:2rem 0 1rem}
.entry-content p{margin-bottom:1.3rem}
.entry-content ul,.entry-content ol{padding-left:1.8rem;margin-bottom:1.3rem}
.entry-content ul{list-style:disc}
.entry-content ol{list-style:decimal}
.entry-content img{border-radius:var(--r);margin:1.5rem 0}
.entry-content blockquote{border-left:4px solid var(--teal);background:var(--light);border-radius:0 var(--r) var(--r) 0;padding:16px 22px;margin:1.5rem 0;font-style:italic;color:var(--navy)}
.entry-content a{color:var(--teal);text-decoration:underline}

/* BREADCRUMB */
.breadcrumb{background:var(--white);border-bottom:1px solid var(--border);padding:10px 0;font-size:12.5px;color:var(--muted)}
.breadcrumb a{color:var(--teal)}
.breadcrumb a:hover{color:var(--teal-dk)}

/* PAGINACION */
.pagination{display:flex;gap:6px;justify-content:center;margin-top:40px;flex-wrap:wrap}
.pagination a,.pagination span{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--r);font-weight:700;font-size:14px;border:2px solid var(--border);background:var(--white);color:var(--navy);transition:.2s}
.pagination a:hover,.pagination .current{background:var(--teal);border-color:var(--teal);color:var(--white)}

/* CTA BANNER */
.cta-banner{background:linear-gradient(135deg,var(--navy),var(--dark) 60%,#05393B);border-radius:var(--rl);padding:52px 44px;display:flex;align-items:center;justify-content:space-between;gap:28px;position:relative;overflow:hidden}
.cta-banner::after{content:'';position:absolute;right:-50px;top:-50px;width:240px;height:240px;border-radius:50%;background:rgba(17,181,189,.1);pointer-events:none}
.cta-text h2{color:var(--white);font-size:26px;margin-bottom:8px}
.cta-text p{color:rgba(255,255,255,.65);margin:0;font-size:14px}

/* FOOTER */
.site-footer{background:var(--dark);color:rgba(255,255,255,.6);padding-top:56px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;padding-bottom:40px;border-bottom:1px solid rgba(255,255,255,.07)}
.foot-name{font-family:var(--fh);font-size:22px;font-weight:900;color:var(--teal)}
.foot-tag{font-family:var(--fh);font-size:9px;font-weight:700;color:rgba(255,255,255,.35);letter-spacing:2px;text-transform:uppercase;margin-bottom:14px}
.foot-desc{font-size:13px;line-height:1.7;margin-bottom:18px}
.foot-socials{display:flex;gap:8px}
.soc-btn{width:36px;height:36px;border-radius:9px;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.5);font-size:14px;transition:background .2s,color .2s}
.soc-btn:hover{background:var(--teal);color:var(--white)}
.foot-col h4{color:var(--white);font-size:13px;font-weight:800;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid rgba(17,181,189,.28)}
.foot-links{display:flex;flex-direction:column;gap:9px}
.foot-links a{font-size:13px;color:rgba(255,255,255,.48);transition:color .2s,padding-left .2s}
.foot-links a:hover{color:var(--teal);padding-left:4px}
.foot-cline{display:flex;align-items:center;gap:9px;font-size:13px;margin-bottom:10px}
.foot-cline a{color:rgba(255,255,255,.5)}
.foot-cline a:hover{color:var(--teal)}
.footer-bottom{padding:16px 0;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;font-size:11.5px}
.footer-bottom a{color:var(--teal)}

/* RESPONSIVE */
@media(max-width:1024px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){
  .layout-sidebar{grid-template-columns:1fr}
  .post-card{grid-template-columns:1fr}
  .post-thumb{min-height:180px}
  .hero-grid{grid-template-columns:1fr}
  .hero-visual{display:none}
  .grid-3{grid-template-columns:1fr 1fr}
  .cta-banner{flex-direction:column;text-align:center}
}
@media(max-width:768px){
  .main-nav{display:none}
  .main-nav.open{display:block;position:absolute;left:0;right:0;top:100%;background:var(--white);box-shadow:var(--shm);border-top:1px solid var(--border)}
  .main-nav.open ul{flex-direction:column;padding:12px;gap:2px}
  .main-nav.open li ul{position:static;box-shadow:none;border:none;background:var(--light);margin-top:4px}
  .nav-toggle{display:block}
  .footer-grid{grid-template-columns:1fr}
  .grid-5{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:560px){
  .hero h1{font-size:28px}
  .hero-btns{flex-direction:column}
  .grid-3,.grid-4{grid-template-columns:1fr}
  .grid-5{grid-template-columns:repeat(2,1fr)}
  .cta-banner{padding:32px 20px}
  .wrap{padding:0 16px}
}
