/**
 * ClearVue Partner Directory - Styles
 * Save as: /wp-content/themes/hello-elementor-child/css/partner-directory.css
 */

/* Main Container */
.cv-partner-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Partner Types Introduction Section */
.cv-partner-intro {
    margin-bottom: 60px;
}

.cv-partner-intro-header {
    text-align: center;
    margin-bottom: 50px;
}

.cv-partner-intro-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #08173a;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.cv-partner-intro-header p {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.cv-partner-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.cv-partner-type-card {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.cv-partner-type-card:hover {
    border-color: #5BC4BF;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(91, 196, 191, 0.15);
}

.cv-partner-type-badge-img {
    margin-bottom: 24px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-partner-type-badge-img img {
    max-width: 160px;
    max-height: 100px;
    height: auto;
    width: auto;
}

.cv-partner-type-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #08173a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cv-partner-type-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Map Section */
.cv-partner-map {
    margin-bottom: 40px;
    text-align: center;
}

.cv-partner-map img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Filters Section */
.cv-partner-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cv-filter-group {
    flex: 1;
    min-width: 250px;
}

.cv-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cv-filter-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.cv-filter-select:hover,
.cv-filter-select:focus {
    border-color: #5BC4BF;
    outline: none;
}

.cv-search-button {
    flex: 0 0 auto;
    align-self: flex-end;
    padding: 12px 32px;
    background: #5BC4BF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.cv-search-button:hover {
    background: #4AB3AE;
}

/* Badge Filter Icons */
.cv-badge-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    justify-content: center;
    align-items: center;
}

.cv-badge-filter-item {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cv-badge-filter-item:hover {
    transform: translateY(-2px);
    border-color: #5BC4BF;
    box-shadow: 0 4px 12px rgba(91, 196, 191, 0.2);
}

.cv-badge-filter-item.active {
    border-color: #5BC4BF;
    background: #E8F5F4;
}

.cv-badge-filter-item img {
    max-width: 120px;
    max-height: 70px;
    height: auto;
    width: auto;
    display: block;
    margin: 0 auto;
}

.cv-badge-filter-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 4px;
    font-weight: 500;
    line-height: 1.3;
    max-width: 120px;
}

.cv-badge-filter-clear {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s;
}

.cv-badge-filter-clear:hover {
    background: #4AB3AE;
    border-color: #4AB3AE;
    color: white;
}

/* Results Section */
.cv-partner-results {
    margin-top: 40px;
}

.cv-results-header {
    margin-bottom: 24px;
}

.cv-results-count {
    font-size: 18px;
    color: #555;
}

/* Partners Grid */
.cv-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.cv-partner-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 28px 24px 24px 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cv-partner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cv-partner-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #08173a;
    line-height: 1.3;
}

.cv-partner-location {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
}

.cv-partner-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cv-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #E8F5F4;
    color: #2A9D8F;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.cv-partner-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    margin: 16px 0;
    padding: 12px 0;
}

.cv-partner-badge {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cv-partner-badge img {
    max-width: 150px;
    max-height: 90px;
    height: auto;
    width: auto;
}

.cv-partner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.cv-btn {
    padding: 10px 16px;
    border: none;
    background-color: #08173a !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.cv-btn-website {
    background-color: #2A9D8F !important;
    color: white;
}

.cv-btn-website:hover {
    background-color: #4AB3AE !important;
    color: white;
}

.cv-btn-details {
    color: #333;
}
body .cv-partner-directory .cv-badge-filters button, body .cv-partner-directory .cv-partner-filters button {
    background-color:#2A9D8F;
}
.cv-btn,.cv-btn-details{
    background-image: none !important;
    background-color:#08173a !important;
    animation: none !important;
}

.cv-btn-details:hover,.cv-btn:hover {
    background-color:#4AB3AE !important;
}

/* Loading State */
.cv-loading,
.cv-error,
.cv-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.cv-error {
    color: #dc3545;
}

/* Modal */
.cv-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.cv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 23, 58, 0.85);
}

.cv-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cv-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e5e5;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    z-index: 10001;
}

.cv-modal-close:hover {
    color: white;
    background: #4AB3AE;
    border-color: #4AB3AE;
    transform: rotate(90deg);
}

