/* 
   EventWeb Premium Theme 
   Design System & Custom Components
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --ew-primary: #4F46E5;
    /* Indigo 600 */
    --ew-primary-hover: #4338CA;
    /* Indigo 700 */
    --ew-primary-light: #EEF2FF;
    /* Indigo 50 */

    --ew-success: #10B981;
    --ew-danger: #EF4444;
    --ew-warning: #F59E0B;

    --ew-bg: #F3F4F6;
    /* Cool Gray 100 */
    --ew-surface: #FFFFFF;

    --ew-text-heading: #111827;
    /* Gray 900 */
    --ew-text-body: #374151;
    /* Gray 700 */
    --ew-text-muted: #6B7280;
    /* Gray 500 */

    --ew-border: #E5E7EB;
    /* Gray 200 */
    --ew-border-focus: #C7D2FE;
    /* Indigo 200 */

    /* Sidebar (Admin) */
    --ew-sidebar-bg: #1E1E2D;
    /* Dark Navy */
    --ew-sidebar-text: #9CA3AF;
    --ew-sidebar-active: #FFFFFF;
    --ew-sidebar-active-bg: rgba(255, 255, 255, 0.1);

    /* Dimensions & Spacing */
    --ew-radius: 12px;
    --ew-radius-sm: 8px;
    --ew-header-height: 70px;
    --ew-sidebar-width: 260px;
    --ew-sidebar-collapsed-width: 80px;

    /* Shadows */
    --ew-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ew-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ew-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Reset & Typography */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--ew-bg);
    color: var(--ew-text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 70px;
}

body.admin-body {
    padding-top: 0 !important;
}

@media (min-width: 768px) {
    body {
        padding-top: 180px;
        /* Desktop header height */
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ew-text-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--ew-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--ew-primary-hover);
}

/* Layout Utilities */
.ew-layout-split {
    display: flex;
    min-height: 100vh;
}

.ew-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 
   COMPONENTS 
*/

/* Buttons */
.ew-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--ew-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
    line-height: 1;
}

.ew-btn-primary {
    background-color: var(--ew-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.ew-btn-primary:hover {
    background-color: var(--ew-primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(79, 70, 229, 0.3);
}

.ew-btn-secondary {
    background-color: white;
    border-color: var(--ew-border);
    color: var(--ew-text-heading);
}

.ew-btn-secondary:hover {
    background-color: var(--ew-bg);
    border-color: #D1D5DB;
    color: #000;
}

.ew-btn-outline {
    background: transparent;
    border: 1px solid var(--ew-border);
    color: var(--ew-text-body);
}

.ew-btn-outline:hover {
    border-color: var(--ew-primary);
    color: var(--ew-primary);
    background-color: var(--ew-primary-light);
}

.ew-btn-ghost {
    background: transparent;
    color: var(--ew-text-muted);
}

.ew-btn-ghost:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--ew-text-heading);
}

.ew-btn-danger-soft {
    background-color: #FEF2F2;
    color: var(--ew-danger);
}

.ew-btn-danger-soft:hover {
    background-color: #FEE2E2;
}

.ew-btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Cards */
.ew-card {
    background: var(--ew-surface);
    /* border-radius: var(--ew-radius); */
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    /* Extremely subtle border */
    box-shadow: var(--ew-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.ew-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--ew-shadow-lg);
}

.ew-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--ew-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.ew-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--ew-text-heading);
}

.ew-card-body {
    padding: 1.5rem;
}

/* Inputs */
.ew-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ew-text-heading);
    background-color: var(--ew-surface);
    background-clip: padding-box;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ew-input:focus {
    border-color: var(--ew-primary);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.ew-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ew-text-heading);
}

/* Tables */
.ew-table-container {
    width: 100%;
    overflow-x: auto;
}

.ew-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.ew-table th {
    background-color: #F9FAFB;
    color: var(--ew-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ew-border);
}

.ew-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ew-border);
    color: var(--ew-text-body);
    font-size: 0.95rem;
    vertical-align: middle;
}

.ew-table tr:last-child td {
    border-bottom: none;
}

