/*
Theme Name: HTMXLightFast
Theme URI: https://ejemplo.com/htmx-lf
Author: Enrique de Santiago
Author URI: https://enriquedesantiagoweb.com/
Description: Un tema minimalista, rápido y limpio creado con HTMX. Hereda de instalagas.es su estructura de header, y footer en columnas.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: htmxlf
*/

:root {
  --c-1: #0A2E5C; /* Secondary/Corporate blue */
  --c-2: #FF5722; /* Primary action color, similar to instalagas */
  --c-3: #F5F5F5;
  --c-txt: #333333;
  --c-bg: #FFFFFF;
  --f-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--f-main); color: var(--c-txt); background: var(--c-bg); line-height: 1.6; }
a { color: var(--c-1); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--c-2); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Utils */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; width: 100%; }
.btn { display: inline-block; padding: 0.6rem 1.2rem; background: var(--c-2); color: #fff; border-radius: 4px; font-weight: bold; border: none; cursor: pointer; }
.btn:hover { background: var(--c-1); color: #fff; }

/* Header (.hd) */
.hd { background: var(--c-bg); border-bottom: 2px solid var(--c-3); }
.hd .top { background: var(--c-1); color: #fff; padding: 0.5rem 0; font-size: 0.9rem; }
.hd .top .wrap { display: flex; justify-content: flex-end; gap: 1.5rem; }
.hd .top i { margin-right: 0.3rem; color: var(--c-2); }

.hd .nav { padding: 1rem 0; }
.hd .nav .wrap { display: flex; justify-content: space-between; align-items: center; }
.hd .logo a { font-size: 1.8rem; font-weight: 800; color: var(--c-1); text-transform: uppercase; }
.hd .menu ul { display: flex; gap: 1.5rem; }
.hd .menu li { position: relative; }
.hd .menu a { font-weight: 600; text-transform: uppercase; font-size: 0.95rem; }
.hd .menu a:hover { color: var(--c-2); }
/* Sub-menus dropdown */
.hd .menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--c-bg); border-top: 2px solid var(--c-2); min-width: 200px; padding: 0.5rem 0; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 50; flex-direction: column; gap: 0; }
.hd .menu li:hover > .sub-menu { display: flex; }
.hd .menu .sub-menu a { padding: 0.5rem 1rem; display: block; font-size: 0.85rem; }
.hd .menu .sub-menu a:hover { background: var(--c-3); }

/* Slide (.slide) */
.slide { width: 100%; height: 50vh; min-height: 400px; background: #eee; position: relative; overflow: hidden; }
.slide .inner { width: 100%; height: 100%; position: relative; }
.slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; }
/* Controles htmx del slider */
.slide .ctrl { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; background: var(--c-1); color: #fff; border: none; padding: 1rem 1.2rem; cursor: pointer; border-radius: 50%; font-size: 1.2rem; transition: background 0.3s; opacity: 0.7; }
.slide .ctrl:hover { background: var(--c-2); opacity: 1; }
.slide .ctrl.prv { left: 2rem; }
.slide .ctrl.nxt { right: 2rem; }

/* Layouts */
.ly-mn { padding: 3rem 0; }
.ly-gr { display: grid; grid-template-columns: 3fr 1fr; gap: 3rem; }

/* Content (.cnt) */
.cnt h1, .cnt h2, .cnt h3 { color: var(--c-1); margin-bottom: 1rem; }
.cnt p { margin-bottom: 1rem; }

/* Sidebar (.sd) */
.sd { background: #f9f9f9; padding: 2rem; border-top: 4px solid var(--c-2); }
.sd h3 { margin-bottom: 1.5rem; font-size: 1.3rem; }
.sd ul { margin-bottom: 2rem; }
.sd li { margin-bottom: 0.8rem; border-bottom: 1px solid #eee; padding-bottom: 0.5rem; }
.sd a { color: var(--c-txt); }
.sd a:hover { color: var(--c-2); }

/* Footer (.ft) */
.ft { background: var(--c-1); color: #fff; padding: 4rem 0 2rem; margin-top: 3rem; border-top: 5px solid var(--c-2); }
.ft .grd { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; }
.ft h4 { margin-bottom: 1.5rem; font-size: 1.1rem; text-transform: uppercase; }
.ft ul a { color: #bccadb; font-size: 0.95rem; }
.ft ul a:hover { color: #fff; }
.ft .cpy { text-align: center; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); color: #bccadb; font-size: 0.85rem; }

/* Loop / Cards (.crd) */
.crd { border: 1px solid var(--c-3); border-radius: 5px; overflow: hidden; margin-bottom: 2rem; display: flex; flex-direction: column; }
.crd .th { width: 100%; height: 250px; background: #eee; }
.crd .th img { width: 100%; height: 100%; object-fit: cover; }
.crd .bdy { padding: 1.5rem; flex: 1; }
.crd h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
/* JS Upload Metabox */
.crd p { color: #666; font-size: 0.95rem; margin-bottom: 1rem; }

/* CSS Logo */
.hd .logo img { max-height: 50px; width: auto; }
.mob-btn { display: none; font-size: 1.5rem; cursor: pointer; color: var(--c-1); }

/* Pages y Componentes Internos */
.pg-hd { margin-bottom: 2rem; }
.pg-meta { color: #666; font-size: 0.9rem; }
.pg-th { margin-bottom: 2rem; }
.pg-cmds { margin-top: 3rem; }
.cat-desc { color: #666; }
.sd .tags .tag { font-size: 0.8rem; padding: 0.2rem 0.5rem; display: inline-block; margin: 0.2rem; }

/* Errores 404 */
.pg-404 { text-align: center; padding: 5rem 1rem; }
.pg-404 h1 { font-size: 4rem; color: var(--c-2); margin-bottom: 1rem; }
.pg-404 p { margin-bottom: 2rem; }

/* Animations */
.slide img.anim-fade { animation: fadein 0.5s; }

/* Responsive minimal */
@media (max-width: 900px) {
  .ly-gr { grid-template-columns: 1fr; }
  .ft .grd { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (max-width: 600px) {
  .ft .grd { grid-template-columns: 1fr; }
  .mob-btn { display: block; }
  .hd .nav { position: relative; }
  .hd .menu { display: none; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; background: var(--c-bg); padding: 1rem; border-bottom: 3px solid var(--c-2); z-index: 50; }
  .hd .menu ul { flex-direction: column; gap: 0.5rem; }
  .hd .menu .sub-menu { display: none; position: static; box-shadow: none; border-top: none; padding-left: 1rem; background: transparent; }
  .hd .menu li:hover > .sub-menu { display: flex; }
  #mob-chk:checked ~ .menu { display: flex; }
}
