/* ========================================
   SERVICES MODULE CSS
   Estilos específicos para Servicios Inmobiliarios
   ======================================== */

/* ==========================================
   VARIABLES ESPECÍFICAS PARA SERVICIOS
   ========================================== */

:root {
    --inmob-primary: #E09B36;
    --inmob-secondary: #2C3E50;
    --inmob-light: #F8F9FA;
    --inmob-dark: #212529;
    --inmob-gold: #FFD700;
    --inmob-shadow: 0 4px 15px rgba(224, 155, 54, 0.15);
    --inmob-shadow-hover: 0 8px 25px rgba(224, 155, 54, 0.25);
}

/* ==========================================
   PÁGINA PRINCIPAL DE SERVICIOS
   ========================================== */

/* Grid de servicios principal */
.services-grid-professional {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Card de servicio profesional */
.service-card-professional {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--inmob-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(224, 155, 54, 0.1);
    min-height: 200px;
}

.service-card-professional:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--inmob-shadow-hover);
    border-color: var(--inmob-primary);
}

.service-card-professional::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--inmob-primary), transparent);
    transition: left 0.6s ease;
}

.service-card-professional:hover::before {
    left: 100%;
}

/* Contenido interno de la card */
.service-card-inner {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Header del servicio */
.service-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--inmob-light);
    padding-bottom: 1rem;
}

.service-title {
    color: var(--inmob-secondary);
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.service-card-professional:hover .service-title {
    color: var(--inmob-primary);
}

/* Contenido del servicio */
.service-content {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.service-description {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 400;
}

/* Footer del servicio */
.service-footer {
    margin-top: auto;
}

.service-footer .btn {
    border-radius: 8px;
    font-weight: 600;
    text-transform: none;
    transition: all 0.3s ease;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.service-footer .btn::before {
    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.5s ease;
}

.service-footer .btn:hover::before {
    left: 100%;
}

.service-footer .btn:hover {
    background: var(--inmob-primary);
    border-color: var(--inmob-primary);
    color: white;
    transform: translateY(-2px);
}

/* Badge numerado */
.service-number-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--inmob-primary), var(--inmob-gold));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(224, 155, 54, 0.4);
    z-index: 3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Call to Action Section */
.call-to-action-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(224, 155, 54, 0.2);
}

.cta-box {
    background: linear-gradient(135deg, rgba(224, 155, 54, 0.05) 0%, rgba(224, 155, 54, 0.1) 100%);
    border: 2px solid rgba(224, 155, 54, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--inmob-primary), var(--inmob-gold), var(--inmob-primary));
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.cta-actions .btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.cta-actions .btn-primary {
    background: linear-gradient(135deg, var(--inmob-primary), var(--inmob-gold));
    border: none;
    box-shadow: 0 4px 15px rgba(224, 155, 54, 0.3);
}

.cta-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 155, 54, 0.4);
}

/* ==========================================
   PÁGINA DE DETALLE DE SERVICIOS
   ========================================== */

/* Sección de beneficios */
.service-benefits-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 3rem;
    border-radius: 16px;
    margin: 3rem 0;
    border: 1px solid rgba(224, 155, 54, 0.1);
    position: relative;
}

.service-benefits-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--inmob-primary), var(--inmob-gold), var(--inmob-primary));
    border-radius: 16px 16px 0 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(224, 155, 54, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--inmob-primary), var(--inmob-gold));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(224, 155, 54, 0.15);
    border-color: var(--inmob-primary);
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--inmob-primary);
    transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
}

.benefit-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--inmob-secondary);
    margin-bottom: 1rem;
}

.benefit-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Timeline de proceso */
.service-process-section {
    margin: 4rem 0;
}

.process-timeline {
    position: relative;
    margin-top: 2rem;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: 60px;
    width: 3px;
    background: linear-gradient(to bottom, var(--inmob-primary), var(--inmob-gold));
    border-radius: 2px;
}

.process-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-left: 1rem;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--inmob-primary), var(--inmob-gold));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 2rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(224, 155, 54, 0.3);
    transition: transform 0.3s ease;
}

.process-step:hover .step-number {
    transform: scale(1.05);
}

.step-content {
    flex: 1;
    padding-top: 0.5rem;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--inmob-secondary);
    margin-bottom: 0.8rem;
}

.step-description {
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* FAQ específica del servicio */
.service-faq-section {
    background: white;
    padding: 3rem;
    border: 1px solid rgba(224, 155, 54, 0.1);
    border-radius: 16px;
    margin: 3rem 0;
    position: relative;
}

.service-faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--inmob-primary), var(--inmob-gold), var(--inmob-primary));
    border-radius: 16px 16px 0 0;
}

.faq-service-specific {
    margin-top: 2rem;
}

.faq-item-service {
    border-bottom: 1px solid rgba(224, 155, 54, 0.2);
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

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

.faq-item-service:hover {
    background: rgba(224, 155, 54, 0.02);
    border-radius: 8px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.faq-question-service {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--inmob-secondary);
    margin-bottom: 1rem;
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
    transition: color 0.3s ease;
}

.faq-question-service:hover {
    color: var(--inmob-primary);
}

.faq-question-service::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.5rem;
    color: var(--inmob-primary);
    transition: transform 0.3s ease;
    font-weight: 700;
}

