/* Global Layout Fixes */
body {
    padding-top: 0;
    margin: 0;
}

/* Ensure content doesn't hide behind fixed navbar */
.main-content {
    padding-top: 80px;
}

/* Home page: avoid double top padding with fixed navbar */
.page-home .section-intro.padding-y-lg {
    padding-top: 0;
}

/* Tailor browse page: keep spacing consistent under fixed navbar */
.page-tailor-browse .container {
    padding-top: 0.5rem;
}

/* Fix for account pages with sidebar */
.section-conten.padding-y {
    padding-top: 120px !important;
    min-height: 100vh;
}

/* Dashboard sidebar improvements */
.dashboard-sidebar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Account page cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card-header {
    background: linear-gradient(135deg, #2c1810 0%, #4a2c1a 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
    border: none;
}

.card-body {
    padding: 2rem;
}

/* Fix for pages with hero sections */
.hero-section, 
.heritage-hero, 
.atelier-hero,
.newsletter-section {
    margin-top: -80px;
    padding-top: 120px;
}

/* Text visibility improvements */
.text-truncate-fix {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Better contrast for readability */
.text-muted {
    color: #6c757d !important;
}

.small-text {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Card content visibility */
.card-body {
    padding: 1.5rem;
    word-wrap: break-word;
}

.card-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.card-text {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Button spacing and visibility */
.btn {
    margin: 0.25rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Form elements visibility */
.form-control {
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 6px;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c1810;
}

/* Table improvements */
.table {
    margin-bottom: 0;
}

.table td, .table th {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-color: #dee2e6;
}

/* Status badges visibility */
.badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Navigation improvements */
.navbar {
    z-index: 1030;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-content {
        padding-top: 70px;
    }

    .page-home .section-intro.padding-y-lg {
        padding-top: 0;
    }

    .page-tailor-browse .container {
        padding-top: 0.25rem;
    }
    
    .hero-section, 
    .heritage-hero, 
    .atelier-hero {
        margin-top: -70px;
        padding-top: 100px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-muted {
        color: #495057 !important;
    }
    
    .card {
        border: 2px solid #dee2e6;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
