/* ==========================================================================
   ESTILOS ADICIONALES PARA NACIONAL DE ARRENDAMIENTOS
   ========================================================================== */

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   EFECTOS DE HOVER
   ========================================================================== */
.contacto-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.contacto-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
    z-index: -1;
}

.contacto-btn:hover::after {
    left: 100%;
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA PARA TARJETAS
   ========================================================================== */
.property-card, .service-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }
.property-card:nth-child(4) { animation-delay: 0.4s; }
.property-card:nth-child(5) { animation-delay: 0.5s; }
.property-card:nth-child(6) { animation-delay: 0.6s; }

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================================================
   MEJORAS EN FORMULARIOS
   ========================================================================== */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.3);
}

/* ==========================================================================
   ESTILOS PARA MENSAJES DE FORMULARIO
   ========================================================================== */
.form-message {
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.form-message.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border: 1px solid #f44336;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
    background-color: #f9f9f9;
    padding: 15px 0;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumbs a {
    color: #D32F2F;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

/* ==========================================================================
   BADGE PARA PROPIEDADES NUEVAS
   ========================================================================== */
.property-new {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #4CAF50;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* ==========================================================================
   LOADER PARA FORMULARIOS
   ========================================================================== */
.form-loader {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.form-loader.active {
    display: block;
}

.form-loader .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #D32F2F;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   MODAL PARA IMÁGENES
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
}

.modal-caption {
    text-align: center;
    color: #fff;
    padding: 10px;
    height: 10%;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #D32F2F;
}

/* ==========================================================================
   WIDGETS
   ========================================================================== */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D32F2F;
}

/* ==========================================================================
   ACCORDION PARA FAQS
   ========================================================================== */
.accordion {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background-color: #f9f9f9;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: #000;
    transition: background-color 0.3s ease;
    position: relative;
}

.accordion-header::after {
    content: '+';
    position: absolute;
    right: 15px;
    font-size: 1.2rem;
}

.accordion-header.active::after {
    content: '-';
}

.accordion-header:hover {
    background-color: #f0f0f0;
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.active {
    padding: 15px;
    max-height: 500px;
}

/* ==========================================================================
   RESPONSIVE ADICIONAL
   ========================================================================== */
@media (max-width: 992px) {
    .property-content {
        grid-template-columns: 1fr !important;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .property-filters .filter-group {
        flex: 0 0 100%;
        margin-bottom: 15px;
    }
    
    .property-meta {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .hero h1 {
        font-size: 2.2rem !important;
    }
}

@media (max-width: 576px) {
    .properties-grid {
        grid-template-columns: 1fr !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    
    .share-buttons {
        flex-wrap: wrap;
        gap: 10px !important;
    }
    
    .contacto-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   ESTILOS PARA IMPRESIÓN
   ========================================================================== */
@media print {
    .site-header,
    .contacto-btn,
    .footer-social,
    .property-share,
    .contact-form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    .container {
        max-width: 100%;
    }
    
    .property-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }
}

/* ==========================================================================
   SECCIÓN DE TESTIMONIOS
   ========================================================================== */

/* Estilos para la sección de testimonios */
.testimonials-section {
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/testimonials-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.03;
    z-index: 0;
}

.testimonials-section .container {
    position: relative;
    z-index: 1;
}

/* Grid de testimonios en página de inicio */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Tarjeta de testimonio */
.testimonial-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #D32F2F;
    border-radius: 12px 0 0 12px;
}

/* Contenido del testimonio */
.testimonial-content {
    flex: 1;
    margin-bottom: 25px;
}

.testimonial-quote {
    font-size: 2rem;
    color: #D32F2F;
    opacity: 0.3;
    margin-bottom: 15px;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-text::before,
.testimonial-text::after {
    content: '"';
    color: #D32F2F;
    font-size: 1.2em;
}

/* Calificación */
.testimonial-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.testimonial-rating i {
    color: #FFC107;
    font-size: 1.2rem;
}

.rating-number {
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Información del autor */
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #EEEEEE;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    background-color: #D32F2F;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.author-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #000000;
}

.author-position,
.author-company {
    margin: 0;
    font-size: 0.9rem;
    color: #666666;
}

.author-position {
    font-weight: 500;
}

/* Navegación del slider */
.testimonials-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.testimonial-prev,
.testimonial-next {
    background-color: #D32F2F;
    color: #FFFFFF;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background-color: #B71C1C;
    transform: scale(1.1);
}

.testimonials-dots {
    display: flex;
    gap: 10px;
}

.testimonials-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #DDDDDD;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonials-dots span.active {
    background-color: #D32F2F;
    transform: scale(1.2);
}

/* Página completa de testimonios */
.testimonials-page .section-title {
    text-align: center;
    margin-bottom: 50px;
}

.testimonials-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.testimonial-card-page {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    position: relative;
}

.testimonial-card-page:hover {
    transform: translateY(-5px);
}

.testimonial-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #FFC107;
    color: #000000;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.testimonial-card-content {
    padding: 30px;
}

.testimonial-author-page {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.author-avatar-page {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-avatar-page {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info-page h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #000000;
}

.author-info-page p {
    margin: 0;
    font-size: 0.9rem;
    color: #666666;
}

/* Formulario de testimonio */
.rating-input .stars {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.rating-input .star {
    cursor: pointer;
    font-size: 24px;
    color: #ddd;
    transition: color 0.2s ease;
}

.rating-input .star:hover,
.rating-input .star.active {
    color: #FFC107;
}

.rating-input .star:hover ~ .star {
    color: #ddd;
}

/* Responsive para testimonios */
@media (max-width: 768px) {
    .testimonials-grid,
    .testimonials-grid-page {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .testimonial-author,
    .testimonial-author-page {
        flex-direction: column;
        text-align: center;
    }
    
    .add-testimonial-form .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .testimonials-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .testimonial-prev,
    .testimonial-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Animaciones para testimonios */
@keyframes fadeInTestimonial {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card,
.testimonial-card-page {
    animation: fadeInTestimonial 0.6s ease forwards;
}

/* Estilos para la página de testimonios */
.testimonials-page .page-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
}

.add-testimonial-form {
    border: 1px solid #eee;
}

.add-testimonial-form .section-title {
    margin-bottom: 30px;
}

.add-testimonial-form .section-title h2 {
    color: #000;
    font-size: 2rem;
}

.add-testimonial-form .section-title p {
    color: #666;
    font-size: 1.1rem;
}