/*
Theme Name: MyExpertServices Blog
Author: MyExpertServices
Description: Theme a medida del blog de MyExpertServices
Version: 1.0.0
Requires PHP: 7.4
Text Domain: myexpertservices-blog
*/

/* ==========================================================================
   Variables de marca
   ========================================================================== */
:root {
    --primary: #0097B2;
    --primary-dark: #007286;
    --secondary: #FEDD59;
    --text-dark: #041924;
    --text-light: #5B6B76;
    --bg-light: #E6F6FA;
    --bg-white: #F5FCFE;
    --gradient-1: linear-gradient(135deg, #0097B2 0%, #FEDD59 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --border: 1px solid rgba(4, 25, 36, 0.08);
}

/* ==========================================================================
   Base
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-white);
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal !important;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 32px; width: auto; object-fit: contain; }
.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-menu { display: flex; list-style: none; gap: 32px; align-items: center; }
.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); font-weight: 600; }

/* ==========================================================================
   Cabecera del blog
   ========================================================================== */
.site-main { padding: 140px 0 80px; min-height: 60vh; }
.blog-hero { margin-bottom: 48px; }
.section-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 151, 178, 0.08);
    color: var(--primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.blog-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 12px;
}
.blog-hero p { font-size: 18px; color: var(--text-light); max-width: 680px; line-height: 1.65; }

/* ==========================================================================
   Grid de tarjetas del listado
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(0, 151, 178, 0.15);
}
.post-card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-light); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-card-thumb img { transform: scale(1.03); }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.post-card-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.post-card h2 { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.post-card h2 a { color: var(--text-dark); text-decoration: none; transition: color 0.3s; }
.post-card h2 a:hover { color: var(--primary); }
.post-card-excerpt { font-size: 15px; color: var(--text-light); line-height: 1.65; margin-bottom: 16px; flex: 1; }
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s, gap 0.2s;
    margin-top: auto;
}
.read-more:hover { color: var(--primary-dark); gap: 10px; }

/* Estado vacio */
.no-posts {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-light);
    border: var(--border);
    border-radius: 16px;
}
.no-posts h2 { font-size: 26px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.5px; }
.no-posts p { font-size: 17px; color: var(--text-light); max-width: 480px; margin: 0 auto; }

/* ==========================================================================
   Paginacion
   ========================================================================== */
.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: var(--border);
    background: #fff;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
}
.pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-numbers.dots { border: none; background: transparent; color: var(--text-light); }

/* ==========================================================================
   Articulo (single / page)
   ========================================================================== */
.single-article { max-width: 780px; margin: 0 auto; }
.entry-header { margin-bottom: 32px; }
.entry-header h1 {
    font-size: clamp(30px, 4.5vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.entry-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-light); }
.entry-meta .meta-sep { color: rgba(4, 25, 36, 0.25); }
.entry-meta .meta-author { font-weight: 600; color: var(--text-dark); }
.entry-thumbnail { margin-bottom: 36px; }
.entry-thumbnail img { width: 100%; border-radius: 16px; box-shadow: var(--shadow-md); }

