/*
 * Modern UI Overrides
 * Applied to landing page and admin interface for a contemporary, comfortable design
 * Last updated: 2026-01-29
 */

/* ========================================
   1. CONTAINER WIDTH IMPROVEMENTS
   ======================================== */

/* Reduce max-width for more comfortable reading and modern feel */
.container,
.container-xxl {
    max-width: 1140px !important; /* Reduced from 1320px */
}

/* Content-focused narrow container */
.container-narrow {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Balanced container for sections needing more space */
.container-comfortable {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ========================================
   2. VERTICAL SPACING REDUCTION
   ======================================== */

/* Significantly reduce excessive vertical padding */
.section-padding {
    padding: 4rem 1rem !important; /* Reduced from 8.125rem (130px) */
}

.section-padding-top {
    padding-top: 4rem !important;
}

.section-padding-bottom {
    padding-bottom: 4rem !important;
}

.padding-top-bottom-90 {
    padding: 3.5rem 1rem !important; /* Reduced from 5.625rem (90px) */
}

.padding-top-bottom-80 {
    padding: 3rem 1rem !important; /* Reduced from 5rem (80px) */
}

.padding-top-bottom-70 {
    padding: 2.5rem 1rem !important; /* Reduced from 4.375rem (70px) */
}

.padding-50 {
    padding: 2rem !important; /* Reduced from 3.125rem (50px) */
}

/* Modern spacing utilities */
.section-compact {
    padding: 2rem 1rem;
}

.section-comfortable {
    padding: 3rem 1rem;
}

.section-spacious {
    padding: 4rem 1rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .section-padding {
        padding: 3rem 1rem !important;
    }

    .padding-top-bottom-90,
    .padding-top-bottom-80,
    .padding-top-bottom-70 {
        padding: 2rem 1rem !important;
    }
}

@media (max-width: 767px) {
    .section-padding {
        padding: 2rem 1rem !important;
    }

    .padding-top-bottom-90,
    .padding-top-bottom-80,
    .padding-top-bottom-70 {
        padding: 1.5rem 1rem !important;
    }
}

/* ========================================
   3. MODERN TYPOGRAPHY SCALE
   ======================================== */

/* Reduce heading sizes for cleaner, modern appearance */
h1, .h1 {
    font-size: 2.5rem !important; /* Reduced from 4.209rem (67px) */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em; /* Tighter, modern spacing */
}

h2, .h2 {
    font-size: 2rem !important; /* Reduced from 3.157rem (50px) */
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h3, .h3 {
    font-size: 1.5rem !important; /* Reduced from 2.369rem (38px) */
    font-weight: 600;
    line-height: 1.4;
}

h4, .h4 {
    font-size: 1.25rem !important; /* Reduced from 1.777rem (28px) */
    font-weight: 600;
    line-height: 1.4;
}

h5, .h5 {
    font-size: 1.125rem !important;
    font-weight: 600;
    line-height: 1.5;
}

h6, .h6 {
    font-size: 1rem !important;
    font-weight: 600;
    line-height: 1.5;
}

/* Responsive typography */
@media (max-width: 991px) {
    h1, .h1 { font-size: 2rem !important; }
    h2, .h2 { font-size: 1.75rem !important; }
    h3, .h3 { font-size: 1.375rem !important; }
}

@media (max-width: 767px) {
    h1, .h1 { font-size: 1.75rem !important; }
    h2, .h2 { font-size: 1.5rem !important; }
    h3, .h3 { font-size: 1.25rem !important; }
}

/* Body text improvements */
body {
    line-height: 1.6;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ========================================
   4. MODERN CARD COMPONENTS
   ======================================== */

.card {
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem !important;
}

.card-header {
    padding: 1.25rem 1.5rem !important;
    background-color: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.card-footer {
    padding: 1.25rem 1.5rem !important;
    background-color: transparent !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* Card images */
.card img {
    border-radius: 12px 12px 0 0;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.card-img-top {
    border-radius: 12px 12px 0 0 !important;
}

/* ========================================
   5. MODERN GRID & SPACING
   ======================================== */

/* Controlled grid gaps */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Modern gap utilities */
.gap-modern {
    gap: 1.5rem !important;
}

.gap-compact {
    gap: 1rem !important;
}

.gap-comfortable {
    gap: 2rem !important;
}

/* Section spacing */
section + section {
    margin-top: 2rem;
}

/* Content block spacing */
.content-block + .content-block {
    margin-top: 1.5rem;
}

/* ========================================
   6. MODERN SHADOWS & ELEVATION
   ======================================== */

.shadow-modern {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.shadow-modern-lg {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

.shadow-modern-xl {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Remove excessive shadows */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.shadow-lg {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

/* ========================================
   7. MODERN BUTTONS
   ======================================== */

.btn {
    padding: 0.625rem 1.25rem !important;
    border-radius: 8px !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s ease-in-out;
}

.btn-lg {
    padding: 0.875rem 1.75rem !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
}

.btn-sm {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* ========================================
   8. MODERN FORM ELEMENTS
   ======================================== */

.form-control {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding: 0.625rem 1rem !important;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15) !important;
}

.form-select {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding: 0.625rem 1rem !important;
}

/* ========================================
   9. MODAL IMPROVEMENTS
   ======================================== */

.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
    padding: 1.5rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.modal-body {
    padding: 1.5rem !important;
}

.modal-footer {
    padding: 1.25rem 1.5rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* ========================================
   10. BREADCRUMB & NAVIGATION
   ======================================== */

.breadcrumb {
    background-color: transparent !important;
    padding: 0.75rem 0 !important;
    margin-bottom: 1.5rem !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(0, 0, 0, 0.4) !important;
}

/* ========================================
   11. IMAGE OPTIMIZATIONS
   ======================================== */

img {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    border-radius: 12px;
}

/* Service/blog image heights - more modern proportions */
.service-image,
.blog-image {
    height: 15rem !important; /* Reduced from 17.5rem (280px) */
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 991px) {
    .service-image,
    .blog-image {
        height: 12rem !important;
    }
}

@media (max-width: 767px) {
    .service-image,
    .blog-image {
        height: 10rem !important;
    }
}

/* ========================================
   12. TRANSITION SMOOTHNESS
   ======================================== */

* {
    transition: box-shadow 0.2s ease-in-out,
                transform 0.2s ease-in-out,
                background-color 0.2s ease-in-out,
                border-color 0.2s ease-in-out;
}

/* ========================================
   13. TABLE IMPROVEMENTS
   ======================================== */

.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    padding: 1rem 1.25rem !important;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle;
}

/* ========================================
   14. BADGE MODERNIZATION
   ======================================== */

.badge {
    padding: 0.375rem 0.75rem !important;
    border-radius: 6px !important;
    font-weight: 500;
    font-size: 0.8125rem;
}

/* ========================================
   15. ALERT IMPROVEMENTS
   ======================================== */

.alert {
    border-radius: 12px !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
}

/* ========================================
   16. LIST GROUP MODERNIZATION
   ======================================== */

.list-group-item {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 0.5rem;
}

.list-group-item:last-child {
    margin-bottom: 0;
}

/* ========================================
   17. NAVBAR IMPROVEMENTS
   ======================================== */

.navbar {
    padding: 1rem 0 !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

/* ========================================
   18. FOOTER SPACING
   ======================================== */

footer {
    padding: 3rem 0 2rem !important;
}

/* ========================================
   19. RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Tablet adjustments */
@media (max-width: 991px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-body {
        padding: 1.25rem !important;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.25rem !important;
    }
}

/* ========================================
   20. UTILITY CLASSES
   ======================================== */

/* Modern margin utilities */
.mb-modern {
    margin-bottom: 1.5rem !important;
}

.mt-modern {
    margin-top: 1.5rem !important;
}

.my-modern {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Modern padding utilities */
.pb-modern {
    padding-bottom: 1.5rem !important;
}

.pt-modern {
    padding-top: 1.5rem !important;
}

.py-modern {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Content width limiters */
.content-width-narrow {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.content-width-comfortable {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   21. DARK MODE IMPROVEMENTS
   ======================================== */

[data-bs-theme="dark"] .card {
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .shadow-modern {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .shadow-modern-lg {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}