.ew-table tr:hover td {
    background-color: #F9FAFB;
}

/* Badges */
.ew-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.ew-badge-primary {
    background-color: var(--ew-primary-light);
    color: var(--ew-primary);
}

.ew-badge-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.ew-badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.ew-badge-secondary {
    background-color: #F3F4F6;
    color: #4B5563;
}

/* 
   LAYOUT SPECIFIC 
*/

/* Navbar (Public) */
.ew-navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ew-border);
    min-height: var(--ew-header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    /* Higher than other fixed elements if any */
    width: 100%;
    transition: all 0.3s ease;
    /* padding-top: 10px; */
    padding-bottom: 10px;
}

.header-logo {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .header-logo {
        height: 80px;
    }

    .header-menu-row {
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
}

.ew-navbar.scrolled {
    padding-top: 0px;
    padding-bottom: 0px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background-color: rgba(255, 255, 255, 0.98);
}

.ew-navbar.scrolled .header-logo {
    height: 35px;
}

@media (min-width: 768px) {
    .ew-navbar.scrolled .header-logo {
        height: 50px;
    }

    .ew-navbar.scrolled .header-menu-row {
        padding-top: 5px !important;
    }
}

.ew-navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--ew-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ew-nav-link {
    font-weight: 500;
    color: var(--ew-text-body);
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.ew-nav-link:hover,
.ew-nav-link.active {
    color: var(--ew-primary);
    font-weight: 600;
}

.ew-nav-link.active {
    position: relative;
}

.ew-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--ew-primary);
    border-radius: 2px;
}

/* Header Social Icons */
.header-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--ew-text-body);
    font-size: 0.9rem;
    background-color: rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    color: white;
}

.header-social-icon.inst:hover {
    background-color: #E1306C;
}

.header-social-icon.fb:hover {
    background-color: #1877F2;
}

.header-social-icon.tw:hover {
    background-color: #000000;
}

.header-social-icon.ln:hover {
    background-color: #0077B5;
}

.header-social-icon.yt:hover {
    background-color: #FF0000;
}

