/*
Theme Name: Staff Training Portal
Theme URI: https://example.com
Author: Istinbat Research & Consultancy Center
Author URI: https://example.com
Description: Staff Training Portal - A complete training management theme
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: staff-training-portal
*/

/* =========================================
   BRAND COLORS
   Primary:   #0d304f (Navy Blue)
   Secondary: #6bbe46 (Green)
========================================= */

:root {
    --primary:     #0d304f;
    --secondary:   #6bbe46;
    --primary-dark: #081f33;
    --primary-light: #1a4a73;
    --secondary-dark: #52a033;
    --white:       #ffffff;
    --light-bg:    #f4f7fa;
    --text-dark:   #1a1a1a;
    --text-muted:  #6c757d;
    --border:      #dde3ea;
    --shadow:      0 2px 12px rgba(13,48,79,0.10);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
}
a { color: var(--secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary-dark); }
img { max-width: 100%; height: auto; }

/* ---- HEADER ---- */
#site-header {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.site-logo span.logo-icon {
    background: var(--secondary);
    color: var(--primary);
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
}
#site-nav ul { list-style: none; display: flex; gap: 4px; }
#site-nav ul li a {
    color: rgba(255,255,255,0.85);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}
#site-nav ul li a:hover,
#site-nav ul li.current-menu-item a {
    background: var(--secondary);
    color: var(--primary);
}
.header-user-actions { display: flex; align-items: center; gap: 10px; }
.btn-login {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: 7px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-login:hover { background: var(--secondary); color: var(--primary); }
.btn-register-nav {
    background: var(--secondary);
    color: var(--primary);
    border: 2px solid var(--secondary);
    padding: 7px 18px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-register-nav:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); }

/* ---- HERO ---- */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 80px 24px 60px;
    text-align: center;
}
.hero-section h1 { font-size: 2.6rem; font-weight: 800; margin-bottom: 16px; }
.hero-section p { font-size: 1.15rem; opacity: 0.88; max-width: 600px; margin: 0 auto 32px; }
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
    display: block;
}
.hero-stat .label { font-size: 0.9rem; opacity: 0.8; }

/* ---- SEARCH BAR ---- */
.search-section {
    background: var(--white);
    padding: 28px 24px;
    box-shadow: var(--shadow);
}
.search-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}
.search-inner input[type="text"] {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-inner input[type="text"]:focus { border-color: var(--secondary); }
.btn-search {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-search:hover { background: var(--secondary-dark); }

/* ---- MAIN CONTAINER ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.main-content { padding: 48px 0; }

/* ---- SECTION TITLES ---- */
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.section-title span { color: var(--secondary); }
.section-subtitle { color: var(--text-muted); margin-bottom: 32px; }

/* ---- TRAINING CARDS ---- */
.trainings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}
.training-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}
.training-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(13,48,79,0.15);
}
.card-header {
    background: var(--primary);
    padding: 20px;
    position: relative;
}
.card-category {
    background: var(--secondary);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 10px;
    line-height: 1.4;
}
.card-body { padding: 20px; }
.card-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.card-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.card-meta-item .icon {
    color: var(--secondary);
    font-size: 1rem;
    width: 18px;
}
.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.seats-badge {
    background: var(--light-bg);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.seats-badge.few { background: #fff3cd; color: #856404; }
.seats-badge.full { background: #f8d7da; color: #721c24; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-secondary { background: var(--secondary); color: var(--primary); }
.btn-secondary:hover { background: var(--secondary-dark); color: var(--primary); }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- FILTERS ---- */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.filter-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    border-color: var(--secondary);
    background: var(--secondary);
    color: var(--primary);
}

/* ---- TRAINING DETAIL ---- */
.training-detail-header {
    background: var(--primary);
    color: var(--white);
    padding: 48px 24px;
}
.training-detail-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.training-meta-pills { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.meta-pill {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.meta-pill .highlight { color: var(--secondary); font-weight: 700; }
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    padding: 40px 0;
}
.detail-main { display: flex; flex-direction: column; gap: 28px; }
.detail-card {
    background: var(--white);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.detail-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
}
.agenda-list { list-style: none; }
.agenda-list li {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.agenda-list li:last-child { border-bottom: none; }
.agenda-time {
    background: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
    height: fit-content;
}
.sidebar-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: sticky;
    top: 90px;
}
.sidebar-card-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px;
}
.sidebar-card-header h3 { font-size: 1.1rem; font-weight: 700; }
.sidebar-card-body { padding: 20px; }
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }
.info-row .value { font-weight: 600; color: var(--primary); }
.seats-progress {
    margin: 16px 0;
    background: var(--border);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}
.seats-progress-bar {
    height: 100%;
    background: var(--secondary);
    border-radius: 10px;
    transition: width 0.5s;
}

/* ---- FORMS ---- */
.form-section {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 0;
}
.form-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.form-card-header {
    background: var(--primary);
    color: var(--white);
    padding: 28px 32px;
}
.form-card-header h2 { font-size: 1.4rem; font-weight: 800; }
.form-card-header p { opacity: 0.8; margin-top: 6px; font-size: 0.95rem; }
.form-card-body { padding: 32px; }
.form-group { margin-bottom: 22px; }
.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 7px;
    font-size: 0.95rem;
}
.form-group label .required { color: #e74c3c; margin-left: 3px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.97rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(107,190,70,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.83rem; color: var(--text-muted); margin-top: 5px; }

/* ---- MY TRAININGS DASHBOARD ---- */
.dashboard-hero {
    background: var(--primary);
    color: var(--white);
    padding: 40px 24px;
}
.dashboard-hero h1 { font-size: 1.8rem; font-weight: 800; }
.dashboard-hero p { opacity: 0.8; margin-top: 6px; }
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}
.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--secondary);
}
.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-card .stat-label { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }
.tabs {
    display: flex;
    gap: 4px;
    background: var(--white);
    padding: 6px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
    width: fit-content;
}
.tab-btn {
    padding: 9px 22px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.tab-btn.active { background: var(--primary); color: var(--white); }
.tab-btn:hover:not(.active) { background: var(--light-bg); }
.trainings-table {
    width: 100%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border-collapse: collapse;
}
.trainings-table th {
    background: var(--primary);
    color: var(--white);
    padding: 14px 18px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
}
.trainings-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.trainings-table tr:last-child td { border-bottom: none; }
.trainings-table tr:hover td { background: var(--light-bg); }
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: var(--light-bg); color: var(--text-muted); }

/* ---- CERTIFICATE VERIFY ---- */
.verify-section {
    max-width: 560px;
    margin: 60px auto;
    text-align: center;
}
.verify-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.verify-card-top {
    background: var(--primary);
    padding: 32px;
    color: var(--white);
}
.verify-icon {
    width: 70px; height: 70px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}
.verify-result-success {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}
.verify-result-fail {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

/* ---- FOOTER ---- */
#site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.75);
    padding: 48px 24px 24px;
    margin-top: 60px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-brand .brand-name {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-links h4 { color: var(--secondary); font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-links ul li a:hover { color: var(--secondary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom span { color: var(--secondary); }

/* ---- ALERTS / NOTICES ---- */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-stats { gap: 24px; }
    .detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .form-row { grid-template-columns: 1fr; }
    #site-nav { display: none; }
    .header-inner { padding: 0 16px; }
}
@media (max-width: 480px) {
    .trainings-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}