/* Tipografia de contenido */
.entry-content { font-size: 17px; line-height: 1.75; color: var(--text-dark); }
.entry-content > * + * { margin-top: 20px; }
.entry-content h2 {
    font-size: clamp(24px, 3.5vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-top: 44px;
    margin-bottom: 4px;
}
.entry-content h3 { font-size: 21px; font-weight: 700; line-height: 1.3; margin-top: 36px; margin-bottom: 2px; }
.entry-content h4 { font-size: 18px; font-weight: 600; margin-top: 28px; }
.entry-content a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(0, 151, 178, 0.35); text-underline-offset: 3px; transition: color 0.3s; }
.entry-content a:hover { color: var(--primary-dark); text-decoration-color: var(--primary-dark); }
.entry-content ul, .entry-content ol { padding-left: 26px; }
.entry-content li { margin-bottom: 10px; }
.entry-content li::marker { color: var(--primary); font-weight: 700; }
.entry-content blockquote {
    margin: 32px 0;
    padding: 20px 28px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    font-size: 18px;
    font-weight: 500;
}
.entry-content blockquote p { margin: 0; }
.entry-content blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--text-light); }
.entry-content img { border-radius: 12px; box-shadow: var(--shadow-sm); height: auto; }
.entry-content figure { margin: 32px 0; max-width: 100%; }
.entry-content figcaption { font-size: 14px; color: var(--text-light); text-align: center; margin-top: 10px; }
.entry-content pre {
    background: var(--text-dark);
    color: #E6F6FA;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
.entry-content code { background: rgba(0, 151, 178, 0.08); color: var(--primary-dark); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }
.entry-content pre code { background: transparent; color: inherit; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 15px; }
.entry-content th, .entry-content td { padding: 12px 14px; text-align: left; border-bottom: var(--border); }
.entry-content th { background: var(--bg-light); font-weight: 700; }
.entry-content hr { border: none; border-top: var(--border); margin: 40px 0; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignleft { float: left; margin: 6px 24px 16px 0; }
.entry-content .alignright { float: right; margin: 6px 0 16px 24px; }

/* Navegacion anterior / siguiente */
.post-navigation { margin-top: 56px; padding-top: 32px; border-top: var(--border); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a {
    display: block;
    padding: 18px 20px;
    background: #fff;
    border: var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.post-navigation a:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(0, 151, 178, 0.15);
}
.post-navigation .nav-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 6px;
}
.post-navigation .nav-next { text-align: right; }

/* Bloque CTA */
.article-cta {
    margin-top: 56px;
    padding: 40px 36px;
    border-radius: 16px;
    background: radial-gradient(circle at top left, rgba(255, 221, 89, 0.18) 0, transparent 45%), linear-gradient(180deg, #F5FCFE 0%, #E6F6FA 100%);
    border: var(--border);
    text-align: center;
}
.article-cta h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 10px; }
.article-cta p { font-size: 16px; color: var(--text-light); max-width: 520px; margin: 0 auto; }
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: 24px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--text-dark); color: #fff; padding: 64px 0 32px; }
.footer-content { display: grid; grid-template-columns: 2fr 3fr; gap: 64px; margin-bottom: 48px; }
.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 16px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-brand p { color: rgba(255, 255, 255, 0.7); line-height: 1.7; }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.footer-column h4 { font-size: 16px; margin-bottom: 16px; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 12px; }
.footer-column a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 14px; transition: color 0.3s; }
.footer-column a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom p { color: rgba(255, 255, 255, 0.7); font-size: 14px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 968px) {
    .nav-menu { gap: 20px; }
    .footer-content { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .site-main { padding: 120px 0 64px; }
    .nav-menu { gap: 14px; }
    .nav-link { font-size: 14px; }
    .posts-grid { grid-template-columns: 1fr; }
    .post-navigation .nav-links { grid-template-columns: 1fr; }
    .post-navigation .nav-next { text-align: left; }
    .article-cta { padding: 32px 24px; }
    .entry-content { font-size: 16px; }
    .entry-content .alignleft,
    .entry-content .alignright { float: none; margin: 16px 0; }
}
@media (max-width: 480px) {
    .container { padding: 0 18px; }
}


/* ==========================================================================
   Menu con desplegables + hamburguesa + logo del footer
   ========================================================================== */
/*MES-NAV-v2*/
.nav-menu .has-dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; padding: 0; margin: 0; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--text-dark); cursor: pointer; transition: color 0.3s; }
.dropdown-toggle .chev { display: inline-block; font-size: 10px; line-height: 1; transition: transform 0.25s; opacity: 0.7; flex-shrink: 0; }
.has-dropdown:hover .dropdown-toggle, .dropdown-toggle:focus-visible { color: var(--primary); }
.dropdown { position: absolute; top: 100%; left: 50%; margin-top: 14px; min-width: 215px; list-style: none; background: #fff; border: 1px solid rgba(4,25,36,0.08); border-radius: 14px; box-shadow: 0 14px 38px rgba(4,25,36,0.14); padding: 8px; opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; z-index: 1001; }
.has-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 18px; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown, .has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.has-dropdown:hover .chev, .has-dropdown.open .chev { transform: rotate(180deg); }
.dropdown li { width: auto; margin: 0; }
.dropdown a { display: block; padding: 10px 14px; border-radius: 9px; color: var(--text-dark); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.dropdown a:hover { background: rgba(0,151,178,0.08); color: var(--primary); }
.footer-logo { height: 34px; width: auto; margin-bottom: 18px; display: block; }
        @media (max-width: 968px) { .navbar .logo-img { height: 26px; } }
        @media (max-width: 600px) { .navbar .logo { display: none; } }
        @media (max-width: 380px) { .navbar .language-switch { display: none; } }
.hamburger { display: none; }
@media (max-width: 968px) {
    .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; margin-right: 8px; background: transparent; border: none; cursor: pointer; flex-shrink: 0; }
    .hamburger span { display: block; height: 2px; width: 100%; background: var(--text-dark); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-menu { display: flex !important; position: fixed; top: 0; left: 0; width: min(84vw, 320px); height: 100vh; height: 100dvh; flex-direction: column; align-items: stretch; gap: 0; padding: 88px 26px 32px; margin: 0; background: #fff; box-shadow: 10px 0 34px rgba(4,25,36,0.14); transform: translateX(-105%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1); z-index: 999; overflow-y: auto; list-style: none; }
    .nav-menu.open { transform: translateX(0); }
    .nav-menu li { width: 100%; list-style: none; }
    .nav-menu .nav-link { display: block; width: 100%; padding: 16px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid rgba(4,25,36,0.08); }
    .nav-menu .btn-nav { display: block; width: 100%; text-align: center; margin-top: 20px; padding: 15px; border-bottom: none; border-radius: 12px; }
    .nav-overlay { position: fixed; inset: 0; background: rgba(4,25,36,0.45); opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 998; }
    .nav-overlay.open { opacity: 1; visibility: visible; }
    body.nav-open { overflow: hidden; }
    .nav-menu .has-dropdown { width: 100%; }
    .nav-menu .dropdown-toggle { display: flex; width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid rgba(4,25,36,0.08); }
    .dropdown-toggle .chev { font-size: 13px; opacity: 0.9; color: var(--primary); }
    .has-dropdown::after { display: none; }
    .dropdown { position: static; margin: 0; min-width: 0; opacity: 1; visibility: visible; box-shadow: none; border: none; background: transparent; padding: 0 0 4px 12px; max-height: 0; overflow: hidden; transform: none; transition: max-height 0.3s ease; }
    .has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown, .has-dropdown.open .dropdown { transform: none; }
    .has-dropdown.open .dropdown { max-height: 480px; }
    .dropdown a { padding: 13px 8px; font-size: 16px; white-space: normal; border-bottom: 1px dashed rgba(4,25,36,0.07); border-radius: 0; }
}

/* Subitems del menu (myLeanTeam) y columna Sobre nosotros */
.dropdown .dd-sub a { padding-left: 30px; font-size: 13.5px; color: var(--text-light); }
.dropdown .dd-sub a:hover { color: var(--primary); }
.footer-column .ftr-sub a { padding-left: 14px; font-size: 13px; opacity: 0.85; }
@media (max-width: 968px) { .dropdown .dd-sub a { padding-left: 30px; font-size: 14.5px; } .has-dropdown.open .dropdown { max-height: 560px; } }