/* Admin Sidebar */
.ew-sidebar {
    width: var(--ew-sidebar-width);
    background-color: var(--ew-sidebar-bg);
    color: var(--ew-sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    transition: width 0.3s ease;
    z-index: 1030;
}

.ew-sidebar.collapsed {
    width: var(--ew-sidebar-collapsed-width);
}

.ew-sidebar-header {
    height: var(--ew-header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    white-space: nowrap;
}

.ew-sidebar.collapsed .ew-sidebar-header span {
    display: none;
}

.ew-sidebar-content {
    padding: 1.5rem 1rem;
    overflow-y: auto;
    flex: 1;
}

/* Modern & Minimal Scrollbar for Sidebar */
.ew-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.ew-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.ew-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ew-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ew-sidebar-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    border-radius: var(--ew-radius-sm);
    color: var(--ew-sidebar-text);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
}

.ew-sidebar-group-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.ew-sidebar-group-header i.chevron {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.ew-sidebar-group-header.collapsed i.chevron {
    transform: rotate(-90deg);
}

.ew-sidebar-submenu {
    padding-left: 1rem;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.ew-sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 0.125rem;
    border-radius: var(--ew-radius-sm);
    color: var(--ew-sidebar-text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.ew-sidebar-sublink:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.ew-sidebar-sublink.active {
    background-color: var(--ew-sidebar-active-bg);
    color: white;
}

.ew-sidebar-sublink i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* Sidebar Collapsed State */

.ew-sidebar.collapsed .ew-sidebar-group-header {
    display: none !important;
}

.ew-sidebar.collapsed .ew-sidebar-submenu {
    display: block !important;
    padding-left: 0;
    margin-top: 0.5rem;
}

.ew-sidebar.collapsed .ew-sidebar-sublink span {
    display: none;
}

.ew-sidebar.collapsed .ew-sidebar-sublink {
    justify-content: center;
    padding: 0.75rem 0;
}

.ew-sidebar.collapsed .ew-sidebar-sublink i {
    margin-right: 0;
    font-size: 1.25rem;
}

.ew-sidebar.collapsed .ew-sidebar-link span,
.ew-sidebar.collapsed .ew-sidebar-content small span,
.ew-sidebar.collapsed .ew-sidebar-footer .user-info,
.ew-sidebar.collapsed .ew-sidebar-footer button span {
    display: none;
}

.ew-sidebar.collapsed .ew-sidebar-link {
    justify-content: center;
    padding: 0.75rem 0;
}

.ew-sidebar.collapsed .ew-sidebar-link i {
    margin-right: 0;
    font-size: 1.25rem;
}

.ew-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Admin Main Content */
.ew-admin-main {
    margin-left: var(--ew-sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.ew-admin-main.sidebar-collapsed {
    margin-left: var(--ew-sidebar-collapsed-width);
}

.ew-topbar {
    height: var(--ew-header-height);
    background-color: white;
    border-bottom: 1px solid var(--ew-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    /* Sticky topbar? Optional */
}

.ew-content {
    padding: 2rem;
    max-width: 1400px;
}

/* Hero Section */
.ew-hero {
    background: linear-gradient(135deg, #F3F4F6 0%, #E0E7FF 100%);
    padding: 5rem 0;
    /* border-radius: 0 0 24px 24px; */
    margin-bottom: 4rem;
    text-align: center;
    background-position: bottom !important;
    border-radius: 30px;
    margin: 30px;
}

/* Utility Overrides for Bootstrap Grid compatibility only */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Card Enhancements & Premium Effects */
.ew-card-hover:hover .hover-primary-text {
    color: var(--ew-primary) !important;
}

.hover-primary-text {
    transition: color 0.3s ease;
}

.ew-card-hover:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Breadcrumbs */
.ew-breadcrumb {
    padding: 0.75rem 0;
    margin-bottom: 0px;
}

.ew-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ew-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.ew-breadcrumb .breadcrumb-item a {
    color: var(--ew-text-muted);
    transition: color 0.2s;
}

.ew-breadcrumb .breadcrumb-item a:hover {
    color: var(--ew-primary);
}

.ew-breadcrumb .breadcrumb-item.active {
    color: var(--ew-primary);
    font-weight: 600;
}

.ew-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "\F285" !important;
    /* bi-chevron-right */
    font-family: 'bootstrap-icons' !important;
    font-size: 0.7rem;
    color: var(--ew-text-muted);
    opacity: 0.5;
    padding-right: 0;
    float: none;
}

.text-white-50 .ew-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.6);
}

.text-white-50 .ew-breadcrumb .breadcrumb-item a:hover {
    color: white;
}

.text-white-50 .ew-breadcrumb .breadcrumb-item.active {
    color: white;
}

.text-white-50 .ew-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

/* Owl Carousel Enhancements */
.owl-carousel .owl-item img {
    border-radius: 30px;
}

/* Mobile Dropdown Fix (Offcanvas) */
@media (max-width: 767.98px) {
    .offcanvas-body .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        padding: 0;
        margin-top: 0.5rem !important;
        border: none;
        box-shadow: none;
        background: transparent;
        transform: none !important;
    }

    .offcanvas-body .dropdown-menu.show {
        display: block;
    }

    .offcanvas-body .dropdown-item {
        padding: 0.75rem 0.5rem 0.75rem 1rem !important;
        font-weight: 500;
        color: var(--ew-text-body);
    }

    .offcanvas-body .dropdown-item:hover {
        background-color: transparent;
        color: var(--ew-primary);
    }

    .offcanvas-body .dropdown-divider {
        display: none;
    }

    .offcanvas-body .dropdown-toggle::after {
        margin-left: auto;
    }
}

/* Navigation Enhancements */
.transition-all {
    transition: all 0.3s ease;
}

.dropdown-item:hover .bi-arrow-right {
    opacity: 0.5 !important;
    transform: translateX(3px);
}

.dropdown-toggle::after {
    display: none !important;
    /* Hide default bootstrap arrow as we use bi-chevron-down */
}