:root {
    --brand-teal: #02A7AE;
    --brand-dark: #1a2a3a;
    --bg-light: #f4f7f9;
    --primary-color: #3d547e;
}

.btn-accent {
    background-color: var(--brand-teal) !important;
    color: white !important;
    border: none;
    font-weight: bold;
}

.btn-accent:hover {
    color: var(--brand-teal) !important;
    background-color: white !important;
}

.text-brand {
    color: var(--brand-teal) !important;
}

.bg-brand-dark {
    background-color: var(--brand-dark) !important;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
}

.hero-section { 
    background: linear-gradient(rgba(26, 42, 58, 0.8), rgba(26, 42, 58, 0.8)), url('../img/landing_background.png');
    background-size: cover;
    color: white;
    min-height: 100vh;
    height: auto;
    background-repeat: no-repeat;
    background-position: bottom;
    overflow-x: hidden;
}
        
.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
}

.navbar {
    background-color: var(--primary-color) !important;
    border-bottom: 3px solid var(--brand-teal);
}
        
.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--brand-teal) !important;
}

.feature-card {
    border: none;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}
.btn {
    font-weight: 700;
}
.btn:hover {
    color: var(--brand-teal) !important;
}

.vetted-bg { 
    background: url('../img/vetted.png');
}
.financial-bg { 
    background: url('../img/financial.png');
}
.design-bg { 
    background: url('../img/design.png');
}
/* target the background classes */
.vetted-bg, 
.financial-bg, 
.design-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* 1. This forces the height to be a percentage of the width */
    /* A ratio of 21/9 or 16/7 works well for wide column cards */
    aspect-ratio: 21 / 9; 
    
    /* 2. Flexbox ensures text stays centered inside the proportional height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    
    background-blend-mode: overlay;
    background-color: rgba(255, 255, 255, 0); 
}

.why-title {
    font-weight: bold;
    color: var(--brand-teal) !important;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 10px 15px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 4px 10px;
    border-radius: 8px;
    display: inline-block;
    width: fit-content;
}

.why-text {
    color: #fff !important;
    background-color: rgba(2, 167, 174, 0.8);
    padding: 12px 15px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 4px 10px;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
    width: fit-content;
}

/* On small screens, you might want a taller box (more square) */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        text-align: center;
    }

    .landing-main-text {
        margin-left: 0 !important;
        padding: 0 15px;
    }

    .landing-main-text h1 {
        font-size: 1.8rem !important; /* Further reduced heading size for mobile */
        line-height: 1.2;
    }

    .landing-main-text p.lead {
        font-size: 0.9rem !important; /* Further reduced lead text size for mobile */
        margin-bottom: 2rem !important;
    }

    .hero-section .btn-lg {
        width: 100%; /* Full width buttons like a mobile app */
        padding: 12px !important;
        font-size: 1.1rem;
    }

    .vetted-bg, .financial-bg, .design-bg {
        aspect-ratio: 16 / 9;
    }

    .why-title, .why-text {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* Reapply desktop-specific margin for landing-main-text on larger screens */
@media (min-width: 992px) { /* Equivalent to Bootstrap's .col-lg breakpoint */
    .landing-main-text {
        margin-left: 50px;
    }
}

/* --- Worker Portal & Dashboard Components --- */
.stat-card { transition: 0.3s; }
.stat-card:hover { transform: translateY(-5px); }

.status-badge { font-size: 0.8rem; padding: 0.5em 1em; border-radius: 20px; text-transform: uppercase; font-weight: bold; }
.bg-in-progress { background-color: #fff3e0 !important; color: #e65100 !important; }
.bg-paid { background-color: #e8f5e9 !important; color: #1b5e20 !important; }
.bg-cancelled { background-color: #f8d7da !important; color: #721c24 !important; }

/* Custom Dashboard Tabs Styling */
.dashboard-tabs.nav-tabs .nav-link { 
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 600;
    border: 0 !important;
    padding: 1rem 1.5rem !important;
    position: relative; 
    margin-right: 3px;
    border-bottom: 3px solid transparent !important;
    border-radius: 12px 12px 0 0 !important;
}

.dashboard-tabs.nav-tabs .nav-link:hover,
.dashboard-tabs.nav-tabs .nav-link:focus,
.dashboard-tabs.nav-tabs .nav-link:active {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.dashboard-tabs.nav-tabs .nav-link.active { 
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-bottom: 3px solid var(--brand-teal) !important; 
}
.dashboard-tabs.nav-tabs .nav-link:hover { opacity: 0.9; }

/* --- Worker Profile Components --- */
.stars-container { display: inline-block; font-size: 1.2rem; position: relative; color: #e0e0e0; }
.stars-gold { position: absolute; top: 0; left: 0; white-space: nowrap; overflow: hidden; color: gold; width: 0%; }
.tag-container { border: 1px solid #dee2e6; padding: 5px; border-radius: 5px; background: #fff; min-height: 45px; }
.badge-tag { background-color: var(--brand-dark); color: white; margin-right: 5px; margin-bottom: 5px; display: inline-block; padding: 5px 10px; border-radius: 20px; }
.badge-tag .remove-tag { cursor: pointer; margin-left: 8px; font-weight: bold; opacity: 0.7; }
.badge-tag .remove-tag:hover { opacity: 1; }
.predefined-tag { cursor: pointer; transition: 0.2s; }
.predefined-tag:hover { background-color: var(--brand-teal) !important; color: white !important; }
.document-preview-link { cursor: pointer; }
.document-preview-link:hover { text-decoration: underline; }
.document-frame { width: 100%; height: 500px; border: none; }
.profile-pic-container { position: relative; width: 150px; height: 150px; margin: 0 auto 15px; background: #eee; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid #ddd; }
.profile-pic-container img { object-fit: cover; width: 100%; height: 100%; }
.profile-pic-container .badge { position: absolute; bottom: 0; right: 0; }
.logo-container { width: 100px; height: 100px; margin: 0 auto 10px; background: #f8f9fa; border: 1px dashed #ccc; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-container.profile-pic-container { border-radius: 50%; }
.logo-container img { width: 100%; height: 100%; object-fit: contain; }
.placeholder-text { font-size: 0.7rem; color: #999; font-weight: bold; text-transform: uppercase; text-align: center; line-height: 1.2; padding: 10px; }
.team-member-card { transition: transform 0.2s ease-in-out; }
.team-member-card:hover { transform: translateY(-3px); }
.team-member-status-badge { font-size: 0.7rem; padding: 0.3em 0.6em; border-radius: 10px; }
.team-member-status-badge.bg-approved { background-color: #d4edda; color: #155724; }
.team-member-status-badge.bg-pending { background-color: #fff3cd; color: #856404; }
.team-member-status-badge.bg-rejected { background-color: #f8f9fa; color: #721c24; }

/* --- Portfolio & Multi-upload --- */
.upload-area { border: 2px dashed #dee2e6; border-radius: 12px; padding: 40px; text-align: center; background: #f8f9fa; cursor: pointer; transition: all 0.2s; }
.upload-area:hover, .upload-area.dragover { border-color: var(--brand-teal); background: rgba(2, 167, 174, 0.05); }
.preview-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; margin-top: 20px; }
.preview-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid #eee; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.remove-preview { position: absolute; top: 5px; right: 5px; background: rgba(220, 53, 69, 0.9); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* --- Searchable Inputs --- */
.search-input-wrapper { position: relative; border: 1px solid #dee2e6; border-radius: 8px; background: #fdfdfd; transition: border-color 0.2s; padding: 0; }
.search-input { border: none !important; outline: none !important; box-shadow: none !important; padding: 12px; background: transparent; }
.search-results-dropdown { position: absolute; background-color: white; border: 1px solid #ddd; max-height: 200px; overflow-y: auto; z-index: 2000; width: 100%; left: 0; top: 100%; box-shadow: 0 4px 8px rgba(0,0,0,0.1); display: none; }
.search-result-item { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.search-result-item:hover { background-color: #f0f0f0; }
.search-result-item .add-icon { color: var(--brand-teal); font-weight: bold; }

/* --- Project Details --- */
.view-card { cursor: pointer; transition: transform 0.2s; }
.view-card:hover { transform: scale(1.02); }

/* Mobile-friendly horizontal scrollable tabs */
.scrollable-tabs { display: flex; flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 4px; }
.scrollable-tabs::-webkit-scrollbar { display: none; }
.scrollable-tabs .nav-item { flex: 0 0 auto; }

@media (max-width: 767.98px) {
    .bg-md-white { background-color: transparent !important; }
    .shadow-md-none { box-shadow: none !important; }
}