/* ============================================
   Estorax - Responsive Stylesheet
   Version: 1.0
   ============================================ */

/* ============================================
   Tablet (768px - 992px)
   ============================================ */

@media (max-width: 992px) {
    /* Hero Section */
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section .search-box {
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* Cards Grid */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Contractor Cards */
    .contractor-card .company-logo {
        width: 70px;
        height: 70px;
    }
    
    /* Project Cards */
    .project-card .project-meta {
        gap: 10px;
        font-size: 0.85rem;
    }
    
    /* Dashboard */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-section {
        padding: 40px 0 0;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
    }
}

/* ============================================
   Mobile (Large) - 576px - 768px
   ============================================ */

@media (max-width: 768px) {
    /* Header */
    .navbar-custom {
        padding: 8px 0;
    }
    
    .navbar-custom .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-custom .nav-link {
        padding: 6px 10px !important;
        font-size: 0.9rem;
        margin: 0 4px;
    }
    
    .profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .search-box {
        margin: 0 8px;
    }
    
    .search-box input {
        min-width: 120px;
        font-size: 12px;
        padding: 6px 30px 6px 12px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 40px 0 50px;
        text-align: center;
        margin-top: -60px;
        border-radius: 0 0 20px 20px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-section .search-box {
        max-width: 100%;
    }
    
    .hero-section .search-box input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .hero-section .search-box button {
        padding: 0 15px;
        font-size: 0.85rem;
    }
    
    .hero-section .btn {
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .hero-section .btn-lg {
        font-size: 0.95rem;
        padding: 10px 20px;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-title::after {
        width: 40px;
        height: 3px;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Contractor Cards */
    .contractor-card {
        padding: 15px;
        text-align: center;
    }
    
    .contractor-card .company-logo {
        width: 70px;
        height: 70px;
        margin: 0 auto 12px;
    }
    
    .contractor-card .company-name {
        font-size: 1rem;
    }
    
    .contractor-card .premium-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
    
    .contractor-card .rating {
        font-size: 0.85rem;
    }
    
    /* Project Cards */
    .project-card {
        padding: 15px;
    }
    
    .project-card .project-title {
        font-size: 1rem;
    }
    
    .project-card .project-meta {
        flex-direction: column;
        gap: 4px;
        font-size: 0.8rem;
    }
    
    .project-card .project-budget {
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-lg {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-group-vertical .btn {
        border-radius: 4px !important;
        margin-bottom: 4px;
    }
    
    /* Dashboard */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2rem;
    }
    
    /* Milestones */
    .milestone-card {
        padding: 12px 15px;
    }
    
    .milestone-card .milestone-title {
        font-size: 0.95rem;
    }
    
    /* Star Rating */
    .star-rating {
        font-size: 2rem;
        justify-content: center;
    }
    
    .star-rating label {
        padding: 0 3px;
    }
    
    /* Notifications */
    .notification-item {
        padding: 10px 12px;
    }
    
    .notification-item .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Footer */
    .footer-section {
        padding: 30px 0 0;
        text-align: center;
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .footer-newsletter .input-group {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
        margin-top: 10px;
        flex-wrap: wrap;
    }
    
    /* Alerts */
    .alert-flash {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: 100%;
    }
    
    /* Pagination */
    .pagination .page-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    /* Admin Sidebar */
    .admin-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .admin-content {
        width: 100%;
    }
    
    /* Progress */
    .progress-container {
        padding: 15px;
    }
    
    .progress-container h4 {
        font-size: 1rem;
    }
}

/* ============================================
   Mobile (Small) - < 576px
   ============================================ */

@media (max-width: 576px) {
    /* Header */
    .navbar-custom .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-custom .navbar-brand i {
        font-size: 1.2rem;
    }
    
    .profile-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .navbar-custom .nav-link {
        font-size: 0.85rem;
        padding: 6px 8px !important;
    }
    
    .navbar-toggler {
        padding: 6px 8px;
    }
    
    .navbar-toggler-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 30px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .hero-section .search-box input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .hero-section .search-box button {
        padding: 0 12px;
        font-size: 0.8rem;
    }
    
    .hero-section .btn-lg {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    /* Section */
    .section-title {
        font-size: 1.2rem;
        padding-bottom: 10px;
    }
    
    .section-title::after {
        width: 30px;
        height: 3px;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    /* Dashboard */
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.8rem;
    }
    
    /* Contractor Cards */
    .contractor-card .company-logo {
        width: 60px;
        height: 60px;
    }
    
    .contractor-card .company-name {
        font-size: 0.95rem;
    }
    
    .contractor-card .company-specialty {
        font-size: 0.8rem;
    }
    
    .contractor-card .company-location {
        font-size: 0.8rem;
    }
    
    .contractor-card .rating {
        font-size: 0.8rem;
    }
    
    .contractor-card .premium-badge {
        font-size: 0.6rem;
        padding: 2px 8px;
        top: 8px;
        right: 8px;
    }
    
    /* Project Cards */
    .project-card {
        padding: 12px 15px;
    }
    
    .project-card .project-title {
        font-size: 0.95rem;
    }
    
    .project-card .project-meta {
        font-size: 0.75rem;
        gap: 3px;
    }
    
    .project-card .project-budget {
        font-size: 0.9rem;
    }
    
    .project-card .project-status {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    
    /* Forms */
    .form-control {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 4px 12px;
        font-size: 0.75rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 4px !important;
        margin-bottom: 4px;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Star Rating */
    .star-rating {
        font-size: 1.8rem;
    }
    
    /* Milestones */
    .milestone-card {
        padding: 10px 12px;
    }
    
    .milestone-card .milestone-title {
        font-size: 0.9rem;
    }
    
    .milestone-card .milestone-status .badge {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    
    .milestone-card .progress {
        height: 6px;
    }
    
    /* Notifications */
    .notification-item {
        padding: 8px 10px;
        flex-wrap: wrap;
    }
    
    .notification-item .notification-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .notification-item .notification-content .message {
        font-size: 0.85rem;
    }
    
    .notification-item .btn-group-vertical {
        width: 100%;
        flex-direction: row;
        margin-top: 8px;
    }
    
    .notification-item .btn-group-vertical .btn {
        border-radius: 4px !important;
        margin: 0 2px;
        padding: 4px 10px;
        font-size: 0.75rem;
    }
    
    /* Bid Cards */
    .bid-card {
        padding: 10px 12px;
    }
    
    .bid-card .bid-amount {
        font-size: 1rem;
    }
    
    .bid-card .badge {
        font-size: 0.7rem;
    }
    
    /* Footer */
    .footer-section {
        padding: 20px 0 0;
    }
    
    .footer-section .footer-logo {
        font-size: 1.3rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
    }
    
    .footer-heading {
        font-size: 0.95rem;
        margin-top: 15px;
        padding-bottom: 8px;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .footer-contact li {
        font-size: 0.85rem;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
    
    .footer-bottom-links a {
        font-size: 0.75rem;
    }
    
    .footer-social a {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .footer-newsletter .input-group {
        max-width: 100%;
    }
    
    /* Alerts */
    .alert-flash {
        top: 60px;
        right: 8px;
        left: 8px;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    /* Pagination */
    .pagination .page-link {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 6px 8px;
    }
    
    .table .btn-group .btn {
        padding: 2px 6px;
        font-size: 0.7rem;
    }
    
    /* Modals */
    .modal-header h5 {
        font-size: 1rem;
    }
    
    .modal-footer .btn {
        width: auto;
        padding: 6px 16px;
        font-size: 0.8rem;
    }
    
    /* Admin */
    .admin-sidebar {
        width: 100%;
    }
    
    .admin-sidebar .card-body {
        padding: 10px;
    }
    
    .admin-sidebar .list-group-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    /* Stats Cards */
    .stat-card {
        padding: 12px;
    }
    
    .stat-card .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.5rem;
    }
    
    /* Progress */
    .progress-container {
        padding: 10px;
    }
    
    .progress-container h4 {
        font-size: 0.9rem;
    }
    
    .progress {
        height: 8px;
    }
    
    .progress-bar {
        font-size: 0.65rem;
        line-height: 8px;
    }
    
    /* Hero Illustration */
    .hero-section img {
        max-height: 200px !important;
    }
    
    /* Contact */
    .contact-info .info-item .icon-box {
        width: 35px;
        height: 35px;
        min-width: 35px;
        font-size: 0.8rem;
    }
    
    .contact-info .info-item h6 {
        font-size: 0.85rem;
    }
    
    .contact-info .info-item p {
        font-size: 0.8rem;
    }
    
    /* Social Icons */
    .social-icons .btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    /* Hide non-print elements */
    .navbar-custom,
    .footer-section,
    .btn,
    .no-print,
    .search-box,
    .notification-badge,
    .profile-dropdown,
    .nav-link,
    .navbar-toggler,
    .alert-flash {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: black !important;
        border-bottom: 1px solid #ddd !important;
    }
    
    .hero-section {
        background: var(--primary-color) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding: 30px 0 !important;
        margin-top: 0 !important;
        border-radius: 0 !important;
    }
    
    .hero-section h1 {
        color: white !important;
        font-size: 1.8rem !important;
    }
    
    .hero-section p {
        color: rgba(255,255,255,0.8) !important;
    }
    
    .stat-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .stat-card .stat-number {
        color: var(--primary-color) !important;
    }
    
    .project-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .contractor-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .contractor-card.premium {
        border-color: #ddd !important;
        background: white !important;
    }
    
    .table {
        border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #ddd !important;
    }
    
    .badge {
        border: 1px solid #ccc !important;
        background: #f8f9fa !important;
        color: black !important;
    }
    
    .project-status {
        border: 1px solid #ccc !important;
    }
    
    .project-status.open,
    .project-status.assigned,
    .project-status.in_progress,
    .project-status.completed,
    .project-status.cancelled {
        background: #f8f9fa !important;
        color: black !important;
    }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Uncomment if dark mode is needed
    :root {
        --light-bg: #1a1a2e;
        --dark-text: #f0f2f5;
        --gray-text: #a8b2c8;
        --border-color: #2a2a4a;
    }
    
    body {
        background: #0f0f1a;
    }
    
    .card,
    .stat-card,
    .contractor-card,
    .project-card {
        background: #1a1a2e;
    }
    
    .form-control {
        background: #1a1a2e;
        color: white;
        border-color: #2a2a4a;
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
    }
    
    .navbar-custom {
        background: #0f0f1a !important;
    }
    
    .navbar-custom .nav-link {
        color: #c8d0dc !important;
    }
    
    .footer-section {
        background: #0a0a12;
    }
    */
}