/**
 * Main Wrapper Modern Enhancements
 * Global improvements for clean, modern, readable design
 * Version: 2.0
 */

/* ========================================================================
   Base Layout & Typography
   ======================================================================== */

.main-wrapper {
    background-color: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Improved heading hierarchy */
.main-wrapper h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #111827;
    margin-bottom: 1.5rem;
}

.main-wrapper h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: #111827;
    margin-bottom: 1.25rem;
}

.main-wrapper h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #111827;
    margin-bottom: 1rem;
}

.main-wrapper h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    color: #1F2937;
    margin-bottom: 0.875rem;
}

.main-wrapper h5 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 600;
    line-height: 1.5;
    color: #374151;
    margin-bottom: 0.75rem;
}

.main-wrapper h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: #4B5563;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Body text improvements */
.main-wrapper p {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
    margin-bottom: 1.25rem;
}

.main-wrapper p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph */
.main-wrapper .lead,
.main-wrapper .hero-subtitle,
.main-wrapper .section-subtitle-modern {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #6B7280 !important;
    font-weight: 400;
}

/* Small text */
.main-wrapper small,
.main-wrapper .small,
.main-wrapper .text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6B7280;
}

/* Muted text - ensure readable */
.main-wrapper .text-muted {
    color: #6B7280 !important;
}

/* ========================================================================
   Section Spacing & Structure
   ======================================================================== */

.main-wrapper section {
    padding: 5rem 0;
    position: relative;
}

.main-wrapper section:first-of-type {
    padding-top: 2rem;
}

/* Container improvements */
.main-wrapper .container {
    max-width: 1280px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Section headers */
.main-wrapper .section-header,
.main-wrapper .section-title-modern {
    text-align: center;
    margin-bottom: 4rem;
}

/* Section badges */
.main-wrapper .section-badge {
    display: inline-flex;
    margin-bottom: 1rem;
}

.main-wrapper .badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #EEF2FF;
    color: #4F46E5;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.main-wrapper .badge-modern.success {
    background: #D1FAE5;
    color: #059669;
}

.main-wrapper .badge-modern.warning {
    background: #FEF3C7;
    color: #D97706;
}

.main-wrapper .badge-modern.info {
    background: #DBEAFE;
    color: #2563EB;
}

.main-wrapper .badge-modern.secondary {
    background: #F3F4F6;
    color: #4B5563;
}

/* ========================================================================
   Cards & Content Blocks
   ======================================================================== */

.main-wrapper .card,
.main-wrapper .card-modern {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrapper .card:hover,
.main-wrapper .card-modern:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #C7D2FE;
}

.main-wrapper .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.main-wrapper .card-text {
    color: #6B7280;
    line-height: 1.6;
}

/* ========================================================================
   Buttons & CTAs
   ======================================================================== */

.main-wrapper .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.main-wrapper .btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.main-wrapper .btn:active {
    transform: translateY(0);
}

/* Primary Button */
.main-wrapper .btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.main-wrapper .btn-primary:hover {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    color: #ffffff !important;
}

/* Secondary Button */
.main-wrapper .btn-secondary,
.main-wrapper .btn-light-secondary {
    background: #ffffff;
    color: #4B5563 !important;
    border-color: #D1D5DB;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-wrapper .btn-secondary:hover,
.main-wrapper .btn-light-secondary:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
    color: #111827 !important;
}

/* Light Button */
.main-wrapper .btn-light {
    background: #F9FAFB;
    color: #374151 !important;
    border-color: #E5E7EB;
}

.main-wrapper .btn-light:hover {
    background: #F3F4F6;
    color: #111827 !important;
}

/* Outline Button */
.main-wrapper .btn-outline-primary {
    background: transparent;
    color: #4F46E5 !important;
    border-color: #4F46E5;
}

.main-wrapper .btn-outline-primary:hover {
    background: #4F46E5;
    color: #ffffff !important;
}

/* Button sizes */
.main-wrapper .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.main-wrapper .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 14px;
}

/* ========================================================================
   Forms & Inputs
   ======================================================================== */

