/* Frontend Styles for Alalza Propiedades */

/* Filter Styles */
.alalza-propiedades-filter {
    margin: 20px 0;
}

.filter-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

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

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

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-group.full-width {
    flex: 1 1 100%;
}

.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range span {
    color: #666;
}

.price-input {
    flex: 1;
}

.features-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-submit,
.filter-reset {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.filter-submit {
    background: #007cba;
    color: white;
}

.filter-submit:hover,
.filter-submit:focus {
    background: #005a87;
}

.filter-reset {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.filter-reset:hover,
.filter-reset:focus {
    background: #545b62;
}

/* Properties Grid/List Styles */
.propiedades-grid,
.propiedades-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.propiedad-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.propiedad-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.propiedad-thumbnail {
    position: relative;
    overflow: hidden;
}

.propiedad-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.propiedad-thumbnail:hover img {
    transform: scale(1.05);
}

.propiedad-info {
    padding: 15px;
}

.propiedad-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.propiedad-info h3 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.propiedad-info h3 a:hover {
    color: #007cba;
}

.propiedad-precio {
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 8px;
}

.propiedad-location {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.propiedad-detalles {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.propiedad-single {
    margin: 0 auto;
}

.propiedad-header {
    margin-bottom: 30px;
}

.propiedad-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.propiedad-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.propiedad-meta span {
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}


.propiedad-location {
    font-size: 16px;
    color: #666;
}

/* Gallery Styles */
.propiedad-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.galeria-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Details Grid */
.detalles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.detalle-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.detalle-label {
    font-weight: 600;
    color: #333;
}

.detalle-value {
    color: #666;
}

/* Characteristics */
.propiedad-caracteristicas ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
}

.propiedad-caracteristicas li {
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

/* Premium Content */
.contenido-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.contenido-premium h3 {
    margin-top: 0;
    color: white;
}

.premium-content-restricted {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
}

.membership-benefits {
    margin: 20px 0;
}

.membership-benefits ul {
    list-style: none;
    padding: 0;
}

.membership-benefits li {
    padding: 5px 0;
}

.membership-actions {
    margin-top: 20px;
}

.premium-button {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: background-color 0.3s;
}

.premium-button:hover,
.premium-button:focus {
    background: #218838;
}

.login-button {
    background: #007cba;
    margin-right: 10px;
}

.register-button {
    background: #6c757d;
}

.register-button:hover,
.register-button:focus {
    background: #545b62;
}

/* Loading */
.propiedades-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        min-width: auto;
    }

    .propiedades-grid,
    .propiedades-list {
        grid-template-columns: 1fr;
    }

    .propiedad-meta {
        flex-direction: column;
        gap: 10px;
    }

    .detalles-grid {
        grid-template-columns: 1fr;
    }

    .propiedad-galeria {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Pagination */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: background-color 0.3s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Property Access Levels Styles */
.property-access-options,
.property-access-current {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.property-access-options h3,
.property-access-current h3,
.property-access-current h4 {
    margin-top: 0;
    color: #333;
}

.access-level-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.access-level-button {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.access-level-button:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.access-level-button.upgrade-button {
    border-color: #28a745;
}

.access-level-button.upgrade-button:hover {
    border-color: #218838;
    background: #f8fff9;
}

.level-header {
    margin-bottom: 10px;
}

.level-header h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.level-price {
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
}

.level-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.access-level-button .button {
    width: 100%;
    padding: 10px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.access-level-button .button:hover {
    background: #005a87;
}

.upgrade-button .button {
    background: #28a745;
}

.upgrade-button .button:hover {
    background: #218838;
}

/* Restricted Content Styles */
.restricted-content {
    color: #6c757d;
    font-style: italic;
    opacity: 0.7;
}

.detalle-item.restricted .detalle-value {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px dashed #dee2e6;
}

.propiedad-caracteristicas.restricted {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px dashed #dee2e6;
}

.propiedad-caracteristicas.restricted h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

.galeria-item.restricted {
    position: relative;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.image-placeholder {
    position: relative;
    width: 100%;
    height: 200px;
    background: #e9ecef;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.restricted-overlay {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
}

.gallery-more-notice {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* Login Required Message */
.property-access-login-required {
    margin: 20px 0;
    padding: 15px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    text-align: center;
}

.property-access-login-required p {
    margin: 0 0 10px 0;
    color: #0c5460;
}

.login-button {
    display: inline-block;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.login-button:hover,
.login-button:focus {
    background: #005a87;
}


/* Property Access Modal Styles */
.property-access-limited {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.access-limited-message {
    max-width: 400px;
    margin: 0 auto;
}

.access-limited-message .access-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.access-limited-message h4 {
    color: #495057;
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.access-limited-message p {
    color: #6c757d;
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.5;
}

.access-modal-trigger {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.access-modal-trigger:hover,
.access-modal-trigger:focus {
    background: #005a87;
}

/* Plans Comparison Table */
.property-access-plans {
    margin: 15px 0;
}

.plans-comparison-table {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
}

.plan-column {
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.plan-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.plan-title {
    font-size: 16px;
    font-weight: 700;
    color: #333 !important;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    /* letter-spacing: 0.5px; */
}

.plan-price {
    font-size: 28px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 0;
    line-height: 1.2;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.plan-features li {
    padding: 8px 0;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 20px;
}

.plan-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #007cba;
    font-weight: bold;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-button {
    margin-top: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-button .plan-login-button {
    display: inline-block;
    padding: 12px 20px;
    background: #203443;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    /* font-size: 18px; */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    text-align: center;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.5px; */
}

.plan-button .plan-login-button:hover {
    background: #1a2835;
    transform: scale(1.02);
    color: #fff !important;
}

.plan-button .plan-buy-button {
    display: inline-block;
    padding: 12px 20px;
    background: #3AA9C4;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    /* font-size: 18px; */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    text-align: center;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.5px; */
}

.plan-button .plan-buy-button:hover {
    background: #2d8fa5;
    transform: scale(1.02);
    color: #fff !important;
}

.plan-button .plan-current {
    padding: 12px 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

/* Free Queries Info */
.free-queries-info {
    margin: 15px 0;
    padding: 0;
}

.free-queries-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #4caf50;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.free-queries-icon {
    font-size: 32px;
    line-height: 1;
}

.free-queries-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.free-queries-content strong {
    font-size: 24px;
    font-weight: 700;
    color: #2e7d32;
    line-height: 1;
}

.free-queries-content span {
    font-size: 14px;
    font-weight: 600;
    color: #388e3c;
}

.free-queries-content small {
    font-size: 12px;
    color: #66bb6a;
    font-style: italic;
}

@media (max-width: 768px) {
    .plans-comparison-table {
        flex-direction: column;
    }
    
    .plan-column {
        max-width: 100%;
    }
    
    .free-queries-badge {
        padding: 12px 15px;
    }
    
    .free-queries-content strong {
        font-size: 20px;
    }
}

/* Botón de usar consulta gratuita */
.free-query-option {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.free-query-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.free-query-box h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 18px;
}

.free-query-box p {
    margin: 8px 0;
    color: #856404;
}

.free-query-description {
    font-size: 12px;
    color: #856404;
    opacity: 0.8;
    margin-bottom: 15px !important;
}

.use-free-query-button {
    background: #ffc107 !important;
    color: #856404 !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    max-width: 300px;
}

.use-free-query-button:hover {
    background: #ffb300 !important;
    transform: scale(1.02);
    color: #856404 !important;
}

.use-free-query-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mis Consultas Shortcode */
.alalza-mis-consultas {
    margin: 20px 0;
}

.consultas-info-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.consultas-info-box h3 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 20px;
    margin-bottom: 20px;
}

.consultas-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 6px;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #2e7d32;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #388e3c;
    font-weight: 600;
}

.consultas-explanation {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.consultas-explanation p {
    margin-top: 0;
    font-weight: 600;
    color: #333;
}

.consultas-explanation ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.consultas-explanation li {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .consultas-stats {
        flex-direction: column;
    }
    
    .stat-item {
        min-width: 100%;
    }
}

/* Modal Styles */
.property-access-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover,
.modal-close:focus {
    background: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 25px;
}

.modal-body > p {
    margin-top: 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Modal Body Access Levels */
.modal-body .access-level-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.modal-body .access-level-button {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.modal-body .access-level-button:hover {
    border-color: #007cba;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.1);
}

.modal-body .level-header h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.modal-body .level-price {
    font-size: 20px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 10px;
}

.modal-body .level-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.modal-body .access-level-button .button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
}


/* Body modal open class */
body.modal-open {
    overflow: hidden;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px auto;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .property-access-limited {
        padding: 20px;
    }

    .access-limited-message {
        max-width: 100%;
    }

    .access-limited-message .access-icon {
        font-size: 36px;
    }

    .access-modal-trigger {
        padding: 10px 25px !important;
        font-size: 14px !important;
    }
}