/* ==============================================
   PROPERTY MODAL STYLES
   Extracted from projects.php, lands.php, apartments.php, villas.php
   ============================================== */

/* Property Modal Base Styles */
.property-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    background: white;
    margin: 2rem auto;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
    height: max-content;
    min-width: 100%;
}

@media screen and (min-width: 1024px) {
    .modal-container {
        min-width: 50vw;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #004558);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-content {
    max-height: 70vh;
    overflow-y: auto;
}

@media screen and (max-width: 768px) {
    .modal-content {
        max-height: 60vh;
        height: 100%;
    }
}

.modal-loading {
    padding: 3rem;
    text-align: center;
    color: #6b7280;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #0891b2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-body {
    padding: 0;
}

.property-gallery {
    position: relative;
}

.main-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 50%, rgba(0,0,0,0.7) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
}

.property-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.property-price {
    background: var(--primary-light);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8251rem;
    font-weight: 700;
    align-self: flex-end;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #0891b2;
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper Styles for Property Gallery */
.property-image-swiper {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.property-image-swiper .swiper-container {
    width: 700px;
    height: 100%;
    border-radius: 12px;
}

@media screen and (max-width: 991px) {
    .property-image-swiper .swiper-container {
        width: 100%;
    }
}

.property-image-swiper .swiper-slide {
    width: 100% !important;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.property-image-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-image-swiper .swiper-slide:hover img {
    transform: scale(1.05);
}

/* Swiper Navigation Styles */
.property-image-swiper .swiper-button-next,
.property-image-swiper .swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
    transition: all 0.3s ease;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-image-swiper .swiper-button-next:hover,
.property-image-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.property-image-swiper .swiper-button-next::after,
.property-image-swiper .swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: 700;
}

/* Swiper Pagination Styles */
.property-image-swiper .swiper-pagination {
    bottom: 15px !important;
    z-index: 10;
}

.property-image-swiper .swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

.property-image-swiper .swiper-pagination-bullet-active {
    background: white !important;
    transform: scale(1.2) !important;
}

/* Image overlay on swiper slides */
.property-image-swiper .swiper-slide .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 50%, rgba(0,0,0,0.7) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    z-index: 10;
}

/* Responsive adjustments for swiper */
@media screen and (max-width: 768px) {
    .property-image-swiper {
        height: 300px;
    }
    
    .property-image-swiper .swiper-button-next,
    .property-image-swiper .swiper-button-prev {
        width: 36px !important;
        height: 36px !important;
        margin-top: -18px !important;
    }
    
    .property-image-swiper .swiper-button-next::after,
    .property-image-swiper .swiper-button-prev::after {
        font-size: 14px !important;
    }
}

@media screen and (max-width: 480px) {
    .property-image-swiper {
        height: 250px;
    }
}

.property-info {
    padding: 1.5rem;
}

.info-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    direction: rtl;
    text-align: right;
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h4 {
    color: #fff;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 10px;
    background-color: var(--primary-color);
    width: fit-content;
}

.info-section h4 i {
    color: #fff;
    width: 20px;
    text-align: center;
}

.info-section p {
    line-height: 1.6;
    color: #374151;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#propertyDescription {
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1rem;
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #e2e8f0;
}

.info-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.info-item span {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: #f0f9ff;
    color: #0e7490;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e0f2fe;
}

/* Ultra-Modern Amenities Design */
.modern-amenities-container {
    display: grid;
    gap: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(8, 145, 178, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.modern-amenities-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 15%, rgba(8, 145, 178, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 85% 85%, rgba(14, 116, 144, 0.06) 0%, transparent 60%),
        linear-gradient(45deg, transparent 40%, rgba(8, 145, 178, 0.02) 50%, transparent 60%);
    pointer-events: none;
}

.modern-amenity-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(8, 145, 178, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.modern-amenity-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(8, 145, 178, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
}

.modern-amenity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-amenity-item:hover::before {
    opacity: 1;
}

.modern-amenity-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.modern-amenity-item:hover::after {
    left: 100%;
}

.amenity-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 
        0 6px 20px rgba(8, 145, 178, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.amenity-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.modern-amenity-item:hover .amenity-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 25px var(--primary-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(200%) rotate(45deg);
    }
}

.amenity-content {
    flex: 1;
    min-width: 0;
    position: relative;
}

.amenity-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #1e293b;
    font-weight: 600;
    text-align: right;
    direction: rtl;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: color 0.3s ease;
}

.modern-amenity-item:hover .amenity-content p {
    color: #0891b2;
}

.modal-footer {
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modal-btn i {
    width: 16px;
    text-align: center;
}

.btn-primary {
    background: #0891b2;
    color: white;
}

.btn-primary:hover {
    background: #0e7490;
    transform: translateY(-2px);
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.error-message {
    text-align: center;
    color: #dc2626;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message p {
    margin: 1rem 0;
    font-size: 1.125rem;
}

/* Project Card Styles */
.project-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.project-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.project-progress {
    margin: 15px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: bold;
}

.progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    transition: width 0.3s ease;
}

.developer-info {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.developer-info i {
    margin-right: 5px;
    color: #007bff;
}

.no-properties-message {
    padding: 4rem 2rem;
    text-align: center;
    color: #6b7280;
}

.no-properties-message i {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.no-properties-message h4 {
    color: #374151;
    margin-bottom: 1rem;
}

.no-properties-message p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        /* margin: 1rem; */
        width: 100%;
        max-width: none;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .property-info {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-btn {
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design for Ultra-Modern Amenities */
@media (max-width: 768px) {
    .modern-amenities-container {
        padding: 1.5rem;
        gap: 0.5rem;
        border-radius: 20px;
    }
    
    .modern-amenity-item {
        padding: 1rem;
        gap: 1rem;
        border-radius: 12px;
    }
    
    .amenity-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    
    .amenity-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .modern-amenity-item:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

@media (max-width: 480px) {
    .modern-amenities-container {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .modern-amenity-item {
        padding: 0.875rem;
        gap: 0.875rem;
    }
    
    .amenity-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .amenity-content p {
        font-size: 0.85rem;
    }
} 