/* ============================================
   SupplyHub - Bootstrap 5 Clean Custom Styles
   Minimal Overrides for Modern Design
   ============================================ */

:root {
    /* Color System */
    --bs-primary: #2563EB;
    --bs-primary-rgb: 37, 99, 235;
    --primary-dark: #1e40af;
    --accent-orange: #F97316;
    --accent-green: #10B981;
    
    /* Neutral Colors */
    --light-bg: #F8FAFC;
    --dark-text: #1E293B;
    --muted-text: #6B7280;
    --border-color: #E2E8F0;
    
    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Global Styles
   ============================================ */

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark-text);
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.display-3 {
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--dark-text);
}

.display-5 {
    font-weight: 700;
    color: var(--dark-text);
}

.lead {
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ============================================
   Navbar Enhancements
   ============================================ */

.navbar {
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--bs-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-text) !important;
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--bs-primary);
    transition: width var(--transition);
}

.nav-link:hover {
    color: var(--bs-primary) !important;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, var(--light-bg) 100%);
    padding-top: 5rem;
    padding-bottom: 3rem;
}

.hero-illustration {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.bg-gradient {
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
}

.bg-gradient:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

/* ============================================
   Button Enhancements
   ============================================ */

.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:focus {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    min-height: 48px;
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
}

/* ============================================
   Feature Cards
   ============================================ */

.feature-card {
    transition: all var(--transition);
    border-color: var(--border-color) !important;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--bs-primary) !important;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.15) !important;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--bs-primary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    width: 70px;
    height: 70px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-weight: 600;
    color: var(--dark-text);
}

.card-text {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Benefit Cards
   ============================================ */

.benefit-card {
    text-align: center;
    transition: transform var(--transition);
}

.benefit-card:hover {
    transform: scale(1.05);
}

.benefit-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

/* ============================================
   Modal Enhancements
   ============================================ */

.modal-content {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark-text);
}

.btn-close {
    transition: all var(--transition);
    opacity: 0.6;
}

.btn-close:hover {
    opacity: 1;
}

.btn-close:focus {
    opacity: 1;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

/* ============================================
   Supply Cards (Modal)
   ============================================ */

.supply-card-bootstrap {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    background: white;
}

.supply-card-bootstrap:hover {
    border-color: var(--bs-primary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: translateX(8px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.1);
}

.supply-card-bootstrap:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5);
}

.supply-card-icon {
    font-size: 2rem;
    color: var(--bs-primary);
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.supply-card-content {
    margin-left: 1rem;
}

.supply-card-content h6 {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.95rem;
    margin: 0 0 0.25rem 0;
}

.supply-card-content p {
    color: var(--muted-text);
    margin: 0;
    font-size: 0.85rem;
}

/* ============================================
   Footer
   ============================================ */

footer {
    background-color: #1f2937;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: white;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
    text-decoration: none;
}

footer a:hover {
    color: rgba(255, 255, 255, 1);
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (min-width: 768px) {
    .py-md-8 {
        padding-top: 6rem !important;
        padding-bottom: 6rem !important;
    }

    .mb-md-8 {
        margin-bottom: 6rem !important;
    }

    .hero-section {
        padding-top: 6rem;
        padding-bottom: 4rem;
    }
}

@media (max-width: 991px) {
    .hero-section {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }

    .display-3 {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .hero-illustration {
        display: none;
    }

    .d-flex.gap-3 {
        flex-direction: column;
    }

    .d-flex.gap-3 .btn {
        width: 100%;
    }

    .supply-card-bootstrap {
        flex-direction: column;
        text-align: center;
    }

    .supply-card-bootstrap:hover {
        transform: none;
    }

    .supply-card-icon {
        width: 100%;
        margin-left: 0;
        margin-bottom: 0.75rem;
    }

    .supply-card-content {
        margin-left: 0;
    }
}

/* ============================================
   Accessibility
   ============================================ */

a:focus,
button:focus,
.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Touch targets */
a,
button,
.btn {
    min-height: 44px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-illustration {
        animation: none;
    }

    .btn:hover,
    .feature-card:hover,
    .benefit-card:hover {
        transform: none;
    }
}

/* ============================================
   Dark Mode
   ============================================ */

@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #f8fafc;
    }

    .navbar {
        background-color: #1e293b !important;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .navbar-brand {
        color: #3B82F6 !important;
    }

    .nav-link {
        color: #e2e8f0 !important;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .display-3,
    .display-5 {
        color: #f8fafc;
    }

    .hero-section {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    .card {
        background-color: #1e293b;
        border-color: #334155 !important;
    }

    .feature-icon {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    }

    .bg-light {
        background-color: #1e293b !important;
    }

    .modal-content {
        background-color: #1e293b;
        color: #f8fafc;
    }

    .modal-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .modal-title {
        color: #f8fafc;
    }

    .supply-card-bootstrap {
        background-color: #0f172a;
        border-color: #334155;
    }

    .supply-card-bootstrap:hover {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
        border-color: #3B82F6;
    }

    .supply-card-content h6 {
        color: #f8fafc;
    }

    footer {
        background-color: #0f172a;
    }

    .text-muted,
    .text-muted-dark {
        color: #94a3b8 !important;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    animation: slideDown 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out both;
}
