/* Contractors Directory - Modern Demo Standards */

:root {
    --primary: #353366;
    --secondary: #8D8A8A;
    --accent: #fbc02d;
    --text-dark: #222;
    --text-muted: #666;
    --bg-light: #f8f9fa;
}

#TheSearch {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    border: 1px solid #eee;
}

#TheSearch .search-field {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#TheSearch .search-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(53, 51, 102, 0.1);
    outline: none;
}

#TheSearch .download-wrappper select {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

#TheSearch .download-wrappper select:focus {
    border-color: var(--primary);
    outline: none;
}

#TheSearch .btn-download {
    background-color: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
    margin-top: 1rem;
}

#TheSearch .btn-download:hover {
    background-color: #2a2852;
    transform: translateY(-2px);
}

.user-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.card:hover::before {
    opacity: 1;
}

.card .header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.card .company-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    display: block;
}

.card .cert-no {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.card .info-item {
    display: flex;
    flex-direction: column;
}

.card .body {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 2px;
}

.card .body_1 {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    grid-column: span 2;
}

.card .body_2 {
    font-size: 13px;
    background: #f0f0f5;
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--primary);
    font-weight: 700;
    width: fit-content;
    margin-top: 5px;
}

.card .address-box {
    background: #f9f9fb;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #f0f0f0;
}

.card .address-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.card .footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px dashed #e0e0e0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 1.25rem;
    border-radius: 10px;
}

.card .contact-link {
    font-size: 15px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.card .contact-link:hover {
    color: var(--primary);
}

.card .expiry-tag {
    grid-column: span 2;
    font-size: 12px;
    color: #dc3545;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag {
    color: #888;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.hide {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    #TheSearch {
        padding: 1.5rem;
    }
    .user-cards {
        grid-template-columns: 1fr;
    }
}