/*
Theme Name: GeneratePress Child — TuMedico
Template: generatepress
Version: 1.0.0
*/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --color-primario:     #6BAE9A;
    --color-primario-oscuro: #4E8B76;
    --color-secundario:   #1a3a2e;
    --color-texto:        #2d2d2d;
    --color-texto-suave:  #6c757d;
    --color-fondo:        #f8f9fa;
    --color-blanco:       #ffffff;
    --color-borde:        #e5e7eb;
    --radio:              8px;
    --radio-grande:       12px;
    --sombra-suave:       0 1px 4px rgba(0,0,0,0.06);
    --sombra-media:       0 4px 16px rgba(0,0,0,0.10);
}

/* ============================================================
   RESET BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-texto);
    background: var(--color-fondo);
    line-height: 1.6;
}
a { color: var(--color-primario-oscuro); text-decoration: none; }
a:hover { color: var(--color-secundario); }

/* ============================================================
   HEADER / MEGAMENU
   ============================================================ */
.tm-megamenu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 56px;
    width: 100%;
}

.tm-megamenu-logo {
    text-decoration: none;
    flex-shrink: 0;
}

.tm-logo-txt {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.tm-megamenu-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-megamenu-nav a {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.tm-megamenu-nav a:hover {
    color: #fff;
}

.tm-megamenu-cta {
    margin-left: auto;
    background: #fff;
    color: var(--color-primario-oscuro) !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.tm-megamenu-cta:hover {
    background: var(--color-secundario);
    color: #fff !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.tm-footer {
    background: linear-gradient(45deg, #6BAE9A 0%, #4E8B76 100%);
    color: #fff;
    padding: 20px 0;
    margin-top: 60px;
}

.tm-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.tm-footer-copyright {
    font-size: 13px;
    opacity: 0.9;
}

.tm-footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tm-footer-links a {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    text-decoration: none;
}

.tm-footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.tm-footer-sep {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.tm-contenido {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .tm-megamenu-nav { display: none; }
    .tm-footer-inner { flex-direction: column; text-align: center; }
}

/* ============================================================
   HOME — HERO
   ============================================================ */
.tm-hero {
    background: linear-gradient(135deg, #6BAE9A 0%, #3D7A68 100%);
    padding: 64px 20px 56px;
    text-align: center;
}

.tm-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.tm-hero-titulo {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.2;
}

.tm-hero-highlight {
    color: #d4f0e8;
}

.tm-hero-subtitulo {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    margin: 0 0 32px;
}

/* Buscador */
.tm-search-bar {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    margin-bottom: 16px;
}

.tm-search-campo {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-right: 1px solid var(--color-borde);
}

.tm-search-campo i { color: var(--color-texto-suave); font-size: 18px; }

.tm-search-campo input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--color-texto);
    background: transparent;
    padding: 16px 0;
}

.tm-search-depto {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-right: 1px solid var(--color-borde);
    min-width: 180px;
}

.tm-search-depto i { color: var(--color-texto-suave); font-size: 16px; }

.tm-search-depto select {
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--color-texto);
    background: transparent;
    cursor: pointer;
    width: 100%;
}

.tm-search-btn {
    background: var(--color-primario-oscuro);
    color: #fff;
    border: none;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.tm-search-btn:hover { background: var(--color-secundario); }

/* Populares */
.tm-search-populares {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.tm-popular-link {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}

.tm-popular-link:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ============================================================
   HOME — SECCIONES
   ============================================================ */
.tm-section {
    margin-bottom: 48px;
}

.tm-section-titulo {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-secundario);
    margin: 0 0 20px;
}

/* Tipos grid */
.tm-tipos-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tm-tipo-card {
    background: var(--color-blanco);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-grande);
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--color-texto);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tm-tipo-card:hover {
    border-color: var(--color-primario);
    box-shadow: var(--sombra-media);
    transform: translateY(-2px);
    color: var(--color-secundario);
}

.tm-tipo-icono {
    width: 48px;
    height: 48px;
    background: #e8f5f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-tipo-icono i {
    font-size: 22px;
    color: var(--color-primario-oscuro);
}

.tm-tipo-nombre {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-secundario);
}

.tm-tipo-count {
    font-size: 11px;
    color: var(--color-texto-suave);
}

/* Departamentos */
.tm-deptos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tm-depto-pildora {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-blanco);
    border: 1px solid var(--color-borde);
    border-radius: 20px;
    font-size: 14px;
    color: var(--color-texto);
    text-decoration: none;
    transition: all 0.2s;
}

.tm-depto-pildora i { color: var(--color-primario-oscuro); font-size: 14px; }

.tm-depto-pildora:hover {
    background: var(--color-primario);
    border-color: var(--color-primario);
    color: #fff;
}

.tm-depto-pildora:hover i { color: #fff; }

/* Stats */
.tm-stats {
    background: linear-gradient(135deg, #6BAE9A 0%, #3D7A68 100%);
    border-radius: var(--radio-grande);
    padding: 40px 32px;
    margin-bottom: 48px;
}

.tm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.tm-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.tm-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

/* Pasos */
.tm-pasos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tm-paso {
    background: var(--color-blanco);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-grande);
    padding: 24px 20px;
    text-align: center;
}

.tm-paso-icono {
    width: 52px;
    height: 52px;
    background: #e8f5f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.tm-paso-icono i { font-size: 24px; color: var(--color-primario-oscuro); }

.tm-paso h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-secundario);
    margin: 0 0 8px;
}

.tm-paso p {
    font-size: 13px;
    color: var(--color-texto-suave);
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE HOME
   ============================================================ */
@media (max-width: 900px) {
    .tm-tipos-grid { grid-template-columns: repeat(4, 1fr); }
    .tm-pasos-grid { grid-template-columns: repeat(2, 1fr); }
    .tm-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .tm-hero-titulo { font-size: 26px; }
    .tm-search-bar { flex-direction: column; border-radius: 12px; }
    .tm-search-campo, .tm-search-depto { border-right: none; border-bottom: 1px solid var(--color-borde); }
    .tm-search-btn { padding: 14px; }
    .tm-tipos-grid { grid-template-columns: repeat(3, 1fr); }
    .tm-pasos-grid { grid-template-columns: 1fr; }
    .tm-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   FIX GENERATEPRESS — hero full width
   ============================================================ */
.tm-home { width: 100%; }
.site-main { padding: 0 !important; margin: 0 !important; }
.entry-content { padding: 0 !important; margin: 0 !important; }
.inside-article { padding: 0 !important; }
.separate-containers .inside-article { padding: 0 !important; }
