
/* === variables.css === */
:root {
    /* Cores */
    --primary-color: #E36B2C;
    --secondary-color: #F08654;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-light: #f0f0f0;
    --border-color: #e0e0e0;
    
    /* Definições de elementos secundários com cores */
    --hover-bg: #f0f0f0;
    --even-row-bg: #f9f9f9;
    --sidebar-bg: #4B5563;
    --sidebar-subitem-bg: #374151;
    --sidebar-highlight: #ffd180;
    
    /* Sombras */
    --shadow-default: 0 2px 5px rgba(0, 0, 0, 0.1);
    
    /* Espaçamentos */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;

    /* Tipografia */
    --font-size-xs: 0.875rem;
    --font-size-sm: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.5rem;
    --font-size-xl: 2rem;
    --font-size-xxl: 2.5rem;
    
    --img-width: 550px;
    
    /* Breakpoints */
    --mobile-width: 768px;
}

/* === base.css === */
/* Reset e estilos base */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    max-width: 1300px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    background-color: var(--bg-light);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1:first-of-type {
    scroll-margin-top: 20px;
}

h1[tabindex="-1"]:focus {
    outline: none;
}

/* Cabeçalhos e tipografia */
h1, h2, h3 {
    color: var(--primary-color);
}

h1 {
    margin: 0;
    font-size: var(--font-size-xxl);
}

h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-top: 40px;
}

h3 {
    margin-top: 30px;
}

h4 {
    color: #444;
    margin-top: 20px;
}

/* Elementos de texto */
p, ul, ol {
    margin-bottom: var(--spacing-lg);
}

ul, ol {
    padding-left: 25px;
}

li {
    margin-bottom: 8px;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

/* Links */
a {
    color: var(--primary-color);
    transition: color 0.2s ease;
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
}

/* Estilos para elementos de código */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background-color: var(--bg-light);
    border-radius: 5px;
}

code {
    display: block;
    overflow-x: auto;
}

/* === layout.css === */
/* Classes utilitárias para elementos com estilos comuns */
.card-style,
.card-like, 
.section, 
.container,
header, 
section,
.nav {
    background-color: var(--bg-white);
    border-radius: 5px;
    box-shadow: var(--shadow-default);
    padding: var(--spacing-lg);
}

.subsection {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 3px solid var(--border-color);
}

/* Wrapper para o conteúdo principal */
.content-wrapper {
    margin-left: 200px;
}



header a {
    color: var(--bg-white);
    text-decoration: underline;
}

header a:hover {
    color: var(--text-light);
}

/* Logo DinaBox */
.logo {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5em;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 15px;
    text-align: center;
    border-radius: 5px;
    margin-top: 30px;
}

footer a {
    color: var(--bg-white);
    text-decoration: none;
    font-size: 2em;
    padding-right: 20px;
}

footer a:hover {
    color: var(--text-light);
}

/* Containers de imagem */
.image-container {
    text-align: center;
    margin: 30px 0;
    padding: var(--spacing-lg);
    border-radius: 8px;
}

