/**
 * VioColor Joomla 4 / 5 Template Stylesheet
 * 
 * Copyright (C) 2026 Vio Color Performance Coatings. All rights reserved.
 * License: GNU General Public License version 2 or later
 */

/* ==========================================================================
   CSS Variables & Theme Defaults
   ========================================================================== */
:root {
    --viocolor-primary: #b13de2;
    --viocolor-primary-dark: #7e22a3;
    --viocolor-primary-deep: #180324;
    --viocolor-accent: #ec079a;
    --viocolor-grad-start: #180324;
    --viocolor-grad-mid: #631b84;
    --viocolor-grad-end: #b13de2;
    --viocolor-header-grad: linear-gradient(90deg, var(--viocolor-grad-start) 0%, var(--viocolor-grad-mid) 50%, var(--viocolor-grad-end) 100%);
    
    --viocolor-font-heading: 'Playfair Display', Georgia, serif;
    --viocolor-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --viocolor-container: 1320px;
    --viocolor-text-color: #212529;
    --viocolor-text-muted: #6c757d;
    --viocolor-bg-light: #f8f9fa;
    --viocolor-border-color: #e9ecef;
    --viocolor-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --viocolor-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --viocolor-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
    
    --viocolor-radius-sm: 4px;
    --viocolor-radius-md: 6px;
    --viocolor-radius-lg: 12px;
    --viocolor-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   CSS Reset & Base Setup
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--viocolor-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--viocolor-text-color);
    background-color: #ffffff;
    overflow-x: hidden;
}

a {
    color: var(--viocolor-primary-dark);
    text-decoration: none;
    transition: var(--viocolor-transition);
}

a:hover {
    color: var(--viocolor-primary);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--viocolor-font-heading);
    color: #111827;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Container */
.viocolor-container {
    width: 100%;
    max-width: var(--viocolor-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ==========================================================================
   TOPBAR (Optional)
   ========================================================================== */
.viocolor-topbar {
    background-color: #0e0215;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   MAIN HEADER (Exact Gradient & Layout from Screenshot)
   ========================================================================== */
.viocolor-header {
    background: var(--viocolor-header-grad);
    padding: 12px 0;
    width: 100%;
    position: relative;
    z-index: 1000;
    transition: var(--viocolor-transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.viocolor-header.is-sticky {
    position: sticky;
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.viocolor-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 96px;
}

/* Brand / Logo */
.viocolor-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.viocolor-brand a,
.viocolor-logo-link {
    display: inline-block;
    line-height: 0;
    transition: transform 0.25s ease;
}

.viocolor-brand a:hover,
.viocolor-logo-link:hover {
    transform: scale(1.02);
}

.viocolor-brand img,
.viocolor-logo-img {
    height: 90px;
    width: auto;
    max-width: 160px;
    border-radius: 18px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
    transition: var(--viocolor-transition);
}

/* Desktop Navigation */
.viocolor-nav-wrap {
    display: flex;
    align-items: center;
    margin-left: 36px;
    margin-right: auto;
}

.viocolor-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
}

.viocolor-nav .nav-item {
    position: relative;
}

.viocolor-nav .nav-link {
    font-family: var(--viocolor-font-body);
    font-size: 1.05rem;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 2px;
    display: inline-block;
    position: relative;
    transition: color 0.2s ease, opacity 0.2s ease;
    letter-spacing: 0.2px;
}

.viocolor-nav .nav-link:hover {
    color: #ffffff;
    opacity: 0.85;
}

/* Active indicator underline (Matching the "Home" underline in screenshot) */
.viocolor-nav .nav-item.active > .nav-link,
.viocolor-nav .nav-link.active {
    font-weight: 600;
}

.viocolor-nav .nav-item.active > .nav-link::after,
.viocolor-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
}

/* Dropdown Navigation */
.viocolor-nav .has-dropdown {
    position: relative;
}

.viocolor-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a0528;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--viocolor-radius-md);
    padding: 8px 0;
    margin-top: 8px;
    list-style: none;
    display: none;
    z-index: 1100;
}

.viocolor-nav .has-dropdown:hover > .dropdown-menu {
    display: block;
    animation: fadeInSlide 0.2s ease forwards;
}

.viocolor-nav .dropdown-menu .nav-link {
    display: block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.viocolor-nav .dropdown-menu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.viocolor-nav .dropdown-menu .nav-link::after {
    display: none !important;
}

/* Right Header Action Icons */
.viocolor-header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}

.action-btn {
    background: none;
    border: none;
    padding: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--viocolor-transition);
    line-height: 1;
}

