:root {
    /* PRIMARY COLORS */
    --primary-color: #0A2540; /* Deep Navy Blue */
    --action-color: #FF9800;  /* Bold Amber / Orange */
    --action-hover: #E68900;
    
    /* SECONDARY COLORS */
    --success-color: #1DB954; /* Emerald Green */
    --error-color: #D32F2F;   /* Deep Red */
    
    /* NEUTRALS */
    --bg-color: #F5F7FA;      /* Soft Light Grey */
    --text-color: #1F2933;    /* Charcoal Black */
    --card-bg: #FFFFFF;       /* Pure White */
    
    /* Legacy/Mapped variables for compatibility */
    --accent-color: var(--action-color);
    --primary-gradient: linear-gradient(135deg, #0A2540 0%, #163b61 100%); /* Navy Gradient */
}

/* Reset & Safety Defaults */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto !important; /* Ensure vertical scroll is always possible */
    position: relative;
    min-height: 100vh;
}

/* Ensure main content sits above potential background glitches */
main, section, .container, .footer {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

.hero {
    background: var(--primary-gradient);
    color: white;
    padding: 8rem 0 4rem; /* Top padding accounts for fixed header */
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--action-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--action-hover);
    transform: translateY(-2px);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-image {
    height: 200px;
    background-color: #ddd;
}

.event-details {
    padding: 1.5rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    pointer-events: auto; /* Ensure header is clickable */
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001; /* Above mobile menu overlay */
}

.logo img {
    height: 40px;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--action-color);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* Hamburger Animation when Active */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--primary-color);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 5rem 2rem 2rem 2rem;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-menu a {
        font-size: 1.2rem;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 0.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero {
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

    .container, .section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group {
    margin-bottom: 1rem;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 400px;
    margin: 3rem auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(29, 185, 84, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(211, 47, 47, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.alert-info {
    background-color: rgba(10, 37, 64, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-draft { background: #e0e0e0; color: #333; }
.badge-planning { background: #e0e0e0; color: #333; } /* Grey */
.badge-booked { background: #FF9800; color: white; } /* Vendors Assigned? Or Paid? "Booked" usually means vendors assigned */
.badge-paid { background: #0275d8; color: white; } /* Paid Blue */
.badge-vendors_assigned { background: #FF9800; color: white; } /* Amber */
.badge-active { background: #0A2540; color: white; } /* Navy */
.badge-in_progress { background: #0A2540; color: white; } /* Navy */
.badge-completed { background: #1DB954; color: white; } /* Green */
.badge-cancelled { background: #D32F2F; color: white; } /* Red */
.badge-delivered { background: #1DB954; color: white; } /* Green */
.badge-disputed { background: #D32F2F; color: white; } /* Red */

/* Links */
a {
    color: var(--primary-color);
}

/* Components */
.mini-cart-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    border: 2px solid var(--primary-color);
    max-width: 90vw;
}

.marketplace-services {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.marketplace-service-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.marketplace-service-image {
    flex: 0 0 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.marketplace-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-service-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.marketplace-service-category {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: bold;
    text-transform: uppercase;
}

.marketplace-service-title {
    margin: 0.25rem 0;
    font-size: 1.1rem;
}

.marketplace-service-vendor,
.marketplace-service-location {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.marketplace-service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.marketplace-service-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.marketplace-add-btn {
    padding: 6px 16px;
    font-size: 0.9rem;
}

.marketplace-filter-form {
    max-width: 400px;
    margin-bottom: 1.5rem;
}

.marketplace-filter-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #555;
}

.marketplace-filter-select {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .marketplace-service-card {
        flex-direction: column;
    }

    .marketplace-service-image {
        width: 100%;
        max-width: 100%;
        height: 160px;
    }

    .marketplace-service-footer {
        align-items: flex-start;
    }
}

/* Safety: Hide potential accidental overlays */
.overlay, .modal-backdrop, .fade.in {
    display: none !important;
}
