/**
 * Estilos Baseados no Template Lebari Education
 * Adaptado para o Website PoliPay
 * Integrado com config.php para cores dinâmicas
 */

/* ============================================
   VARIÁVEIS CSS (Serão sobrescritas pelo PHP)
   ============================================ */
:root {
    --primary-color: #0066cc;
    --secondary-color: #004499;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --text-color: #777777;
    --dark-color: #1a1a1a;
    --light-bg: #f8f9fa;
    --white: #ffffff;
}

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.7em;
    font-weight: 400;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover, a:focus {
    text-decoration: none;
    outline: none !important;
    color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    position: relative;
    font-weight: 600;
    margin: 0;
    background: none;
    line-height: 1.6em;
    color: var(--dark-color);
    font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
}

h1 { font-size: 55px; }
h2 { font-size: 40px; }
h3 { font-size: 30px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 18px; }

p {
    position: relative;
    line-height: 1.8em;
    margin-bottom: 15px;
}

/* ============================================
   CONTAINER
   ============================================ */
.auto-container {
    position: static;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
}

.outer-container {
    max-width: 1400px;
    padding: 0 15px;
    margin: 0 auto;
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader:before {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
    position: relative;
    width: 100%;
    z-index: 999;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-header.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    animation: slideDown 0.5s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-upper {
    padding: 20px 0;
}

.header-upper .logo-box {
    float: left;
}

.header-upper .logo img {
    max-height: 60px;
    width: auto;
}

.nav-outer {
    float: right;
    display: flex;
    align-items: center;
}

.main-menu {
    display: flex;
    align-items: center;
}

.main-menu .navigation {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-menu .navigation > li {
    position: relative;
    margin-left: 30px;
}

.main-menu .navigation > li > a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-color);
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.main-menu .navigation > li > a:hover,
.main-menu .navigation > li.current > a {
    color: var(--primary-color);
}

/* Mobile Menu Toggler */
.mobile-nav-toggler {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--dark-color);
    margin-left: 20px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.8);
    transition: all 0.5s ease;
}

.mobile-menu .menu-backdrop {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.mobile-menu .close-btn {
    position: absolute;
    right: 30px;
    top: 30px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
}

.mobile-menu .menu-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: var(--white);
    padding: 80px 30px 30px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu .nav-logo {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu .nav-logo img {
    max-height: 50px;
}

.mobile-menu .navigation {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu .navigation li {
    margin-bottom: 10px;
}

.mobile-menu .navigation li a {
    display: block;
    padding: 12px 15px;
    color: var(--dark-color);
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu .navigation li a:hover,
.mobile-menu .navigation li.current a {
    background: var(--primary-color);
    color: var(--white);
}

body.mobile-menu-visible .mobile-menu {
    left: 0;
}

body.mobile-menu-visible {
    overflow: hidden;
}

/* ============================================
   BANNER SECTION
   ============================================ */
.banner-section {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    overflow: hidden;
}

.banner-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.banner-section .auto-container {
    position: relative;
    z-index: 2;
}

.banner-section h1 {
    color: var(--white);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.banner-section .title {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banner-section .text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

/* ============================================
   BUTTONS
   ============================================ */
.theme-btn {
    position: relative;
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.theme-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.theme-btn.btn-style-two {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.theme-btn.btn-style-two:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 25px;
    border: none;
    font-weight: 600;
    font-size: 18px;
}

.card-body {
    padding: 30px;
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
    width: 100%;
    padding: 15px 20px;
    font-size: 15px;
    color: var(--dark-color);
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control-lg {
    padding: 18px 25px;
    font-size: 16px;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: block;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    width: 100%;
    margin-bottom: 0;
    background: var(--white);
}

.table thead th {
    background: var(--light-bg);
    color: var(--dark-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: var(--success-color) !important;
    color: var(--white);
}

.badge.bg-danger {
    background: var(--danger-color) !important;
    color: var(--white);
}

.badge.bg-warning {
    background: var(--warning-color) !important;
    color: var(--dark-color);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    border: none;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fff5f5;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #f0fff4;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    position: relative;
    background: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

.main-footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.main-footer a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    position: relative;
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title .title {
    font-size: 16px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-title h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.section-title .text {
    font-size: 16px;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .mobile-nav-toggler {
        display: block;
    }
    
    .main-menu .navigation {
        display: none;
    }
    
    .banner-section h1 {
        font-size: 36px;
    }
    
    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    h3 { font-size: 26px; }
}

@media (max-width: 767px) {
    .banner-section {
        padding: 80px 0 60px;
    }
    
    .banner-section h1 {
        font-size: 28px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .table {
        font-size: 13px;
    }
    
    .table thead th,
    .table td {
        padding: 10px 8px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.wow {
    visibility: hidden;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