.action-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
    opacity: 0.9;
}

.action-icon {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Mobile Hamburger Toggle */
.viocolor-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-around;
    width: 38px;
    height: 38px;
    z-index: 1001;
}

.hamburger-bar {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: var(--viocolor-transition);
}

/* ==========================================================================
   HERO BANNER (Exact Style from Screenshot)
   ========================================================================== */
.viocolor-hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 60px 0 70px 0;
}

.viocolor-hero-overlay {
    position: absolute;
    inset: 0;
    /* Moody overlay gradient: darker on left behind text, lighter on right to showcase roller */
    background: linear-gradient(
        90deg,
        rgba(15, 20, 26, 0.75) 0%,
        rgba(15, 20, 26, 0.55) 45%,
        rgba(15, 20, 26, 0.25) 100%
    );
    z-index: 1;
}

.viocolor-hero-section.overlay-none .viocolor-hero-overlay {
    display: none;
}
.viocolor-hero-section.overlay-light .viocolor-hero-overlay {
    background: linear-gradient(90deg, rgba(15, 20, 26, 0.5) 0%, rgba(15, 20, 26, 0.1) 100%);
}
.viocolor-hero-section.overlay-dark .viocolor-hero-overlay {
    background: linear-gradient(90deg, rgba(15, 20, 26, 0.88) 0%, rgba(15, 20, 26, 0.5) 100%);
}

.viocolor-hero-content-wrap {
    position: relative;
    z-index: 2;
}

.viocolor-hero-content {
    max-width: 640px;
}

/* Hero Typography */
.hero-title {
    font-family: var(--viocolor-font-heading);
    font-size: 3.3rem;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 14px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-family: var(--viocolor-font-body);
    font-size: 1.15rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
    margin: 0 0 28px 0;
    letter-spacing: 0.1px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--viocolor-font-body);
    font-size: 1rem;
    font-weight: 500;
    padding: 11px 26px;
    border-radius: var(--viocolor-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--viocolor-transition);
    line-height: 1.4;
}

