/**
 * ProsBZH Template Stylesheet
 * Modern Bootstrap 5 template for Joomla 4/5
 * (C) 2024 Yapuka.dev
 */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Brand Colors - Can be overridden by template params */
    --pros-primary: #42d392;
    --pros-secondary: #2db87e;
    --pros-dark: #001e26;
    --pros-light: #f8f9fa;
    --pros-gradient: linear-gradient(135deg, var(--pros-primary) 0%, var(--pros-secondary) 100%);

    /* Typography */
    --pros-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --pros-font-size-base: 1rem;
    --pros-line-height: 1.6;

    /* Spacing */
    --pros-header-height: 80px;
    --pros-section-padding: 5rem;

    /* Transitions */
    --pros-transition: all 0.3s ease;
    --pros-transition-fast: all 0.15s ease;

    /* Shadows */
    --pros-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --pros-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --pros-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Border Radius */
    --pros-radius-sm: 0.5rem;
    --pros-radius: 1rem;
    --pros-radius-lg: 1.5rem;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--pros-font-family);
    font-size: var(--pros-font-size-base);
    line-height: var(--pros-line-height);
    color: #f8f9fa;
    background-color: var(--pros-dark);
    overflow-x: hidden;
}

/* Links */
a {
    color: var(--pros-primary);
    text-decoration: none;
    transition: var(--pros-transition-fast);
}

a:hover {
    color: var(--pros-secondary);
    text-decoration: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Selection */
::selection {
    background-color: var(--pros-primary);
    color: #fff;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Background Colors */
.bg-pros-primary { background-color: var(--pros-primary) !important; }
.bg-pros-secondary { background-color: var(--pros-secondary) !important; }
.bg-pros-dark { background-color: var(--pros-dark) !important; }
.bg-pros-light { background-color: var(--pros-light) !important; }
.bg-pros-gradient { background: var(--pros-gradient) !important; }

/* Text Colors */
.text-pros-primary { color: var(--pros-primary) !important; }
.text-pros-secondary { color: var(--pros-secondary) !important; }
.text-pros-dark { color: var(--pros-dark) !important; }
.text-pros-light { color: var(--pros-light) !important; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--pros-radius-sm);
    transition: var(--pros-transition);
}

.btn-pros-primary {
    background: var(--pros-gradient);
    border: none;
    color: #fff;
}

.btn-pros-primary:hover {
    background: var(--pros-secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--pros-shadow);
}

.btn-pros-outline {
    background: transparent;
    border: 2px solid var(--pros-primary);
    color: var(--pros-primary);
}

.btn-pros-outline:hover {
    background: var(--pros-primary);
    color: #fff;
}

.btn-pros-white {
    background: #fff;
    border: none;
    color: var(--pros-primary);
}

.btn-pros-white:hover {
    background: var(--pros-light);
    color: var(--pros-secondary);
    transform: translateY(-2px);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background-color: var(--pros-dark);
    z-index: 1030;
}

.site-header.sticky-top {
    transition: var(--pros-transition);
}

/* Topbar */
.topbar {
    font-size: 0.875rem;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    min-height: var(--pros-header-height);
}

.navbar-brand {
    padding: 0;
}

.logo-img {
    max-height: 50px;
    width: auto;
}

.logo-img-small {
    max-height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Navigation Links */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--pros-transition-fast);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--pros-primary);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: var(--pros-primary);
}

/* Dropdown */
.navbar .dropdown-menu {
    border: none;
    border-radius: var(--pros-radius-sm);
    box-shadow: var(--pros-shadow-lg);
    padding: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: var(--pros-transition-fast);
}

.navbar .dropdown-item:hover {
    background-color: var(--pros-light);
    color: var(--pros-primary);
}

/* ==========================================================================
   Offcanvas Menu
   ========================================================================== */

.offcanvas {
    width: 300px;
}

.offcanvas-body .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas-body .nav-link:hover {
    color: var(--pros-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: var(--pros-gradient);
    color: #fff;
    padding: var(--pros-section-padding) 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>') repeat;
    background-size: 100px 100px;
    opacity: 0.5;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb-wrapper {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item.active {
    color: var(--pros-primary);
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-main {
    min-height: calc(100vh - var(--pros-header-height) - 300px);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    border: none;
    border-radius: var(--pros-radius);
    box-shadow: var(--pros-shadow);
    transition: var(--pros-transition);
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8f9fa;
}

.card:hover {
    box-shadow: var(--pros-shadow-lg);
    transform: translateY(-5px);
}

.card-header {
    background: var(--pros-gradient);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Module Card Style */
.mod-card {
    margin-bottom: 1.5rem;
}

.mod-card .card-header {
    font-size: 1.1rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    margin-top: auto;
}

.site-footer h5,
.site-footer .h5 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.site-footer h5::after,
.site-footer .h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--pros-gradient);
    border-radius: 2px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: column;
    width: 100%;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
    width: 100%;
    display: block;
}

.site-footer .module-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.site-footer .module-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--pros-gradient);
    border-radius: 2px;
}

/* Override Bootstrap nav styles in footer */
.site-footer ul.nav,
.site-footer ul.mod-menu,
.site-footer ul.mod-list,
.site-footer .footer-widgets ul,
.site-footer .footer-widgets .nav,
footer.site-footer ul.nav.mod-menu.mod-list {
    display: block !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}

.site-footer .nav-item,
.site-footer .mod-menu li,
.site-footer .mod-list li,
.site-footer .footer-widgets ul li,
.site-footer .footer-widgets li.nav-item,
footer.site-footer ul.nav li {
    width: 100% !important;
    display: block !important;
    flex: none !important;
    float: none !important;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--pros-transition-fast);
}

.site-footer a:hover {
    color: var(--pros-primary);
    padding-left: 5px;
}

.footer-bottom {
    font-size: 0.9rem;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--pros-transition);
    z-index: 1000;
    box-shadow: var(--pros-shadow);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control,
.form-select {
    border-radius: var(--pros-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem;
    transition: var(--pros-transition-fast);
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8f9fa;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--pros-primary);
    box-shadow: 0 0 0 0.2rem rgba(66, 211, 146, 0.25);
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    border: none;
    border-radius: var(--pros-radius-sm);
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: rgba(66, 211, 146, 0.15);
    color: var(--pros-secondary);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.15);
    color: #0c5460;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    gap: 0.25rem;
}

.page-link {
    border: none;
    border-radius: var(--pros-radius-sm);
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(255, 255, 255, 0.05);
    transition: var(--pros-transition-fast);
}

.page-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--pros-primary);
}

.page-item.active .page-link {
    background: var(--pros-gradient);
    border: none;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    border-radius: var(--pros-radius-sm);
    overflow: hidden;
}

.table thead th {
    background: var(--pros-gradient);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Accordion
   ========================================================================== */

.accordion-item {
    border: none;
    border-radius: var(--pros-radius) !important;
    margin-bottom: 1rem;
    box-shadow: var(--pros-shadow-sm);
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
}

.accordion-button {
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.08);
    color: #f8f9fa;
}

.accordion-button.collapsed {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.accordion-button:not(.collapsed) {
    background: var(--pros-gradient);
    color: #fff;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.accordion-body {
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }

    .navbar {
        padding: 0.75rem 0;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .section {
        padding: 3rem 0;
    }
}

@media (max-width: 767.98px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .footer-widgets .col-md-6 {
        text-align: center;
    }

    .site-footer h5::after,
    .site-footer .h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .breadcrumb-wrapper {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        color: #000;
    }

    .container,
    .container-fluid {
        width: 100%;
        max-width: none;
    }
}
