/* MUDA Main Stylesheet - Elegant Ivorian Style */

:root {
    /* Color Palette - Refined from Logo */
    --primary-color: #E07B00;
    /* Warm Orange (less saturated) */
    --primary-dark: #c06900;
    --secondary-color: #1B7F4E;
    /* Forest Green (slightly muted) */
    --secondary-dark: #156540;
    --accent-color: #5C4033;
    /* Earthy Brown */

    --dark-bg: #1f1f1f;
    --light-bg: #fefdfb;
    /* Very subtle cream */
    --text-main: #333333;
    --text-light: #f5f5f5;
    --white: #ffffff;

    /* Gradients - Softer */
    --gradient-primary: linear-gradient(135deg, #E07B00 0%, #c06900 100%);
    --gradient-hero: linear-gradient(180deg, #fefdfb 0%, #fff 100%);
    --gradient-accent: linear-gradient(135deg, #1B7F4E 0%, #156540 100%);

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    font-weight: 800;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.5rem;
    color: var(--text-main);
}

/* Components */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 130, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 130, 0, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--text-main);
}

/* Header & Nav */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary-color);
    /* Ivorian Touch */
}

nav {
    min-height: 80px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span.ci-orange {
    color: var(--primary-color);
}

.logo span.ci-white {
    color: #d1d5db;
    /* Greyish white for visibility */
}

.logo span.ci-green {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    row-gap: 0.75rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
    margin-left: var(--spacing-lg);
    position: relative;
    font-size: 1rem;
}

.nav-links .nav-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-left: var(--spacing-lg);
}

.nav-links .mobile-btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -6px;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 5px 0;
    border-radius: 3px;
}

/* Hero Section */
.hero {
    background: var(--light-bg);
    color: var(--text-main);
    padding: 6rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 130, 0, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Feature Cards with Batik/Pagne feel */
.card {
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

.card:hover::after {
    transform: scaleX(1);
}

.card-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(255, 130, 0, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.75rem;
}

/* Sections */
.bg-pattern {
    background-color: white;
    background-image: radial-gradient(var(--secondary-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.05;
}

/* Footer */
footer {
    background-color: #111827;
    color: var(--text-light);
    padding: 5rem 0 2rem;
    margin-top: var(--spacing-xl);
    border-top: 5px solid var(--secondary-color);
}

footer h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

/* Form Elements */
input,
textarea,
select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 130, 0, 0.1);
}

/* Media Queries */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 3px solid var(--primary-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin-left: 0;
        margin-bottom: 1.5rem;
        font-size: 1.125rem;
        display: block;
        text-align: center;
    }

    .nav-links .nav-actions {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        width: 100%;
    }

    .nav-links .nav-actions a,
    .nav-links .nav-actions form {
        margin-bottom: 0.75rem;
        text-align: center;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 4rem 0;
    }
}

/* Select2 - Uniform theme applied to every select across the app */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    min-height: 42px;
    padding: 4px 8px;
    background-color: white;
    transition: all 0.2s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
    color: #1e293b;
    padding-left: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 123, 0, 0.1);
    outline: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--primary-color);
    border: none;
    color: white;
    border-radius: 0.25rem;
    padding: 2px 8px;
    margin-top: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 5px;
    border: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.select2-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 3000;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 8px;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
}

/* Icon-only action buttons (table row actions: edit, delete, validate...) */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-icon img {
    width: 16px;
    height: 16px;
}

/* Reset the oversized CTA look of .btn-primary/.btn-secondary when combined with .btn-icon */
.btn-icon.btn-primary,
.btn-icon.btn-secondary,
.btn-icon.btn-danger,
.btn-icon.btn-success {
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    border-radius: 50%;
}

.btn-icon.btn-primary {
    color: var(--primary-color);
    background: rgba(224, 123, 0, 0.1);
}

.btn-icon.btn-primary:hover {
    background: rgba(224, 123, 0, 0.2);
    color: var(--primary-color);
}

.btn-icon.btn-secondary {
    color: var(--secondary-color);
    background: rgba(27, 127, 78, 0.1);
}

.btn-icon.btn-secondary:hover {
    background: rgba(27, 127, 78, 0.2);
    color: var(--secondary-color);
}

.btn-icon.btn-success {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.btn-icon.btn-success:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.btn-icon.btn-danger {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.btn-icon.btn-danger:hover {
    background: rgba(220, 38, 38, 0.18);
    color: #dc2626;
}