/* --- Contractors List as Home Style --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr)!important;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.contractor-card-home .card {
    border: 1px solid rgb(143 143 143 / 13%);
    border-radius: 1rem;
    box-shadow: 0 0px 20px -4px #a3a3a36b;
    margin: 0;
    min-height: 220px;
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.contractors-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 50%,
      rgb(0 0 0 / 74%) 100%
    );
    border-radius: 1rem;
    z-index: 1;
}
.card-logo {
    position: absolute;
    max-height: 80px;
    max-width: 180px;
    width: auto;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: brightness(0) invert(1);
    z-index: 2;
}

.text-blue {
    color: var(--background-secondary);
}
.text-bold {
    font-weight: 700;
}

.contractors-grid, .contractor-card, .contractor-card-inner, .contractor-background, .contractor-content, .contractor-logo, .contractor-name, .contractor-location {
    all: unset;
    display: revert;
}

.contractors-grid {
    margin-top: 2rem;
}

.contractor-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.3s ease;
}

.contractor-card-inner {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    position: relative;
}

.contractor-background {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.contractor-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.contractor-content {
    padding: 1.5rem;
    text-align: center;
}

.contractor-logo {
    margin: -60px auto 1rem;
    width: 120px;
    height: 120px;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.contractor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contractor-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.contractor-location {
    color: #666;
    font-size: 0.9rem;
}

.contractor-location i {
    margin-right: 5px;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .contractor-background {
        height: 150px;
    }

    .contractor-logo {
        width: 100px;
        height: 100px;
        margin-top: -50px;
    }

    .contractor-name {
        font-size: 1.2rem;
    }
}

.contractor-header {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 130px 0;
    color: #fff;
    text-align: center;
}

.contractor-header .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.contractor-header .container {
    position: relative;
    z-index: 1;
}

.contractor-header .contractor-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    background: #fff;
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.contractor-header .contractor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contractor-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.contractor-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.contractor-sidebar {
    position: sticky;
    top: 2rem;
}

.contractor-info-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.contractor-info-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contractor-address p {
    margin-bottom: 0.5rem;
    color: #666;
}

.contractor-address p:last-child {
    margin-bottom: 0;
}

.btn-block {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .contractor-header {
        padding: 60px 0;
    }

    .contractor-header .contractor-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .contractor-title {
        font-size: 2rem;
    }

    .contractor-content,
    .contractor-info-card {
        padding: 1.5rem;
    }
}

.contractor-logo-hero {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    position: relative;
    z-index: 2;
    overflow: visible;
}
.contractor-logo-hero img {
    width: 100%;
    max-width: 300px;
    max-height: 100px;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(10);
}
.contractor-title {
    color: var(--background-secondary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.contractor-map-block {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    padding: 1rem;
    min-height: 325px;
    height: 325px;
}

.contractor-info-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}
.contractor-info-card h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.contractor-contact .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.contractor-contact .contact-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .contractor-logo-hero {
        width: 100px;
        height: 100px;
    }
    .contractor-title {
        font-size: 1.3rem;
    }
    .contractor-map-block {
        padding: 0.5rem;
    }
}

.contractor-map {
    width: 100%;
    height: 295px;
    border-radius: 12px;
    overflow: hidden;
}

.no-shadow {
    box-shadow: none !important;
}
.no-padding {
    padding: 0 !important;
}
.no-bg {
    background: none !important;
}
.full-width {
    width: 100% !important;
} 

.card-grid a:hover {
    transform: translateY(0)!important;
}

.card:hover {
    transform: translateY(0)!important;
}