/* ========================================
   IA LANDING PAGE STYLES
   ======================================== */

/* Hero Section */
.ia-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.ia-hero-section .intro-slider {
    height: 100%;
}

.ia-hero-section .img-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.ia-hero-section .img-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-hero-section .with-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.ia-hero-section .container {
    position: relative;
    z-index: 2;
}

.ia-hero-content {
    color: #fff;
    padding: 2rem 0;
}

.ia-hero-content .title {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.ia-hero-content .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Hero Form Card */
.ia-hero-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ia-hero-form-card .form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.ia-hero-form-card .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.ia-hero-form-card .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.ia-hero-form-card .form-control::placeholder {
    color: #999;
}

.ia-hero-form-card textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.ia-hero-form-card .form-text {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
}

.ia-hero-form-card .btn-primary {
    border-radius: 8px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Content Section - Base styles */
.ia-content-section {
    position: relative;
    margin-top: 3rem;
}

.ia-content-container {
    position: relative;
    z-index: 1;
}

/* Benefits Section */
.ia-benefits-section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Ocultar decor-circle en móvil */
.ia-benefits-section .decor-circle {
    display: none;
}

.benefits-title-col {
    padding-right: 2rem;
}

.benefits-title-col .section-title {
    font-weight: 600;
    line-height: 1.2;
    color: #1a1a1a;
}

.benefits-content-col {
    padding-left: 2rem;
}

.benefit-block {
    margin-bottom: 2rem;
}

.benefit-block:last-child {
    margin-bottom: 0;
}

.benefit-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.benefit-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 0;
}

.benefits-text {
    line-height: 1.7;
    color: var(--bs-black);
}

/* CTA Section */
.ia-cta-section {
    padding: 0;
    overflow: hidden;
}

.ia-cta-section .row {
    margin: 0;
}

.ia-cta-content-col {
    padding: 5rem 3rem;
    background: #f8f8f8;
}

.ia-cta-content {
    max-width: 560px;
    margin: 0 auto;
}

.ia-cta-content .cta-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.ia-cta-content .cta-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

.ia-cta-content .btn-cta {
    padding: 1rem 3rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ia-cta-image-col {
    padding: 0;
    position: relative;
    min-height: 500px;
}

.ia-cta-image-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.ia-cta-image-wrapper picture {
    display: block;
    width: 100%;
    height: 100%;
}

.ia-cta-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .ia-hero-content .title {
        font-size: 2.5rem;
    }

    .ia-hero-form-card {
        margin-top: 2rem;
        padding: 2rem;
    }

    .benefits-title-col {
        padding-right: 1rem;
        margin-bottom: 2rem;
    }

    .benefits-content-col {
        padding-left: 1rem;
    }

    .benefits-title-col .section-title {
        font-size: 2rem;
    }

    .ia-cta-content-col {
        padding: 3rem 2rem;
    }

    .ia-cta-content .cta-title {
        font-size: 2rem;
    }

    .ia-cta-image-col {
        min-height: 400px;
    }
}

@media (max-width: 767px) {
    .ia-hero-section {
        min-height: auto;
        padding: 4rem 0;
    }

    .ia-hero-content .title {
        font-size: 2rem;
    }

    .ia-hero-content .hero-subtitle {
        font-size: 1rem;
    }

    .ia-hero-form-card {
        padding: 1.5rem;
    }

    .ia-hero-form-card .form-title {
        font-size: 1.25rem;
    }

    .ia-benefits-section {
        padding: 3rem 0;
    }

    .benefits-title-col {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .benefits-content-col {
        padding-left: 0;
    }

    .benefits-title-col .section-title {
        font-size: 1.75rem;
    }

    .benefit-block {
        margin-bottom: 1.5rem;
    }

    .ia-cta-content-col {
        padding: 2.5rem 1.5rem;
    }

    .ia-cta-content .cta-title {
        font-size: 1.75rem;
    }

    .ia-cta-content .cta-text {
        font-size: 1rem;
    }

    .ia-cta-image-col {
        min-height: 300px;
    }
}

/* Desktop - Mostrar decor-circle en escritorio (igual que reservation-system-section) */
@media (min-width: 1024px) {
    .ia-benefits-section .decor-circle {
        display: block;
        right: -400px;
        top: -400px;
    }
}

/* Ajuste para pantallas más grandes */
@media (min-width: 1440px) {
    .ia-benefits-section .decor-circle {
        right: -500px;
        top: -500px;
    }
}

/* Ajuste para pantallas extra grandes */
@media (min-width: 1600px) {
    .ia-benefits-section .decor-circle {
        right: -628px;
        top: -628px;
    }
}

/* Animation Classes */
.slide-in-from-left {
    animation: slideInFromLeft 0.8s ease-out;
}

.slide-in-from-right {
    animation: slideInFromRight 0.8s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Viewport Section Animation Trigger */
.viewport-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.viewport-section.in-viewport {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   CUSTOM IA FORM STYLES
   ======================================== */

/* Mobile Form Toggle Button */

.mobile-form-trigger .btn {
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 0;
}

.mobile-form-trigger .btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mobile-form-trigger .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Form Collapsible - Hidden by default on mobile, visible on desktop */
.mobile-form-collapsible {
    display: block;
}

/* Hide form on mobile by default - JS will handle show/hide */
@media (max-width: 991px) {
    .mobile-form-collapsible {
        display: none;
    }

    .mobile-form-trigger {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin-top: 0;
        z-index: 1000;
    }
}

/* Always show form on desktop and hide trigger button */
@media (min-width: 992px) {
    .mobile-form-collapsible {
        display: block !important;
    }

    .mobile-form-trigger {
        display: none !important;
    }
}

/* IA Form Wrapper - Posicionamiento y espaciado */
.ia-form-wrapper {
    margin-top: 80px;
    padding-top: 0 !important;
}

/* IA Contact Form Container */
.ia-contact-form {
    max-height: none !important;
    overflow-y: visible !important;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    bottom: 0 !important;
}

/* IA Form - Espaciado interno compacto */
.ia-form .form-group {
    margin-bottom: 1rem !important;
}

.ia-form .form-group.mb-5 {
    margin-bottom: 1rem !important;
}

.ia-form .form-group.mb-10,
.ia-form .form-group.mb-md-9 {
    margin-bottom: 1.5rem !important;
}

/* Título del formulario más compacto */
.ia-form .form-title {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.ia-form .form-title.mb-7,
.ia-form .form-title.mb-md-9 {
    margin-bottom: 1.5rem !important;
}

/* Form controls más compactos */
.ia-form .form-control {
    padding: 0.65rem 0.875rem !important;
    font-size: 0.9rem !important;
}

/* Textarea más compacto */
.ia-form textarea.form-control {
    min-height: 80px !important;
    max-height: 120px;
}

/* Texto de ayuda más compacto */
.ia-form .form-text {
    font-size: 0.7rem !important;
    margin-bottom: 0.75rem !important;
}

.ia-form .form-text.mb-4,
.ia-form .form-text.mb-md-5 {
    margin-bottom: 0.75rem !important;
}

/* Botón */
.ia-form .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
}

/* Responsive adjustments for IA Form */
@media (max-width: 991px) {
    .ia-form-wrapper {
        margin-top: 0;
    }

    .ia-contact-form {
        padding: 1.75rem;
    }
}

@media (max-width: 767px) {
    .ia-form-wrapper {
        margin-top: 0;
    }

    .ia-contact-form {
        padding: 1.5rem;
        max-width: 100%;
    }

    .ia-form .form-title {
        font-size: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }

    .ia-form .form-control {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .ia-form textarea.form-control {
        min-height: 70px !important;
    }

    .ia-form .form-group {
        margin-bottom: 0.875rem !important;
    }
}

@media (max-width: 575px) {
    .ia-contact-form {
        padding: 1.25rem;
    }
}

/* ========================================
   MOBILE FORM OVERLAY (FULLSCREEN MODAL)
   ======================================== */

/* Mobile Form Overlay - Fullscreen container for mobile */
.mobile-form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Active state - visible */
.mobile-form-overlay.active {
    opacity: 1;
}

/* Mobile Form Close Button */
.mobile-form-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #1a1a1a;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
    padding: 0;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-form-close:hover {
    color: #000;
    transform: scale(1.1);
}

.mobile-form-close:active {
    transform: scale(0.95);
}

/* Mobile specific styles (< 992px) */
@media (max-width: 991px) {

    body.ia-landing{
        padding-bottom: 52px;
    }
    /* Show overlay as fullscreen modal on mobile */
    .mobile-form-overlay {
        display: none;
    }

    /* When active, show as block */
    .mobile-form-overlay.active {
        display: block;
    }

    /* Content padding inside overlay - SOLO MÓVIL */
    .mobile-form-overlay .ia-contact-form {
        padding: 4rem 1.5rem;
        margin-top: 0;
        min-height: 100vh;
        width: 100%;
        max-width: 100%;
        display: flex;
        position: relative;
        align-items: center;
    }

    /* IMPORTANTE: Forzar visibilidad del formulario dentro del overlay */
    /* La clase viewport-section tiene opacity: 0 por defecto y espera IntersectionObserver */
    /* Pero dentro del overlay móvil el observer no funciona correctamente */
    .mobile-form-overlay .viewport-section,
    .mobile-form-overlay .ia-contact-form {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    /* Close button visible on mobile */
    .mobile-form-close {
        display: flex;
    }

    /* Prevent body scroll when modal is open */
    body.mobile-form-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

/* Desktop styles (>= 992px) */
@media (min-width: 992px) {
    /* Reset overlay to normal positioning on desktop */
    .mobile-form-overlay {
        display: block !important;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        z-index: auto;
        overflow-y: visible;
        opacity: 1;
    }

    /* Hide close button on desktop */
    .mobile-form-close {
        display: none !important;
    }

    /* Reset form padding on desktop */
    .mobile-form-overlay .ia-contact-form {
        padding-top: 2rem;
        min-height: auto;
    }
}

/* Smooth animations for modal */
@media (max-width: 991px) {
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    @keyframes slideUp {
        from {
            transform: translateY(20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .mobile-form-overlay.active {
        animation: fadeIn 0.3s ease;
    }

    .mobile-form-overlay.active .ia-contact-form {
        animation: slideUp 0.4s ease 0.1s both;
    }
}