.faq-question-service:hover::after {
    transform: rotate(45deg);
}

.faq-answer-service {
    color: #666;
    line-height: 1.7;
    margin: 0;
    padding-left: 1.5rem;
    border-left: 3px solid var(--inmob-primary);
    background: rgba(224, 155, 54, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

/* ==========================================
   SIDEBAR SERVICIOS
   ========================================== */

.service-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(224, 155, 54, 0.1);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--inmob-primary);
    position: relative;
    color: var(--inmob-secondary);
    font-weight: 700;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--inmob-gold);
}

/* Lista de servicios en sidebar */
.services-list-widget {
    background: white;
    padding: 2rem;
}

.services-list-sidebar {
    margin: 0;
    padding: 0;
}

.service-item-sidebar {
    margin-bottom: 0.5rem;
}

.service-item-sidebar:last-child {
    margin-bottom: 0;
}

.service-link-sidebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--inmob-secondary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-link-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 155, 54, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-link-sidebar:hover::before {
    left: 100%;
}

.service-link-sidebar:hover {
    background: rgba(224, 155, 54, 0.05);
    border-color: var(--inmob-primary);
    color: var(--inmob-secondary);
    transform: translateX(5px);
    text-decoration: none;
}

.service-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.service-arrow {
    color: var(--inmob-primary);
    transition: transform 0.3s ease;
}

.service-link-sidebar:hover .service-arrow {
    transform: translateX(5px);
}

/* Widget de contacto */
.contact-widget .widget-content {
    background: linear-gradient(135deg, rgba(224, 155, 54, 0.05), rgba(224, 155, 54, 0.1)) !important;
    border: 1px solid var(--inmob-primary);
    padding: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.contact-method:hover {
    transform: translateX(5px);
}

.contact-method i {
    margin-top: 0.2rem;
    flex-shrink: 0;
    margin-right: 1rem;
    color: var(--inmob-primary);
}

.contact-label {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-value {
    font-weight: 600;
    text-decoration: none;
    color: var(--inmob-secondary);
    transition: color 0.3s ease;
}

.contact-value:hover {
    color: var(--inmob-primary) !important;
    text-decoration: none;
}

/* Widget de confianza */
.trust-widget .widget-content {
    text-align: center;
    background: white;
    padding: 2rem;
}

.trust-item {
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-3px);
}

.trust-item:last-child {
    margin-bottom: 0;
}

.trust-icon {
    margin-bottom: 1rem;
}

.trust-icon i {
    color: var(--inmob-primary);
    transition: transform 0.3s ease;
}

.trust-item:hover .trust-icon i {
    transform: scale(1.1);
}

.trust-number {
    color: var(--inmob-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    display: block;
}

.trust-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* CTA final del servicio */
.cta-service-section {
    background: linear-gradient(135deg, rgba(224, 155, 54, 0.05), rgba(224, 155, 54, 0.1)) !important;
    border-top: 3px solid var(--inmob-primary);
    position: relative;
}

.cta-service-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(45deg, transparent 49%, rgba(224, 155, 54, 0.02) 50%, transparent 51%);
    pointer-events: none;
}

.cta-service-section .btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.cta-service-section .btn::before {
    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.5s ease;
}

.cta-service-section .btn:hover::before {
    left: 100%;
}

.cta-service-section .btn-primary {
    background: linear-gradient(135deg, var(--inmob-primary), var(--inmob-gold));
    border: none;
    box-shadow: 0 4px 15px rgba(224, 155, 54, 0.3);
}

.cta-service-section .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 155, 54, 0.4);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 991px) {
    .services-grid-professional {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .service-sidebar {
        position: static;
        margin-top: 3rem;
    }

    .process-timeline::before {
        display: none;
    }

    .step-number {
        margin-right: 1rem;
    }

    .service-benefits-section,
    .service-faq-section {
        padding: 2rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .services-grid-professional {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card-inner {
        padding: 1.5rem;
    }

    .process-step {
        flex-direction: column;
        text-align: center;
        margin-bottom: 2rem;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
        margin-bottom: 1rem;
    }

    .cta-service-section .col-lg-4 {
        text-align: center !important;
        margin-top: 2rem;
    }

    .cta-service-section .btn {
        width: 100%;
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
}

@media (max-width: 576px) {
    .service-card-inner {
        padding: 1.25rem;
    }

    .service-benefits-section,
    .service-faq-section,
    .contact-widget .widget-content,
    .trust-widget .widget-content {
        padding: 1.5rem;
    }

    .benefit-card {
        padding: 1.5rem;
    }

    .service-number-badge {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
        top: 1rem;
        right: 1rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .widget-title {
        font-size: 1.1rem;
    }
}

/* ==========================================
   ANIMACIONES Y EFECTOS ESPECIALES
   ========================================== */

/* Efecto de carga para las cards */
.service-card-professional {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   UTILIDADES ESPECÍFICAS
   ========================================== */

.text-inmob-primary {
    color: var(--inmob-primary) !important;
}

.text-inmob-secondary {
    color: var(--inmob-secondary) !important;
}

.bg-inmob-primary {
    background-color: var(--inmob-primary) !important;
}

.bg-inmob-light {
    background-color: var(--inmob-light) !important;
}

.border-inmob-primary {
    border-color: var(--inmob-primary) !important;
}
