/* Qeshm Villages Cards - Redesigned */

/* Village Header Styles */
.qv-village-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: white;
    border-radius: 12px;
}

.qv-village-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
}

.qv-village-local-name {
    margin: 0;
    color: #7f8c8d;
    font-size: 18px;
    font-style: italic;
}

/* Dynamic CSS Variables from Settings */
:root {
    --qv-primary-color: <?php echo get_option('qv_primary_color', '#3498db'); ?>;
    --qv-secondary-color: <?php echo get_option('qv_secondary_color', '#2c3e50'); ?>;
    --qv-accent-color: <?php echo get_option('qv_accent_color', '#e74c3c'); ?>;
    --qv-text-color: <?php echo get_option('qv_text_color', '#2c3e50'); ?>;
    --qv-background-color: <?php echo get_option('qv_background_color', '#ffffff'); ?>;
    --qv-border-radius: <?php echo get_option('qv_border_radius', 8); ?>px;
    --qv-card-shadow: <?php 
        $shadow = get_option('qv_card_shadow', 'medium');
        if ($shadow === 'light') echo '0 2px 5px rgba(0,0,0,0.1)';
        elseif ($shadow === 'heavy') echo '0 8px 25px rgba(0,0,0,0.15)';
        else echo '0 4px 15px rgba(0,0,0,0.1)';
    ?>;
}

