:root {
    /* Mogos Event Brand Colors */
    --primary-color: #f6661e;
    --primary-dark: #d65616;
    --primary-light: #ff8a4a;
    --secondary-color: #0b224b;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #0b224b;

    /* Modern Color Enhancements */
    --bg-gradient: linear-gradient(135deg, #f6661e 0%, #ff8a4a 100%);
    --bg-gradient-dark: linear-gradient(135deg, #0b224b 0%, #143066 100%);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Typography */
    --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
    --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;

    /* Spacing */
    --section-padding: 5rem 0;
    --navbar-height: 76px; /* Default navbar height */

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Critical CSS to prevent flash of old designs */
.navbar {
    background-color: var(--primary-color) !important;
    border-bottom: none !important;
}

.navbar-brand {
    color: white !important;
    font-weight: 700 !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
}

.btn-outline-light:hover {
    background-color: white !important;
    color: var(--primary-color) !important;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding-top: var(--navbar-height, 76px);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Custom Utility Classes */
.min-vh-50 {
    min-height: 50vh;
}

.min-vh-75 {
    min-height: 75vh;
}

.bg-gradient-primary {
    background: var(--bg-gradient);
}

.bg-gradient-secondary {
    background: var(--bg-gradient-dark);
}

/* Modern Navbar */
.navbar {
    background: var(--bg-gradient) !important;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 60%;
}

/* Hero Section - Modern Design */
.hero-section {
    position: relative;
    background: var(--bg-gradient-dark);
    overflow: hidden;
    padding: 6rem 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        rgba(246, 102, 30, 0.15) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(255, 138, 74, 0.1) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-section .btn {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

/* Hero primary CTA: Browse Vendors */
.hero-section .btn-light {
    background-color: #f6661e !important;
    border-color: #f6661e !important;
    color: #ffffff !important;
    transition: background-color 0.2s ease, filter 0.2s ease;
}
.hero-section .btn-light:hover,
.hero-section .btn-light:focus {
    background-color: #f6661e !important;
    border-color: #f6661e !important;
    color: #ffffff !important;
    filter: brightness(0.92);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image i {
    font-size: 20rem;
    opacity: 0.15;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
}

/* Modern Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--radius);
    padding: 0.875rem 2rem;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--bg-gradient);
    box-shadow: 0 4px 14px rgba(246, 102, 30, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(246, 102, 30, 0.5);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 2px solid var(--primary-color) !important; /* Orange border */
    color: var(--primary-color) !important; /* Orange text */
    background: transparent !important;
}

.btn-outline-secondary:hover {
    background: var(
        --primary-color
    ) !important; /* Orange background on hover */
    border-color: var(--primary-color) !important;
    color: white !important; /* White text on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(246, 102, 30, 0.4);
}

.btn-outline-secondary:focus {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(246, 102, 30, 0.25);
}

/* Feature Cards - Glassmorphism */
.features-section {
    padding: 5rem 0;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(246, 102, 30, 0.1) 0%,
        rgba(255, 138, 74, 0.15) 100%
    );
    border-radius: 50%;
    position: relative;
}

.feature-icon::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-light)
    );
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.feature-card:hover .feature-icon::before {
    opacity: 0.2;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.feature-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Stats Section - Modern Cards */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 0;
    position: relative;
}

.stat-item {
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item h3 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header .lead {
    font-size: 1.25rem;
    color: #6c757d;
}

/* Recent Vendors */
.recent-vendors {
    padding: 5rem 0;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Vendor Registration Page */
.card-header.bg-primary {
    background: var(--bg-gradient) !important;
}

.badge.bg-primary {
    background: var(--primary-color) !important;
}

.btn-primary {
    background: var(--bg-gradient) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 14px rgba(246, 102, 30, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(246, 102, 30, 0.5);
}

.btn-primary:focus {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 0 0 0.2rem rgba(246, 102, 30, 0.25);
}

.progress-bar {
    background: var(--bg-gradient) !important;
}

/* Forms */
.form-control {
    border-radius: var(--radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(246, 102, 30, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Footer - Modern Design */
footer {
    background: var(--bg-gradient-dark) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
}

footer h5,
footer h6 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Ensure all footer text renders white for better contrast */
footer {
    color: white !important;
}

footer p,
footer li,
footer .text-white-50,
footer .text-muted,
footer small,
footer .text-decoration-none {
    color: white !important;
}

footer a {
    color: white !important;
    transition: var(--transition);
    display: inline-block;
}

footer a {
    transition: var(--transition);
    display: inline-block;
}

footer a:hover,
footer a.text-muted:hover {
    color: var(--primary-light) !important;
    transform: translateX(5px);
}

.social-links a {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Toast Notifications */
.toast {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.toast-header {
    background: var(--bg-gradient);
    color: white;
    border: none;
    font-weight: 600;
}

.toast-body {
    padding: 1rem;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(246, 102, 30, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
}

.skeleton-image {
    height: 200px;
    border-radius: var(--radius-lg);
}

/* Vendor Profile specific sizing */
.vendor-hero .vendor-cover {
    position: relative;
    width: 100%;
    height: 320px;
    background: #f7f7f9;
    overflow: hidden;
}
.vendor-hero .vendor-cover img#coverImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vendor-hero .vendor-avatar img#profileImage {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.vendor-hero .vendor-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.45)
    );
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        display: none;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .stat-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: var(--navbar-height, 70px);
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    .stat-item {
        padding: 1rem 0.5rem;
    }

    .stat-item h3 {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }

    body {
        padding-top: 0;
    }

    .container {
        max-width: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }

    .btn-outline-primary {
        border-width: 2px;
    }
}

/* ==========================================
   Public Header Color Overrides (Requested)
   - Header background: white
   - Nav link color: #0B224B
   - Nav hover color: #f6661e
   ========================================== */
.navbar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: var(--shadow);
}
.navbar-brand {
    color: #0b224b !important;
}
.navbar-nav .nav-link {
    color: #0b224b !important;
}
.navbar-nav .nav-link:hover {
    color: #f6661e !important;
    background: transparent !important;
}
.navbar-nav .nav-link::after {
    background: #f6661e !important;
}

/* Ensure Bootstrap utility classes don't override header color */
.navbar.bg-primary,
.navbar.navbar-dark,
.navbar.navbar-light {
    background-color: #ffffff !important;
    background: #ffffff !important;
}
.navbar .navbar-brand,
.navbar.navbar-dark .navbar-brand,
.navbar.navbar-light .navbar-brand {
    color: #0b224b !important;
}
.navbar-brand .bi { font-size: 1.4rem; display: inline-block; }
.navbar-brand .navbar-logo { height: 36px; object-fit: contain; }
.navbar .nav-link,
.navbar.navbar-dark .nav-link,
.navbar.navbar-light .nav-link {
    color: #0b224b !important;
}
.navbar .nav-link:hover,
.navbar.navbar-dark .nav-link:hover,
.navbar.navbar-light .nav-link:hover {
    color: #f6661e !important;
}

/* Navbar hamburger (toggler) color */
.navbar .navbar-toggler,
.navbar.navbar-dark .navbar-toggler,
.navbar.navbar-light .navbar-toggler {
    border-color: #f6661e !important;
    box-shadow: none !important;
}

/* Default and hover use same brand color */
.navbar .navbar-toggler:hover,
.navbar .navbar-toggler:focus {
    border-color: #f6661e !important;
}

/* Override Bootstrap's default hamburger icon (three lines) color */
.navbar .navbar-toggler .navbar-toggler-icon,
.navbar .navbar-toggler-icon,
.navbar.navbar-dark .navbar-toggler-icon,
.navbar.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23f6661e' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.file-upload-area:hover {
    border-color: #f6661e;
    background-color: #fff5f2;
}

.file-upload-area.dragover {
    border-color: #f6661e;
    background-color: #fff5f2;
    border-style: solid;
}

.file-upload-area i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
    display: block;
}

.file-upload-text {
    font-size: 16px;
    color: #495057;
    margin-bottom: 5px;
}

.file-upload-area small {
    color: #6c757d;
    display: block;
}

.file-upload-area input[type="file"] {
    display: none !important;
}

/* File Preview Styles */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.file-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}

.file-preview-remove:hover {
    background: rgba(220, 53, 69, 1);
}

.file-preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    padding: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
