/*
Theme Name: Thrive Docs
Theme URI: https://tesysnetworks.com
Description: Theme profesional para documentación y scopes - Desarrollado por Tesys
Version: 1.0.0
Author: Tesys
Author URI: https://tesysnetworks.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thrive-docs
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&family=Titillium+Web:wght@400;600;700&display=swap');

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    line-height: 1.6;
    background: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Titillium Web', sans-serif;
    font-weight: 700;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header.site-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: #1a3a52;
    margin: 0;
}

.site-title a {
    color: #1a3a52;
}

.site-description {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Navigation */
nav.main-navigation {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

nav.main-navigation a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav.main-navigation a:hover {
    color: #2563eb;
    text-decoration: none;
}

/* Container */
.site-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Layout */
.site-content {
    display: flex;
    gap: 30px;
    margin: 40px auto;
}

.content-main {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.content-sidebar {
    flex: 0 0 280px;
}

/* Page Title */
.page-title {
    font-size: 32px;
    color: #1a3a52;
    margin-bottom: 20px;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 15px;
}

.page-content {
    font-size: 16px;
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 15px;
}

.page-content h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #1a3a52;
}

.page-content h3 {
    font-size: 20px;
    margin: 20px 0 10px 0;
    color: #2563eb;
}

.page-content ul,
.page-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-content li {
    margin-bottom: 8px;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1a3a52;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 10px;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 10px;
}

.sidebar-widget a {
    display: block;
    padding: 10px;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-widget a:hover {
    background: #f0f4ff;
    color: #2563eb;
    text-decoration: none;
}

.sidebar-widget a.active {
    background: #2563eb;
    color: white;
    font-weight: bold;
}

/* Scopes Layout */
.scopes-container {
    display: flex;
    gap: 25px;
    margin: 30px auto;
}

.scopes-sidebar {
    flex: 0 0 280px;
    background: #0f1d2b;
    color: white;
    padding: 30px 20px;
    border-radius: 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.scopes-sidebar h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 10px;
}

.scopes-list {
    list-style: none;
}

.scopes-list li {
    margin-bottom: 8px;
}

.scopes-list a {
    display: block;
    padding: 12px 15px;
    color: #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s;
}

.scopes-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.scopes-list a.active {
    background: #2563eb;
    color: white;
    font-weight: bold;
}

.scopes-content {
    flex: 1;
    background: white;
    padding: 50px;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.scopes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.scopes-header h2 {
    margin: 0;
    color: #0f1d2b;
    font-size: 36px;
    font-weight: 700;
}

.btn-export-pdf {
    background: #0ea5e9;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    font-size: 15px;
}

.btn-export-pdf:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.scopes-body {
    color: #2d3748;
    line-height: 1.7;
    font-size: 15px;
}

.scopes-body p {
    margin-bottom: 15px;
}

.scopes-body h2 {
    font-size: 22px;
    margin: 30px 0 15px 0;
    color: #0ea5e9;
    font-weight: 600;
}

.scopes-body ul,
.scopes-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.scopes-body li {
    margin-bottom: 8px;
}

/* Footer */
footer.site-footer {
    background: #1a3a52;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    margin-bottom: 20px;
}

.footer-content p {
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 14px;
    color: #ccc;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
    nav.main-navigation {
        gap: 15px;
        font-size: 14px;
    }

    .site-content,
    .scopes-container {
        flex-direction: column;
    }

    .content-sidebar,
    .scopes-sidebar {
        flex: 0 0 auto;
        position: static;
    }

    .scopes-header {
        flex-direction: column;
        gap: 15px;
        text-align: left;
    }

    .scopes-header h2 {
        font-size: 24px;
    }

    .page-title {
        font-size: 24px;
    }

    .content-main {
        padding: 20px;
    }

    .scopes-content {
        padding: 20px;
    }
}

/* Utilities */
.wp-caption {
    max-width: 100%;
}

.wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2563eb;
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* =====================================================
   SCOPES APP LAYOUT - Full page app style (Thrive clone)
   ===================================================== */

body.scopes-app-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    background: #0c1e2e;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.sa-wrap {
    display: flex;
    height: 100vh;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

.sa-wrap.sidebar-hidden .sa-sidebar {
    display: none;
}

/* ----- SIDEBAR ----- */
.sa-sidebar {
    width: 300px;
    min-width: 300px;
    background: #0c1e2e;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

/* Logo */
.sa-logo {
    padding: 10px 16px;
    background: #0a1929;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sa-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 24px;
}

.sa-logo img,
.sa-logo .custom-logo {
    max-height: 24px;
    max-width: 200px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.sa-logo svg {
    max-height: 24px;
    max-width: 200px;
    width: auto;
    height: auto;
    filter: brightness(0) invert(1);
}

.sa-logo-text {
    color: white;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Search */
.sa-search {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sa-search input {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    padding: 8px 12px;
    color: #94a3b8;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sa-search input:focus {
    border-color: rgba(255,255,255,0.25);
    color: white;
}

.sa-search input::placeholder {
    color: #4b5563;
}

/* Nav list */
.sa-nav {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.sa-nav::-webkit-scrollbar { width: 4px; }
.sa-nav::-webkit-scrollbar-track { background: transparent; }
.sa-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.sa-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #a0afc0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border-left: 3px solid transparent;
    line-height: 1.4;
    gap: 8px;
    margin: 0 8px;
    border-radius: 4px;
}

.sa-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    text-decoration: none;
}

.sa-nav-item.active {
    background: #ffffff;
    border-left-color: #ffffff;
    color: #000000;
    font-weight: 600;
}

.sa-nav-label {
    flex: 1;
}

.sa-nav-count {
    background: rgba(255,255,255,0.12);
    color: #8a9bb0;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.sa-nav-item.active .sa-nav-count {
    background: rgba(0,0,0,0.1);
    color: #000000;
}

.sa-nav-arrow {
    color: #6b7c8f;
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.2s;
}

.sa-nav-item:hover .sa-nav-arrow {
    color: #ffffff;
}

.sa-nav-item.active .sa-nav-arrow {
    color: #000000;
}

/* ----- MAIN AREA ----- */
.sa-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0c1e2e;
    min-width: 0;
    height: 100vh;
}

/* Top bar */
.sa-topbar {
    background: #152e42;
    height: 52px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.sa-topbar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #8a9bb0;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.sa-topbar-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.sa-topbar-title {
    font-size: 15px;
    color: #d4dce6;
    font-weight: 500;
}

/* Scrollable content zone */
.sa-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 25px;
    background: #0c1e2e;
}

.sa-content::-webkit-scrollbar { width: 6px; }
.sa-content::-webkit-scrollbar-track { background: #152e42; }
.sa-content::-webkit-scrollbar-thumb { background: #2a4a62; border-radius: 3px; }

/* Content card */
.sa-card {
    background: #1a3a52;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    overflow: hidden;
}

.sa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px 40px 28px 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 20px;
}

.sa-card-meta {
    flex: 1;
    min-width: 0;
}

.sa-card-title {
    font-family: 'Titillium Web', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.sa-card-date {
    font-size: 13px;
    color: #a0afc0;
    margin: 0;
}

/* PDF button */
.sa-btn-pdf {
    background: #0ea5e9;
    color: white;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid #0ea5e9;
}

.sa-btn-pdf:hover {
    background: #0284c7;
    border-color: #0284c7;
    text-decoration: none;
    color: white;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}

/* Card body content */
.sa-card-body {
    padding: 32px 40px 40px 40px;
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.75;
    color: #d4dce6;
}

.sa-card-body h2 {
    font-family: 'Titillium Web', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 30px 0 12px 0;
}

.sa-card-body h3 {
    font-family: 'Titillium Web', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #bfef45;
    margin: 20px 0 10px 0;
}

.sa-card-body p {
    margin-bottom: 14px;
    color: #d4dce6;
}

.sa-card-body ul,
.sa-card-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.sa-card-body li {
    margin-bottom: 6px;
    color: #d4dce6;
}

.sa-card-body strong {
    color: #ffffff;
    font-weight: 600;
}

.sa-empty {
    background: #152e42 !important;
}

.sa-empty p {
    padding: 40px;
    color: #8a9bb0;
}

/* Footer */
.sa-footer {
    background: linear-gradient(90deg, #1a4d6d 0%, #2a6f8f 100%);
    padding: 18px 25px;
    text-align: center;
    border-top: 2px solid #3a8faf;
    flex-shrink: 0;
}

.sa-footer p {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.3px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    body.scopes-app-page {
        overflow: auto;
        height: auto;
    }

    .sa-wrap {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .sa-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        border-right: none;
        border-bottom: 2px solid rgba(255,255,255,0.08);
    }

    .sa-logo {
        padding: 8px 12px;
    }

    .sa-logo a {
        height: 22px;
    }

    .sa-logo img,
    .sa-logo .custom-logo,
    .sa-logo svg {
        max-height: 22px;
        max-width: 180px;
    }

    .sa-search {
        padding: 10px 16px;
    }

    .sa-search input {
        font-size: 14px;
        padding: 9px 12px;
    }

    .sa-nav {
        max-height: 280px;
        padding: 4px 0;
    }

    .sa-nav-item {
        padding: 9px 14px;
        margin: 0 6px;
        font-size: 13.5px;
    }

    .sa-main {
        height: auto;
        overflow: visible;
    }

    .sa-topbar {
        height: 48px;
        padding: 0 16px;
        gap: 10px;
    }

    .sa-topbar-title {
        font-size: 14px;
    }

    .sa-content {
        overflow: visible;
        padding: 16px;
    }

    .sa-card {
        border-radius: 4px;
    }

    .sa-card-header {
        flex-direction: column;
        padding: 18px;
        gap: 12px;
    }

    .sa-card-meta {
        width: 100%;
    }

    .sa-card-title {
        font-size: 22px;
    }

    .sa-card-date {
        font-size: 12px;
    }

    .sa-btn-pdf {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 13px;
    }

    .sa-card-body {
        padding: 18px;
        font-size: 16px;
    }

    .sa-card-body h2 {
        font-size: 18px;
        margin: 20px 0 10px 0;
    }

    .sa-card-body h3 {
        font-size: 15px;
        margin: 16px 0 8px 0;
    }

    .sa-card-body ul,
    .sa-card-body ol {
        padding-left: 18px;
        margin-bottom: 12px;
    }

    .sa-card-body li {
        margin-bottom: 5px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .sa-logo a {
        height: 20px;
    }

    .sa-logo img,
    .sa-logo .custom-logo,
    .sa-logo svg {
        max-height: 20px;
        max-width: 160px;
    }

    .sa-nav-item {
        padding: 8px 12px;
        margin: 0 4px;
        font-size: 13px;
    }

    .sa-nav-count {
        font-size: 11px;
        padding: 1px 4px;
    }

    .sa-topbar {
        padding: 0 12px;
    }

    .sa-content {
        padding: 12px;
    }

    .sa-card-header {
        padding: 16px;
    }

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

    .sa-card-body {
        padding: 16px;
        font-size: 15px;
    }

    .sa-search input {
        font-size: 13px;
    }
}