.qv-villages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.qv-village-card {
    background: var(--qv-background-color);
    border-radius: var(--qv-border-radius);
    box-shadow: var(--qv-card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qv-village-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.qv-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.qv-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qv-village-card:hover .qv-card-image img {
    transform: scale(1.05);
}

.qv-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 48px;
}

.qv-card-content {
    padding: 20px;
}

.qv-card-title {
    margin: 0 0 15px 0;
    color: var(--qv-text-color);
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.qv-card-info {
    margin-bottom: 20px;
}

.qv-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.qv-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.qv-label {
    font-weight: 500;
    color: #7f8c8d;
    font-size: 14px;
}

.qv-value {
    font-weight: 600;
    color: var(--qv-text-color);
    font-size: 14px;
}

.qv-no-data {
    color: #95a5a6;
    font-style: italic;
    font-weight: 400;
}

.qv-card-actions {
    text-align: center;
}

.qv-card-link {
    display: inline-block;
    background: var(--qv-primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.qv-card-link:hover {
    background: var(--qv-secondary-color);
    color: white;
    text-decoration: none;
}
    border-radius: var(--qv-border-radius);
    box-shadow: var(--qv-card-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
}

.qv-village-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.qv-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.qv-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qv-village-card:hover .qv-card-image img {
    transform: scale(1.05);
}

.qv-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.qv-card-content {
    padding: 20px;
}

.qv-card-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.qv-card-title a {
    color: var(--qv-secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.qv-card-title a:hover {
    color: var(--qv-primary-color);
}

.qv-card-info-line {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    scrollbar-width: none;
}

.qv-card-info-line::-webkit-scrollbar {
    display: none;
}

.qv-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.qv-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.qv-location-link {
    color: var(--qv-primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.qv-location-link:hover {
    color: var(--qv-accent-color);
}

/* Facilities Preview */
.qv-facilities-preview {
    margin-bottom: 12px;
}

.qv-facilities-icons {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.qv-facilities-icons::-webkit-scrollbar {
    display: none;
}

.qv-facility-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: help;
    flex-shrink: 0;
    color: var(--qv-primary-color);
}

.qv-facility-icon:hover {
    background: var(--qv-primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Council Members Preview */
.qv-council-preview {
    margin-bottom: 15px;
}

.qv-council-members-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qv-council-member-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qv-council-member-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-council-member-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
}

/* Card Actions */
.qv-card-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.qv-card-link {
    display: inline-block;
    background: #3498db;
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.qv-card-link:hover {
    background: #2980b9;
    color: white !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Village Residents Cards */
.qv-residents-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.qv-residents-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
}

.qv-residents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.qv-resident-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.qv-resident-card:hover {
    transform: translateY(-3px);
}

.qv-resident-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #e9ecef;
}

.qv-resident-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-resident-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
}

.qv-resident-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.qv-resident-age,
.qv-resident-education,
.qv-resident-occupation {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.qv-resident-description {
    font-size: 13px;
    color: #777;
    margin: 10px 0;
    line-height: 1.4;
}

.qv-resident-contacts {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.qv-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.qv-contact-link:hover {
    background: #2980b9;
    color: white;
}

/* Council Members Cards */
.qv-council-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qv-council-member-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.qv-council-member-card:hover {
    transform: translateY(-3px);
}

.qv-member-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #e9ecef;
}

.qv-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-member-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
}

.qv-member-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.qv-member-position {
    font-size: 14px;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 5px;
}

.qv-member-education,
.qv-member-mobile {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.qv-member-mobile a {
    color: #3498db;
    text-decoration: none;
}

.qv-member-mobile a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .qv-villages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .qv-card-info-line {
        flex-direction: column;
        gap: 10px;
    }
    
    .qv-facilities-icons {
        justify-content: center;
    }
    
    .qv-council-members-preview {
        justify-content: center;
    }
    
    .qv-residents-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .qv-council-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Facilities List Shortcode */
.qv-facilities-list-shortcode {
    margin: 20px 0;
}

.qv-facilities-list-shortcode .qv-facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.qv-facility-village-card {
    background: var(--qv-background-color);
    border: 1px solid #e1e8ed;
    border-radius: var(--qv-border-radius);
    padding: 20px;
    box-shadow: var(--qv-card-shadow);
    transition: transform 0.3s ease;
}

.qv-facility-village-card:hover {
    transform: translateY(-3px);
}

.qv-facility-village-header {
    margin-bottom: 15px;
    text-align: center;
}

.qv-facility-village-name {
    color: var(--qv-secondary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.qv-facility-village-facilities {
    margin-bottom: 15px;
}

.qv-facilities-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.qv-facility-icon {
    display: inline-block;
    font-size: 24px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    cursor: help;
}

.qv-facility-icon:hover {
    background: #e9ecef;
}

.qv-no-facilities {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 0;
}

.qv-facility-village-actions {
    text-align: center;
}

.qv-facility-village-link {
    display: inline-block;
    background: var(--qv-primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--qv-border-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.qv-facility-village-link:hover {
    background: var(--qv-accent-color);
    color: white;
    text-decoration: none;
}

@media (max-width: 480px) {
    .qv-village-card {
        margin: 0 10px;
    }
    
    .qv-card-content {
        padding: 15px;
    }
    
    .qv-residents-section {
        padding: 20px 15px;
    }
    
    .qv-residents-grid {
        grid-template-columns: 1fr;
    }
    
    .qv-council-members-grid {
        grid-template-columns: 1fr;
    }
    
    .qv-facilities-list-shortcode .qv-facilities-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Coverage Status in General Info */
.qv-mobile-coverage-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.qv-mobile-coverage-status.good {
    background: #d4edda;
    color: #155724;
}

.qv-mobile-coverage-status.medium {
    background: #fff3cd;
    color: #856404;
}

.qv-mobile-coverage-status.weak {
    background: #f8d7da;
    color: #721c24;
}

/* Inline Mobile Coverage in General Info */
.qv-mobile-coverage-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.qv-mobile-coverage-inline .qv-mobile-coverage-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: white;
    border-radius: 15px;
    border: 1px solid #e1e8ed;
    font-size: 14px;
}

.qv-mobile-coverage-inline .qv-mobile-coverage-icon {
    font-size: 16px;
}

.qv-mobile-coverage-inline .qv-mobile-coverage-label {
    font-weight: 500;
    min-width: auto;
}

.qv-mobile-coverage-inline .qv-mobile-coverage-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Village Main Featured Image */
.qv-village-main-image {
    margin: 20px 0;
    text-align: center;
}

.qv-village-main-image img {
    max-width: 400px;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Village Featured Images */
.qv-village-gallery {
    margin: 30px 0;
}

.qv-village-gallery h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.qv-gallery-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.qv-gallery-grid::-webkit-scrollbar {
    height: 8px;
}

.qv-gallery-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.qv-gallery-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.qv-gallery-grid::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.qv-gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    width: 150px;
}

.qv-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.qv-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Village Ads */
.qv-village-ads {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.qv-village-ads h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.qv-ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .qv-ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .qv-ads-grid {
        grid-template-columns: 1fr;
    }
}

.qv-ad-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qv-ad-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.qv-ad-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.qv-ad-item a {
    display: block;
    text-decoration: none;
}

@media (max-width: 768px) {
    .qv-mobile-coverage {
        flex-direction: column;
        gap: 15px;
    }
    
    .qv-mobile-coverage-item {
        justify-content: center;
    }
    
    .qv-mobile-coverage-inline {
        flex-direction: column;
        gap: 10px;
    }
    
    .qv-ads-grid {
        grid-template-columns: 1fr;
    }
    
    .qv-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* SEO Summary */
.qv-seo-summary {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
    text-align: justify;
    direction: rtl;
}

.qv-seo-summary h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.qv-summary-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

.qv-summary-content p:last-child {
    margin-bottom: 0;
}

.qv-summary-section {
    margin-bottom: 25px;
}

.qv-summary-section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e1e8ed;
    padding-bottom: 5px;
}

.qv-summary-section p {
    margin: 0;
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

/* Shortcode Map */
.qv-shortcode-map {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.qv-list-map {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#qv-shortcode-map,
#qv-list-map {
    min-height: 400px;
    width: 100%;
}