@extends('layout.front.master')
@section('title', config('site.tagline', config('site.name')))
@section('description', config('site.seo.description') ?? config('site.description', ''))
@section('keywords', config('site.seo.keywords') ?? '')
@section('og_title', config('site.name'))
@section('og_description', config('site.og.description') ?? config('site.description', ''))
@section('og_image', brand_og_image())
@section('og_type', 'website')
@section('og_url', url()->current())
@section('twitter_title', config('site.name'))
@section('twitter_description', config('site.twitter.description') ?? config('site.description', ''))
@section('twitter_image', brand_twitter_image())
@section('content')
{{-- ==========================================
HERO — Carousel de slides (from DB)
========================================== --}}
@if(isset($carouselImages) && $carouselImages->count() > 0)
@foreach($carouselImages as $slide)
@endforeach
@else
{{-- Fallback slide --}}
@endif
{{-- ==========================================
SERVICES PREVIEW — 3 cards bajo el carousel
========================================== --}}
@if(is_module_active('services') && isset($services) && $services->count() > 0)
@foreach($services->take(3) as $index => $service)
@endforeach
@endif
{{-- ==========================================
SERVICES CAROUSEL — Cards con SVG icons
========================================== --}}
@if(is_module_active('services') && isset($services) && $services->count() > 0)
{{ config('site.welcome.services_badge', __('QUÉ HACEMOS')) }}
{{ config('site.welcome.services_heading', __('Nuestras líneas de negocio')) }}
@foreach($services as $index => $service)
@if($service->icon && str_ends_with($service->icon, '.svg'))
@elseif($service->icon)
@elseif($service->image)
@else
@endif
{{ $service->title }}
{{ Str::limit(strip_tags($service->description), 120) }}
{{ __('SABER MÁS') }}+
@endforeach
@endif
{{-- ==========================================
ABOUT INLINE — Quiénes somos + counters inline
========================================== --}}
{{ config('site.about.badge', __('QUIÉNES SOMOS')) }}
{{ config('site.welcome.about_heading', config('site.about.main_title', config('site.name'))) }}
{{ config('site.about.main_subtitle', '') }}
@if(config('site.about.secondary_text'))
{{ config('site.about.secondary_text') }}
@endif
{{ __('SABER MÁS') }}+
{{-- Counters INLINE (como en el live) --}}
@php
$counters = config('site.about.counters', []);
if (is_string($counters)) { $counters = json_decode($counters, true) ?? []; }
@endphp
@if(!empty($counters))
@foreach($counters as $counter)
{{ $counter['value'] ?? 0 }}{{ $counter['append'] ?? '' }}
{{ $counter['label'] ?? '' }}
@endforeach
@endif
{{-- ==========================================
PROJECTS — Portfolio dinámico
========================================== --}}
@if(is_module_active('projects') && isset($featuredProjects) && $featuredProjects->count() > 0)
{{ config('site.welcome.projects_badge', __('PROYECTOS DESTACADOS')) }}
{{ config('site.welcome.projects_heading', __('Proyectos Destacados')) }}
@foreach($featuredProjects as $index => $project)
@php
$projImg = $project->image
? (filter_var($project->image, FILTER_VALIDATE_URL) ? $project->image : asset($project->image))
: asset('cd-project/img/demos/construction-2/portfolio/portfolio-' . (($index % 4) + 1) . '.jpg');
@endphp
@endforeach
@endif
{{-- ==========================================
PARA NO RESIDENTES — Sección split (texto + imagen)
========================================== --}}
{{ config('site.welcome.split_badge', __('PARA NO RESIDENTES')) }}
{{ config('site.welcome.split_heading', __('Inversores extranjeros')) }}
{{ config('site.welcome.split_text', __('Facilitamos su entrada al mercado español: asesoramiento fiscal, apertura de cuentas bancarias y gestión de hipotecas para no residentes.')) }}
@if(config('site.welcome.split_text_2'))
{{ config('site.welcome.split_text_2') }}
@endif
{{ config('site.welcome.cta_label', __('SOLICITAR COTIZACIÓN')) }}+
@php
$splitImg = asset('cd-project/img/demos/construction-2/services/services-1.jpg');
if (is_module_active('gallery') && isset($galleryImages) && $galleryImages->count() > 0) {
$firstGallery = $galleryImages->first();
$splitImg = filter_var($firstGallery->img, FILTER_VALIDATE_URL) ? $firstGallery->img : asset($firstGallery->img);
}
@endphp
{{-- ==========================================
TESTIMONIALS — Opiniones de clientes (testimonials module)
========================================== --}}
@if(isset($testimonials) && $testimonials->count() > 0)
{{ config('site.about.testimonials_badge', __('LO QUE DICEN')) }}
{{ config('site.about.testimonials_title', __('Opiniones de clientes')) }}
@foreach($testimonials as $t)
{{ $t->description }}
{{ strtoupper($t->position ?? '') }}{{ $t->company ? ' - ' . strtoupper($t->company) : '' }}
@endforeach
@endif
{{-- CTA FINAL --}}