.main-wrapper .form-control,
.main-wrapper input[type="text"],
.main-wrapper input[type="email"],
.main-wrapper input[type="password"],
.main-wrapper input[type="number"],
.main-wrapper input[type="tel"],
.main-wrapper input[type="url"],
.main-wrapper input[type="search"],
.main-wrapper textarea,
.main-wrapper select {
    display: block;
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: #111827;
    background-color: #ffffff;
    border: 2px solid #D1D5DB;
    border-radius: 12px;
    transition: all 0.2s ease;
    appearance: none;
}

.main-wrapper .form-control:focus,
.main-wrapper input:focus,
.main-wrapper textarea:focus,
.main-wrapper select:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background-color: #ffffff;
}

.main-wrapper .form-control::placeholder,
.main-wrapper input::placeholder,
.main-wrapper textarea::placeholder {
    color: #9CA3AF;
    opacity: 1;
}

/* Form labels */
.main-wrapper label,
.main-wrapper .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

/* Select dropdowns */
.main-wrapper select.form-control,
.main-wrapper .nice-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* ========================================================================
   Links
   ======================================================================== */

.main-wrapper a {
    color: #4F46E5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-wrapper a:hover {
    color: #4338CA;
    text-decoration: underline;
}

/* Link in dark sections */
.main-wrapper .bg-dark a,
.main-wrapper .text-on-dark a {
    color: #C7D2FE;
}

.main-wrapper .bg-dark a:hover,
.main-wrapper .text-on-dark a:hover {
    color: #ffffff;
}

/* ========================================================================
   Lists
   ======================================================================== */

.main-wrapper ul,
.main-wrapper ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.main-wrapper li {
    color: #374151;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.main-wrapper ul.list-unstyled {
    padding-left: 0;
    list-style: none;
}

/* ========================================================================
   Badges & Pills
   ======================================================================== */

.main-wrapper .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

.main-wrapper .badge-primary {
    background: #EEF2FF;
    color: #4F46E5;
}

.main-wrapper .badge-secondary {
    background: #F3F4F6;
    color: #6B7280;
}

.main-wrapper .badge-secondary-soft {
    background: #F9FAFB !important;
    color: #4B5563 !important;
    border: 1px solid #E5E7EB !important;
}

.main-wrapper .badge-success {
    background: #D1FAE5;
    color: #059669;
}

.main-wrapper .badge-warning {
    background: #FEF3C7;
    color: #D97706;
}

.main-wrapper .badge-danger {
    background: #FEE2E2;
    color: #DC2626;
}

.main-wrapper .badge-info {
    background: #DBEAFE;
    color: #2563EB;
}

/* ========================================================================
   Alerts & Messages
   ======================================================================== */

.main-wrapper .alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 1.5rem;
}

.main-wrapper .alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-color: #A7F3D0;
}

.main-wrapper .alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FDE68A;
}

.main-wrapper .alert-danger,
.main-wrapper .alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}

.main-wrapper .alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-color: #BFDBFE;
}

/* ========================================================================
   Tables
   ======================================================================== */

.main-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.main-wrapper table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    background: #F9FAFB;
    border-bottom: 2px solid #E5E7EB;
}

.main-wrapper table td {
    padding: 0.875rem 1rem;
    color: #6B7280;
    border-bottom: 1px solid #E5E7EB;
}

.main-wrapper table tr:hover {
    background: #F9FAFB;
}

/* ========================================================================
   Responsive Images
   ======================================================================== */

.main-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================================================
   Dividers
   ======================================================================== */

.main-wrapper hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 2rem 0;
}

/* ========================================================================
   Responsive Adjustments
   ======================================================================== */

@media (max-width: 768px) {
    .main-wrapper {
        font-size: 15px;
    }
    
    .main-wrapper section {
        padding: 3rem 0;
    }
    
    .main-wrapper .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .main-wrapper h1 {
        margin-bottom: 1rem;
    }
    
    .main-wrapper h2 {
        margin-bottom: 0.875rem;
    }
    
    .main-wrapper .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .main-wrapper .form-control {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* ========================================================================
   Print Styles
   ======================================================================== */

@media print {
    .main-wrapper {
        background: white;
        color: black;
    }
    
    .main-wrapper a {
        text-decoration: underline;
    }
}
