/**
 * Custom CSS - Additional Styles for Ghaderi Sewa
 * 
 * @package GhaderiSewa
 */

/* ==========================================================================
   Loading Animation
   ========================================================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs a:hover {
    color: var(--secondary-color);
}

/* ==========================================================================
   Search Suggestions
   ========================================================================== */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--light-gray);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--off-white);
}

.suggestion-icon {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* ==========================================================================
   Property Status Tags
   ========================================================================== */
.status-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-sold {
    background: #f8d7da;
    color: #721c24;
}

.status-rented {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: #d1ecf1;
    color: #0c5460;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.comparison-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.comparison-table th {
    background: var(--off-white);
    font-weight: 600;
    color: var(--dark-gray);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: var(--off-white);
}

/* ==========================================================================
   Alert Boxes
   ========================================================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    transform: translateY(50px);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.modal-body {
    color: var(--medium-gray);
}

.modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--light-gray);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ==========================================================================
   Image Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--white);
    color: var(--dark-gray);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--light-gray) 25%,
        #e0e0e0 50%,
        var(--light-gray) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 2rem;
    width: 70%;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-image {
    height: 250px;
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   Tooltip
   ========================================================================== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
    font-size: 0.875rem;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-gray) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
   Accordion
   ========================================================================== */
.accordion-item {
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: var(--off-white);
}

.accordion-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
}

.accordion-icon {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
}

.accordion-body {
    padding: 1.5rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .site-header,
    .site-footer,
    .floating-actions,
    .back-to-top,
    .btn,
    .property-sidebar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
    
    .property-main {
        width: 100% !important;
    }
}

.blog-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #e2e2e2;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.blog-search-form input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    outline: none;
    font-size: 14px;
    border-radius: 30px 0 0 30px;
}

.blog-search-form button {
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    color: #fff;
    border: none;
    padding: 0 22px;
    height: 44px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 rgba(255,255,255,0.2);
}

.blog-search-form button:hover {
    background: linear-gradient(135deg, #005f8d, #0073aa);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0,115,170,0.3);
}

.blog-search-form button:active {
    transform: scale(0.95);
}

.blog-search-form i {
    font-size: 16px;
}