.image-container img {
    width: var(--img-width);
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 5px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.image-container img:hover {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.image-container p {
    color: #666;
    font-size: 0.9em;
    margin: 10px 0 0;
}


/* Vídeos */
iframe {
    width: 854px;
    height: 480px;
    border: none;
    border-radius: var(--spacing-sm);
    box-shadow: var(--shadow-default);
    margin: var(--spacing-sm) 10%;
}

/* Busca e filtros */
.video-search-wrapper {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
}

.search-count {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.clear-button {
    padding: 8px 16px;
    background-color: var(--primary-color);
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.clear-button:hover {
    background-color: #ddd;
}

/* Grade de vídeos por seção */
.video-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.video-item {
    position: relative;
    flex: 0 0 calc((100% / 3) - 13.33px);
    max-width: calc((100% / 3) - 13.33px);
    box-sizing: border-box;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.video-item img {
    width: 100%;
    border-radius: 6px;
    display: block;
}

.video-item p {
    padding: 8px;
    margin: 0;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
}

.video-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: rgba(241, 162, 71, 0.623);
    pointer-events: none;
}

.video-item:hover img {
    filter: brightness(0.75);
}

.video-item:hover .play-icon {
    opacity: 1;
    color: rgba(241, 162, 71, 0.932);
}

.hidden {
    display: none !important;
}

/* === sidebar.css === */
/* Sidebar - estilo principal */
.sidebar {
    background-color: var(--sidebar-bg);
    color: var(--bg-white);
    width: 200px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 2;
}

/* Sidebar header */
.sidebar-header {
    padding: 12px 15px;
    font-weight: bold;
    display: flex;
    background: var(--sidebar-bg);
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    font-size: 1em;
    letter-spacing: 1px;
    text-decoration: none;
}

/* Base para itens de sidebar */
.sidebar-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--bg-white);
    min-height: 48px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-item:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.sidebar-item.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    font-weight: bold;
}

.sidebar-icon {
    font-size: 1.2em;
    width: 24px;
    margin-right: 10px;
}

.sidebar-text {
    font-size: 1em;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Sidebar subitems */
.sidebar-subitem {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 10px 30px;
    color: var(--bg-white);
    background: var(--sidebar-subitem-bg);
    font-size: 0.98em;
    border-left: 3px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sidebar-subitem:hover {
    background: #222;
    border-left: 3px solid var(--primary-color);
    color: var(--sidebar-highlight);
}

.sidebar-subitem.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-left: 3px solid var(--bg-white);
    font-weight: bold;
}

.sidebar-subitem.hidden {
    display: none !important;
}

/* Sidebar collapsible group support */
.sidebar-group {
    display: none;
    padding-left: 20px;
}

.sidebar-group.expanded {
    display: block;
}

.sidebar-header.collapsed {
    opacity: 0.7;
}

.sidebar-header::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: auto;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid currentColor;
    transition: transform 0.2s;
}

.sidebar-header.collapsed::after {
    transform: rotate(180deg);
}

/* === navigation.css === */
/* Navegação */
.nav {
    position: sticky;
    top: var(--spacing-lg);
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav h3,
.nav a {
    color: var(--primary-color);
}

.nav ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.nav li {
    margin-bottom: 5px;
}

.nav a {
    text-decoration: none;
}

.nav a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

/* Navegação de Operações PCP */
.pcp-operations-nav {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--spacing-sm);
}

.pcp-operations-nav .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
}

.pcp-operations-nav .nav-item {
    color: var(--text-color);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.pcp-operations-nav .nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.pcp-operations-nav .nav-item.active {
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: var(--spacing-sm);
}

.pcp-operations-nav .nav-item i {
    font-size: 1em;
}

/* === components.css === */
/* Alertas e notas */
.alert-yellow {
    background: #fff9c4;
    border-left: 4px solid #ffe082;
    padding: 12px 18px;
    margin: 18px 0;
    border-radius: 4px;
    color: #665c00;
    font-size: .8em;
}

.alert-orange {
    border: 2px dashed var(--primary-color);
    background-color: rgba(227, 107, 44, 0.1);
    padding: var(--spacing-md);
    border-radius: 8px;
    position: relative;
    font-size: .75rem;
}

.alert-orange::before {
    content: "⚠️";
    position: absolute;
    right: 10px;
    top: 10px;
}

/* Details e summary */
details {
    border-radius: 5px;
    padding: 0 15px 15px;
    margin-bottom: var(--spacing-lg);
}

details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 8px;
    background-color: var(--even-row-bg);
    border-radius: 4px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

details summary:hover {
    background-color: var(--hover-bg);
}

/* Botões */
.btn,
.button, 
button, 
.search-button {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn:hover,
.button:hover, 
button:hover, 
.search-button:hover {
    background-color: var(--secondary-color);
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
}

th {
    background-color: var(--secondary-color);
    color: var(--bg-white);
    text-align: left;
    padding: 10px;
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

tr:nth-child(even) {
    background-color: var(--even-row-bg);
}

tr:hover {
    background-color: var(--hover-bg);
}

/* === banner.css === */
:root {
    --gradient-start: #E36B2C 50%;
    --gradient-end: transparent 70%;
    --gradient-blue: #0381b9 50%;
}

/* Estilos para os banners do módulo 3D */

/* Estilo base para todos os headers com banner */
.content-wrapper header {
    position: relative;
    padding: 2rem;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
}

/* Estilo específico para h1 dentro dos banners */
.content-wrapper header h1 {
    color: var(--text-light);
    margin: 0;
    font-size: var(--font-size-xxl);
}

/* Banners específicos para cada página do 3D*/
.content-wrapper header.index-banner {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-end)), url('../empresa/banner/banner-3D.png');
}

/* Banners específicos para cada página do PCP*/

.content-wrapper header.pcp-index-banner {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-end)), url('../pcp/banner/banner-PCP.png'); 
}

