/*
Theme Name: Tracklink Blog Grid Elementor
Theme URI: https://www.tracklink.com.pe/blog/
Author: Tracklink
Description: Theme de blog para WordPress + Elementor con grid de posts e internas. Header/footer visuales desactivados.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: tracklink-blog-grid-elementor
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --tl-primary: #1996fa;
    --tl-primary-dark: #1578cc;
    --tl-text: #1e293b;
    --tl-muted: #64748b;
    --tl-soft: #f8fafc;
    --tl-border: #e2e8f0;
    --tl-card-border: #f0f0f0;
    --tl-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --tl-shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--tl-text);
    line-height: 1.6;
    background: #ffffff;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}


.tl-blog-hero {
    width: 100%;
    max-width: 100%;
    height: 220px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-bottom: 28px;
    background-image:
        linear-gradient(135deg, rgba(112, 114, 114, 0.56) 0%, rgba(75, 78, 80, 0.75) 100%),
        url('https://www.tracklink.pe/contenido/blog/wp-content/uploads/2025/11/GPS-flota-1-1-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-blog-hero-inner {
    text-align: center;
    padding: 0 16px;
}

.tl-blog-hero-title {
    margin: 0;
    color: #ffffff;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: -0.5px;
}

.tl-blog-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 25px 20px;
}

.tl-blog-layout,
.tl-single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.tl-blog-main,
.tl-single-main {
    min-width: 0;
}

.tl-page-title {
    margin: 0 0 24px;
    font-size: 42px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.tl-blog-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) minmax(170px, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    --tl-search-height: 44px;
}

.tl-blog-search-input,
.tl-blog-search-select {
    width: 100%;
    height: var(--tl-search-height);
    min-height: var(--tl-search-height);
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #ffffff;
    color: var(--tl-text);
    padding: 0 16px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tl-blog-search-input::placeholder {
    color: #94a3b8;
}

.tl-blog-search-input:focus,
.tl-blog-search-select:focus {
    outline: none;
    border-color: var(--tl-primary);
    box-shadow: 0 0 0 3px rgba(25, 150, 250, 0.14);
}

.tl-blog-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--tl-search-height);
}

.tl-blog-search-btn {
    border: 0;
    border-radius: 10px;
    background: #042b49;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    height: 40px;
    line-height: 1;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tl-blog-search-btn:hover {
    background: #05304e;
}

.tl-blog-search-clear {
    color: var(--tl-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.tl-blog-search-clear:hover {
    color: var(--tl-text);
}

.tl-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.tl-blog-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--tl-card-border);
    box-shadow: var(--tl-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tl-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tl-shadow-hover);
    border-color: var(--tl-border);
}

.tl-blog-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #eef2f7;
}

.tl-blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tl-blog-card:hover .tl-blog-card-media img {
    transform: scale(1.05);
}

.tl-blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(140deg, #e2e8f0 0%, #f8fafc 100%);
}

.tl-blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 16px;
}

.tl-blog-card-cats {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.tl-blog-card-cats a {
    color: var(--tl-primary);
    font-weight: 600;
    text-decoration: none;
}

.tl-blog-card-cats a:hover {
    color: var(--tl-primary-dark);
}

.tl-blog-card-meta {
    font-size: 12px;
    color: #94a3b8;
}

.tl-blog-card-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.tl-blog-card-title a {
    color: var(--tl-text);
    text-decoration: none;
}

.tl-blog-card-title a:hover {
    color: var(--tl-primary);
}

.tl-blog-card-excerpt {
    margin: 0;
    color: var(--tl-muted);
    font-size: 14px;
    line-height: 1.75;
    flex: 1;
}

.tl-blog-card-link {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    color: var(--tl-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.tl-blog-card-link:hover {
    color: var(--tl-primary-dark);
}

.tl-pagination {
    margin-top: 40px;
}

.tl-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tl-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--tl-border);
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tl-pagination .page-numbers:hover {
    border-color: #cbd5e1;
    background: var(--tl-soft);
    color: var(--tl-text);
}

.tl-pagination .page-numbers.current {
    background: var(--tl-primary);
    border-color: var(--tl-primary);
    color: #ffffff;
}

.tl-blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.tl-sidebar-widget {
    background: #ffffff;
    border: 1px solid var(--tl-card-border);
    border-radius: 16px;
    box-shadow: var(--tl-shadow);
    margin-bottom: 24px;
    padding: 24px;
}

#formulario-sidebar-widget.tl-tracklink-form-widget {
    margin: 0 0 24px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.tl-tracklink-form-widget .tracklink-cotizar-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px 26px;
    background: #1e2f41;
    border-radius: 15px;
    font-family: 'Montserrat', 'Arial', sans-serif;
}

.tl-tracklink-form-widget .tracklink-cotizar-header {
    text-align: center;
    margin-bottom: 18px;
}

.tl-tracklink-form-widget .tracklink-cotizar-logo {
    display: block;
    max-width: 210px;
    width: 100%;
    height: auto;
    margin: 0 auto 12px;
}

.tl-tracklink-form-widget .tracklink-cotizar-title {
    margin: 0;
    color: #fcfe73;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Montserrat', 'Arial', sans-serif;
}

.tl-tracklink-form-widget .tracklink-form-group {
    margin-bottom: 20px;
}

.tl-tracklink-form-widget .tracklink-form-control,
.tl-tracklink-form-widget .tracklink-form-select {
    width: 100%;
    padding: 7px 14px;
    font-size: 11.5px;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff !important;
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.tl-tracklink-form-widget .tracklink-form-control.has-text,
.tl-tracklink-form-widget .tracklink-form-select.has-text {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.tl-tracklink-form-widget .tracklink-form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

.tl-tracklink-form-widget .tracklink-form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
    min-height: 46px;
    height: auto;
    line-height: 1.5;
    padding-right: 40px;
}

.tl-tracklink-form-widget .tracklink-form-select option {
    background-color: #333333;
    color: #ffffff;
    padding: 10px;
    line-height: 1.5;
}

.tl-tracklink-form-widget .tracklink-form-control:focus,
.tl-tracklink-form-widget .tracklink-form-select:focus {
    outline: 2px solid rgba(25, 150, 250, 0.5);
    border-color: rgba(25, 150, 250, 0.5);
    box-shadow: 0 0 8px rgba(25, 150, 250, 0.3);
}

.tl-tracklink-form-widget .tracklink-btn {
    width: 100%;
    padding: 6px;
    background-color: #1996fa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.tl-tracklink-form-widget .tracklink-btn:hover {
    background-color: #1578cc;
    box-shadow: 0 2px 6px rgba(25, 150, 250, 0.2);
}

.tl-tracklink-form-widget .tracklink-btn:active {
    transform: scale(0.98);
}

.tl-tracklink-form-widget .tracklink-info-text {
    text-align: center;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 14px;
    font-size: 11.5px;
}

.tl-tracklink-form-widget .tracklink-info-text a {
    color: #ffffff;
    text-decoration: underline;
    font-size: inherit !important;
    font-weight: inherit;
    line-height: inherit;
}

.tl-sidebar-title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    color: var(--tl-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.tl-sidebar-widget .widget-title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    color: var(--tl-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.tl-sidebar-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl-sidebar-widget li {
    margin: 0;
}

.tl-sidebar-widget a {
    text-decoration: none;
}

.tl-popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl-popular-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.tl-popular-item:first-child {
    padding-top: 0;
}

.tl-popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tl-popular-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eef2f7;
}

.tl-popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tl-popular-thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, #e2e8f0 0%, #f8fafc 100%);
}

.tl-popular-content {
    min-width: 0;
    flex: 1;
}

.tl-popular-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.tl-popular-title a {
    color: var(--tl-text);
}

.tl-popular-title a:hover {
    color: var(--tl-primary);
}

.tl-popular-date {
    font-size: 11px;
    color: #94a3b8;
}

.tl-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl-category-item {
    margin-bottom: 8px;
}

.tl-category-item:last-child {
    margin-bottom: 0;
}

.tl-category-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    background: #f8fafc;
    padding: 12px 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tl-category-item a:hover {
    background: var(--tl-primary);
    transform: translateX(3px);
}

.tl-category-name {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.tl-category-item a:hover .tl-category-name {
    color: #ffffff;
}

.tl-category-count {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--tl-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    padding: 0 8px;
}

.tl-empty {
    margin: 0;
    color: var(--tl-muted);
    font-size: 16px;
}

.tl-empty-small {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}

.tl-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: var(--tl-muted);
    font-size: 13px;
}

.tl-breadcrumb a {
    color: var(--tl-muted);
    text-decoration: none;
}

.tl-breadcrumb a:hover {
    color: var(--tl-primary);
}

.tl-breadcrumb-current {
    color: var(--tl-text);
    font-weight: 500;
}

.tl-single-article {
    background: #ffffff;
    border: 1px solid var(--tl-card-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--tl-shadow);
}

.tl-single-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef2f7;
}

.tl-single-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tl-single-header {
    padding: 24px 36px 0;
}

.tl-single-meta {
    margin: 0 0 14px;
    color: var(--tl-muted);
    font-size: 14px;
}

.tl-single-meta a {
    color: var(--tl-primary);
    text-decoration: none;
    font-weight: 500;
}

.tl-single-meta a:hover {
    color: var(--tl-primary-dark);
}

.tl-single-title {
    margin: 0;
    color: var(--tl-text);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
}

.tl-single-content {
    padding: 24px 36px 36px;
    color: #334155;
    font-size: 16px;
    line-height: 1.8;
}

.tl-single-content p {
    margin-bottom: 1.5em;
}

.tl-single-content h2,
.tl-single-content h3,
.tl-single-content h4 {
    color: var(--tl-text);
    line-height: 1.35;
}

.tl-single-content h2 {
    font-size: 28px;
}

.tl-single-content h3 {
    font-size: 22px;
}

.tl-single-content h4 {
    font-size: 18px;
}

.tl-single-content a {
    color: var(--tl-primary);
    text-decoration: none;
}

.tl-single-content a:hover {
    color: var(--tl-primary-dark);
    text-decoration: underline;
}

.tl-single-content img {
    border-radius: 12px;
}

.tl-single-content blockquote {
    margin: 2em 0;
    border-left: 4px solid var(--tl-primary);
    padding-left: 1.2em;
    color: var(--tl-muted);
}

.tl-related-wrap {
    margin-top: 30px;
}

.tl-related-title {
    margin: 0 0 16px;
    color: var(--tl-text);
    font-size: 22px;
    font-weight: 700;
}

.tl-blog-grid-related {
    margin-bottom: 60px;
}

@media (max-width: 1200px) {
    .tl-blog-hero {
        height: 150px;
    }

    .tl-blog-hero-title {
        font-size: 40px;
    }

    .tl-blog-layout,
    .tl-single-layout {
        grid-template-columns: 1fr 300px;
        gap: 24px;
    }

    .tl-page-title {
        font-size: 38px;
    }

    .tl-blog-card-title {
        font-size: 18px;
    }

    .tl-single-title {
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .tl-blog-layout,
    .tl-single-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .tl-blog-sidebar {
        position: static;
    }

    .tl-blog-search-form {
        grid-template-columns: 1fr;
    }

    .tl-blog-search-actions {
        justify-content: flex-start;
    }

    .tl-page-title {
        font-size: 34px;
    }

    .tl-single-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .tl-blog-hero {
        height: 120px;
        margin-bottom: 20px;
    }

    .tl-blog-hero-title {
        font-size: 32px;
    }

    .tl-blog-container {
        padding: 0 16px;
    }

    .tl-blog-page,
    .tl-single-page {
        padding: 20px 0 40px;
    }

    .tl-page-title {
        font-size: 30px;
    }

    .tl-blog-grid,
    .tl-blog-grid-related {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .tl-single-header {
        padding: 20px 24px 0;
    }

    .tl-single-content {
        padding: 20px 24px 24px;
        font-size: 15px;
    }

    .tl-single-title {
        font-size: 24px;
    }

    .tl-single-content h2 {
        font-size: 22px;
    }

    .tl-single-content h3 {
        font-size: 18px;
    }

    .tl-sidebar-widget {
        padding: 20px;
    }

    .tl-tracklink-form-widget .tracklink-form-select {
        font-size: 11.5px;
        min-height: 38px;
        padding: 8px 40px 8px 14px;
    }
}

@media (max-width: 480px) {
    .tl-blog-hero {
        height: 100px;
    }

    .tl-blog-hero-title {
        font-size: 26px;
    }

    .tl-page-title {
        font-size: 26px;
    }

    .tl-blog-card-title {
        font-size: 18px;
    }

    .tl-single-title {
        font-size: 20px;
    }

    .tl-single-header {
        padding: 16px 20px 0;
    }

    .tl-single-content {
        padding: 16px 20px 20px;
        font-size: 14px;
    }
}