/* Button 1: Solid White */
.btn-hero-solid {
    background-color: #ffffff;
    color: #1a1e24;
    border: 1.5px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-hero-solid:hover {
    background-color: #f1f3f5;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* Button 2: Translucent Slate Glass with White Border */
.btn-hero-glass {
    background-color: rgba(45, 55, 66, 0.78);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-hero-glass:hover {
    background-color: #ffffff;
    color: #1a1e24;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.viocolor-breadcrumbs-wrap {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--viocolor-border-color);
    padding: 12px 0;
    font-size: 0.9rem;
}

.viocolor-breadcrumbs-wrap ol.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.viocolor-breadcrumbs-wrap ol.breadcrumb li + li::before {
    content: '/';
    margin-right: 8px;
    color: var(--viocolor-text-muted);
}

/* ==========================================================================
   MAIN CONTENT & SIDEBARS
   ========================================================================== */
.viocolor-main {
    padding: 50px 0 70px 0;
    min-height: 450px;
}

.viocolor-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

.viocolor-layout-grid.has-sidebar-left {
    grid-template-columns: 280px 1fr;
}

.viocolor-layout-grid.has-sidebar-right {
    grid-template-columns: 1fr 280px;
}

.viocolor-layout-grid.has-sidebar-left.has-sidebar-right {
    grid-template-columns: 260px 1fr 260px;
}

.viocolor-sidebar {
    background-color: #fafbfc;
    border: 1px solid var(--viocolor-border-color);
    border-radius: var(--viocolor-radius-md);
    padding: 24px;
}

.viocolor-sidebar .moduletable {
    margin-bottom: 28px;
}

.viocolor-sidebar .moduletable:last-child {
    margin-bottom: 0;
}

.viocolor-sidebar h3.module-title,
.viocolor-sidebar h3 {
    font-size: 1.2rem;
    font-family: var(--viocolor-font-heading);
    color: #1a0528;
    border-bottom: 2px solid var(--viocolor-primary);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* Component Articles & Pages */
.viocolor-component article {
    margin-bottom: 30px;
}

.viocolor-component .page-header h1,
.viocolor-component .page-header h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   MODULE GRIDS (top-a, top-b, bottom-a, etc.)
   ========================================================================== */
.viocolor-top-modules,
.viocolor-bottom-modules {
    padding: 40px 0;
    background-color: #f8f9fa;
    border-top: 1px solid var(--viocolor-border-color);
}

.viocolor-top-modules .row,
.viocolor-bottom-modules .row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.viocolor-top-modules .col,
.viocolor-bottom-modules .col {
    flex: 1 1 0%;
    min-width: 250px;
}

.viocolor-top-modules .col-6 {
    flex: 0 0 calc(50% - 12px);
}

.viocolor-top-modules .col-12 {
    flex: 0 0 100%;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.viocolor-footer {
    background: #11031a;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px 0;
    border-top: 3px solid var(--viocolor-primary-dark);
}

.viocolor-footer a {
    color: rgba(255, 255, 255, 0.85);
}

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

.footer-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 36px;
    margin-bottom: 40px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   SEARCH MODAL
   ========================================================================== */
.viocolor-search-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.viocolor-search-modal.is-open {
    display: flex;
}

.search-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 3, 24, 0.85);
    backdrop-filter: blur(6px);
}

.search-modal-dialog {
    position: relative;
    z-index: 2001;
    width: 90%;
    max-width: 620px;
    background: #1f062e;
    border: 1px solid var(--viocolor-primary);
    border-radius: var(--viocolor-radius-lg);
    padding: 36px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.search-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: #0d0114;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--viocolor-radius-md);
    padding: 4px 12px;
}

.search-input-wrap:focus-within {
    border-color: var(--viocolor-primary);
    box-shadow: 0 0 0 3px rgba(177, 61, 226, 0.25);
}

.search-field {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.1rem;
    padding: 12px;
}

.search-submit {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
}

/* ==========================================================================
   MOBILE OFF-CANVAS DRAWER
   ========================================================================== */
.viocolor-drawer-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.viocolor-drawer-backdrop.is-open {
    display: block;
    opacity: 1;
}

.viocolor-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background-color: #170322;
    z-index: 1501;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.viocolor-drawer.is-open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title {
    color: #ffffff;
    font-family: var(--viocolor-font-heading);
    font-size: 1.25rem;
}

.drawer-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.drawer-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.viocolor-mobile-nav,
.drawer-body .viocolor-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.viocolor-mobile-nav a,
.drawer-body .viocolor-nav .nav-link {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.viocolor-mobile-nav li.active a,
.drawer-body .viocolor-nav .nav-item.active .nav-link {
    color: var(--viocolor-accent);
    font-weight: 600;
}

.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.drawer-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 991px) {
    .viocolor-nav-wrap {
        display: none;
    }

    .viocolor-hamburger {
        display: flex;
    }

    .viocolor-layout-grid.has-sidebar-left,
    .viocolor-layout-grid.has-sidebar-right,
    .viocolor-layout-grid.has-sidebar-left.has-sidebar-right {
        grid-template-columns: 1fr;
    }

    .viocolor-logo-img {
        height: 75px;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .viocolor-hero-section {
        min-height: 440px;
        padding: 50px 0 60px 0;
    }
}

@media (max-width: 576px) {
    .viocolor-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .viocolor-logo-img {
        height: 65px;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-hero {
        text-align: center;
        width: 100%;
    }

    .viocolor-hero-section {
        min-height: 400px;
        padding: 40px 0 50px 0;
    }
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