/* Banners específicos para cada página do ERP*/

.content-wrapper header.erp-index-banner {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-end)), url('../erp/banner/banner-ERP.png');
}

/* Banners específicos para cada página dos plugin*/

.content-wrapper header.plugin-banner {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-end)), url('../plugin/banner-plugin.png');
}

.content-wrapper header.manual-banner {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-end)), url('../manuais/banner/banner-manual.png');
}

.content-wrapper header.beep-banner {
    background-image: linear-gradient(to right, var(--gradient-blue), var(--gradient-end)), url('../beep/img/banner-beep.png');
}

/* === modal.css === */
.modal {
    display: none;
    position: fixed;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    width: 100%;
    gap: 16px;
    padding: 20px;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 70vh;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    right: 35px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #bbb;
} 

#modal-video-wrapper {
    width: 90%;
    max-width: 800px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.modal-video-header {
    color: #ffffff;
    text-align: center;
    font-size: 20px;
}

#modal-video-wrapper iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    border: none;
    border-radius: 8px;
}

.modal-close-button {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 36px;
    font-weight: bold;
    color: #f1f1f1;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    z-index: 5;
}

.modal-close-button:hover {
    color: #bbb;
    background: rgba(0, 0, 0, 0.7);
}

.modal-subtext {
    color: #ffffff;
    font-size: 1rem;
    font-style: italic;
    text-align: center;
}

/* === responsive.css === */
/* Media Queries para responsividade */
@media screen and (max-width: 1366px) {
    :root {
        --img-width: 450px;
    }
    
    body {
        max-width: 95%;
        padding: var(--spacing-md);
    }
    
    iframe {
        width: 580px;
        height: 328px;
    }
    
    .modal-content {
        max-width: 85%;
    }
}

@media (max-width: 1024px) {
    .video-item {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media screen and (max-width: 768px) {
    :root {
        --spacing-lg: 10px;
        --font-size-xl: 1.75rem;
        --font-size-lg: 1.35rem;
        --font-size-md: 1.1rem;
    }
    
    body {
        max-width: 100%;
        padding: var(--spacing-sm);
    }
    
    .sidebar {
        width: 60px;
        transition: width 0.3s ease;
    }

    .sidebar-subitem {
        padding: var(--spacing-lg) 20px;
    }
    
    .content-wrapper {
        margin-left: 60px;
        transition: margin-left 0.3s ease;
    }
    
    h1 { 
        font-size: var(--font-size-xl); 
    }
    
    .section, .container {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .image-container {
        margin: var(--spacing-md) 0;
    }
    
    .image-container img {
        max-width: 100%;
    }
    
    table { 
        font-size: 0.9em; 
    }
    
    th, td { 
        padding: var(--spacing-sm); 
    }
    
    .sidebar-text { 
        display: none; 
    }
    
    .sidebar-item { 
        padding: var(--spacing-xs) var(--spacing-md); 
    }
    
    .sidebar-icon { 
        margin-right: 0; 
    }
    
    .logo img { 
        height: 30px; 
    }
    
    .logo-text { 
        font-size: var(--font-size-md); 
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .modal-close {
        right: 20px;
        top: 10px;
        font-size: 30px;
    }
}

@media (max-width: 600px) {
    .video-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --font-size-lg: 1.25rem;
        --font-size-md: 1rem;
        --font-size-sm: 0.9rem;
        --font-size-xs: 0.8rem;
    }
    
    body { 
        padding: var(--spacing-xs); 
    }
    
    header { 
        padding: var(--spacing-sm); 
    }
    
    h1 { 
        font-size: var(--font-size-lg); 
    }
    
    .section { 
        padding: var(--spacing-sm); 
    }
    
    iframe {
        width: 320px;
        height: 180px;
    }
    
    .modal-close {
        right: 15px;
        top: 5px;
        font-size: 25px;
    }
}

@media print {
    .sidebar {
    display: none !important;
}

    .content-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

    body, html {
    margin: 0 !important;
    padding: 0 !important;
    }
}