.cv-partner-detail {
    padding: 50px 40px 40px 40px;
}

.cv-detail-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.cv-partner-detail h2 {
    font-size: 32px;
    margin: 0 0 12px 0;
    color: #08173a;
    font-weight: 700;
}

.cv-detail-location {
    font-size: 16px;
    color: #666;
    margin: 8px 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cv-detail-location::before {
    content: "📍";
    font-size: 18px;
}

.cv-detail-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.cv-detail-types .cv-type-badge {
    margin: 0;
}

.cv-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cv-detail-badge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-detail-badge img {
    max-width: 140px;
    max-height: 85px;
    height: auto;
    width: auto;
}

.cv-detail-map-section {
    margin: 30px 0;
}

.cv-detail-map-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: #08173a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.cv-detail-map {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cv-detail-map iframe {
    display: block;
    width: 100%;
}

.cv-detail-address {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2A9D8F;
}

.cv-detail-info {
    margin-top: 30px;
}

.cv-detail-info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.cv-detail-info-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: #08173a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.cv-detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.cv-detail-info-item:last-child {
    border-bottom: none;
}

.cv-detail-info-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    font-size: 14px;
}

.cv-detail-info-value {
    color: #333;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.cv-detail-info-value a {
    color: #2A9D8F;
    text-decoration: none;
    word-break: break-all;
    transition: all 0.3s;
}

.cv-detail-info-value a:hover {
    color: #4AB3AE;
    text-decoration: underline;
}

.cv-detail-info-value a[target="_blank"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.cv-detail-info-value a[target="_blank"]:hover {
    gap: 6px;
}

.cv-detail-website-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #2A9D8F;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.cv-detail-website-btn:hover {
    background: #4AB3AE;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
    color: white;
}

body.cv-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cv-partner-intro {
        margin-bottom: 40px;
    }

    .cv-partner-intro-header {
        margin-bottom: 30px;
    }

    .cv-partner-intro-header h2 {
        font-size: 28px;
    }

    .cv-partner-intro-header p {
        font-size: 16px;
    }

    .cv-partner-types-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cv-partner-type-card {
        padding: 24px 20px;
    }

    .cv-partner-type-badge-img {
        min-height: 80px;
        margin-bottom: 16px;
    }

    .cv-partner-type-badge-img img {
        max-width: 120px;
        max-height: 80px;
    }

    .cv-partner-type-card h3 {
        font-size: 18px;
    }

    .cv-partner-type-card p {
        font-size: 14px;
    }

    .cv-partner-filters {
        flex-direction: column;
    }

    .cv-filter-group {
        min-width: 100%;
    }

    .cv-search-button {
        align-self: stretch;
        width: 100%;
    }

    .cv-badge-filters {
        gap: 12px;
        padding: 16px;
        flex-direction: column;
    }

    .cv-badge-filter-item {
        padding: 8px 12px;
        width: auto;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
    }

    .cv-badge-filter-item img {
        max-width: 60px;
        max-height: 40px;
        flex-shrink: 0;
    }

    .cv-badge-filter-label {
        font-size: 12px;
        max-width: none;
        font-weight: 700;
        text-align: left;
        white-space: nowrap;
    }

    .cv-badge-filter-clear {
        width: 100%;
        padding: 12px 20px;
    }

    .cv-partners-grid {
        grid-template-columns: 1fr;
    }

    .cv-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cv-partner-detail {
        padding: 40px 24px 24px 24px;
    }

    .cv-partner-detail h2 {
        font-size: 24px;
    }

    .cv-detail-badges {
        padding: 16px;
        gap: 12px;
    }

    .cv-detail-badge img {
        max-width: 100px;
        max-height: 60px;
    }

    .cv-detail-info-section {
        padding: 16px;
    }

    .cv-detail-info-item {
        flex-direction: column;
        gap: 4px;
    }

    .cv-detail-info-label {
        min-width: auto;
    }

    .cv-modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .cv-detail-map {
        margin-bottom: 16px;
    }

    .cv-detail-map iframe {
        height: 250px;
    }

    .cv-detail-address {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cv-partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}