/*
Theme Name: TIS Content
Theme URI: https://tecnoinnsoft.com
Author: Tecnoinnsoft
Description: Minimal content theme for TIS sites. Use TIS Motion Kit for hero/scroll/motion sections; CPT `tis_chrome` for editable header/footer/404.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: Proprietary
Tags: minimal, performance, content
*/

/* ----- 4 KB RESET ------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #1d2327;
    background: #fff;
}
img,
picture,
video,
svg {
    max-width: 100%;
    height: auto;
}
a {
    color: #2271b1;
    text-decoration: none;
}
a:hover {
    color: #135e96;
    text-decoration: underline;
}
h1, h2, h3, h4, h5, h6 {
    margin: 1.5rem 0 1rem;
    line-height: 1.25;
}
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1rem; }
hr {
    border: 0;
    border-top: 1px solid #dcdcde;
    margin: 2rem 0;
}
ul, ol { margin: 0 0 1rem 1.5rem; padding: 0; }
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    white-space: nowrap;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link {
    position: absolute;
    left: -9999em;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: #2271b1;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 100000;
}

/* ----- CONTAINER ----- */
.tis-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
.tis-container--wide {
    max-width: 1200px;
}
@media (min-width: 768px) {
    .tis-container {
        padding: 2rem 1.5rem;
    }
}

/* ----- SITE CHROME WRAPPERS (rendered by header.php / footer.php) ----- */
.tis-site-header-wrap {
    background: #fff;
    border-bottom: 1px solid #dcdcde;
    padding: 0.75rem 0;
    position: relative;
    z-index: 200;
}
.tis-site-header-wrap > div,
.tis-site-header-wrap > header,
.tis-site-header-wrap > nav {
    /* Chrome posts use block layout — let the chrome HTML decide. */
}
.tis-site-footer-wrap {
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
    padding: 2rem 0;
    margin-top: 3rem;
    color: #50575e;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* ----- CHROME INNER (rendered by the editable `tis_chrome` CPT HTML) ----- *
 * The chrome posts use BEM-style classes (tis-chrome-header__brand, etc.)
 * inside the `tis-chrome-header` / `tis-chrome-footer` outer wrappers.
 * Editable via /wp-admin → Chrome del sitio → Header / Footer.
 *
 * Color palette mirrors the TIS brand tokens:
 *   --tis-teal:       #0097A7  (primary, used for logo + hover)
 *   --tis-teal-dark:  #007a87  (logo hover)
 *   --tis-slate-900:  #1d2327  (body text)
 *   --tis-slate-600:  #50575e  (footer text)
 *   --tis-gray-100:   #f6f7f7  (footer background)
 *   --tis-gray-200:   #e2e4e7  (borders)
 */
.tis-chrome-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e4e7;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 200;
}
.tis-chrome-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.tis-chrome-header__brand {
    color: #0097A7;            /* TIS teal */
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.tis-chrome-header__brand:hover {
    color: #007a87;
    text-decoration: none;
}
.tis-chrome-header__nav {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}
.tis-chrome-header__nav a {
    color: #1d2327;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tis-chrome-header__nav a:hover {
    color: #0097A7;
}
.tis-chrome-header__toggle {
    display: none;
    background: transparent;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    color: #1d2327;
}
.tis-chrome-header__toggle svg {
    display: block;
}

/* Mobile stacking */
@media (max-width: 640px) {
    .tis-chrome-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .tis-chrome-header__toggle {
        display: block;
    }
    .tis-chrome-header__nav {
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        padding-top: 0.5rem;
        border-top: 1px solid #e2e4e7;
        margin-top: 0.5rem;
    }
    .tis-chrome-header__nav--open {
        display: flex;
    }
}

.tis-chrome-footer {
    background: #f6f7f7;
    color: #50575e;
    padding: 2.5rem 0;
    margin-top: 3rem;
    font-size: 0.875rem;
    border-top: 1px solid #dcdcde;
}
.tis-chrome-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.tis-chrome-footer__col h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0097A7;
    margin: 0 0 0.75rem;
}
.tis-chrome-footer__col p,
.tis-chrome-footer__col li {
    margin: 0 0 0.5rem;
}
.tis-chrome-footer__col a,
.tis-chrome-footer__col a:visited {
    color: #50575e;
    text-decoration: none;
}
.tis-chrome-footer__col a:hover {
    color: #0097A7;
    text-decoration: underline;
}
.tis-chrome-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tis-chrome-footer__copy {
    color: #50575e;
    margin: 0;
}

/* ----- TWO-COLUMN LAYOUTS ----- */
.tis-has-sidebar {
    display: grid;
    gap: 2rem;
}
@media (min-width: 768px) {
    .tis-has-sidebar--left {
        grid-template-columns: 240px 1fr;
    }
    .tis-has-sidebar--right {
        grid-template-columns: 1fr 240px;
    }
}
.tis-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
}

/* ----- PAGE TITLE + CONTENT ----- */
.tis-page-title {
    margin-top: 0;
}
.tis-page-content {
    margin-bottom: 2rem;
}
.tis-page-links {
    margin-top: 1rem;
}

/* ----- FRONT-PAGE HERO CONTAINER (TIS Motion Kit) ----- *
 * TIS Motion Kit puts the hero at position:fixed via mu-plugin.
 * Force the hero's content area (text + CTAs) to be a clean centered
 * column that doesn't bleed past the hero edges.
 */
body.tmk-has-fullscreen-hero .tmk-hero-content {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 1080px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    box-sizing: border-box !important;
}
body.tmk-has-fullscreen-hero .tmk-hero-headline,
body.tmk-has-fullscreen-hero .tmk-hero-rotating-captions,
body.tmk-has-fullscreen-hero .tmk-hero-ctas {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 720px !important;
}

/* FIX 2026-09-29 — Push the chrome footer below the fullscreen hero.
   The fullscreen hero is position:fixed; height:100vh (see critical.css),
   so it doesn't push downstream content down in the document flow. Without
   this rule, the chrome <footer class="site-footer"> renders in normal
   flow right after the (zero-height) <main>, landing at the top-left of
   the viewport and overlapping the hero.

   We force .site-main to take at least 100vh of flow space, which places
   the footer below where the hero visually ends. We also lift the footer's
   z-index above the hero (z-index:1) and give it a solid background so when
   the user scrolls to it, it visually replaces the hero at the bottom of
   the page. */
body.tmk-has-fullscreen-hero .site-main {
    min-height: 100vh;
}
body.tmk-has-fullscreen-hero .site-footer {
    position: relative;
    z-index: 5;
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
    padding: 2rem 0;
    margin-top: 0;
    color: #50575e;
    font-size: 0.875rem;
}
body.tmk-has-fullscreen-hero .site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
body.tmk-has-fullscreen-hero .site-footer__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2271b1;
    margin: 0 0 0.5rem;
}
body.tmk-has-fullscreen-hero .site-footer__text,
body.tmk-has-fullscreen-hero .site-footer__col p {
    margin: 0 0 0.5rem;
}
body.tmk-has-fullscreen-hero .site-footer__copy p {
    margin: 0;
}

/* ----- ARCHIVE LIST ----- */
.tis-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tis-archive-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f1;
}

/* ----- WP BLOCKS ----- */
.wp-block-button__link {
    background: #2271b1;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    display: inline-block;
}
.alignwide {
    margin-left: -60px;
    margin-right: -60px;
    max-width: none;
}
.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
