@extends('frontend.layouts.app')
@section('title', $project->meta_title ?? ($setting->seo_title ?? 'Ramkamal Developers'))
@section('meta-title', $project->meta_title ?? ($setting->seo_title ?? 'Ramkamal Developers'))
@section('meta-description', $project->meta_description ?? ($setting->seo_description ?? ''))
@php
$highlights = $mediaByKind['highlight'] ?? collect();
$walkthroughVideos = ($mediaByKind['walkthrough'] ?? collect())
->filter(fn ($item) => filled($item->video_url));
if ($walkthroughVideos->isEmpty() && filled($project->walkthrough_video ?? null)) {
$walkthroughVideos = collect([(object) [
'video_url' => $project->walkthrough_video,
'title' => $project->walkthrough_title ?? null,
'description' => $project->walkthrough_description ?? null,
'image' => $project->walkthrough_thumb ?? null,
'mobile_image' => $project->walkthrough_thumb_mobile ?? null,
]]);
}
$hasWalkthrough = $walkthroughVideos->isNotEmpty();
$gallery = $mediaByKind['gallery'] ?? collect();
$greenAmenities = $mediaByKind['green_amenity'] ?? collect();
$modernAmenities = $mediaByKind['modern_amenity'] ?? collect();
$specs = $mediaByKind['spec'] ?? collect();
$floorplans = ($mediaByKind['floorplan'] ?? collect())->groupBy(fn ($item) => $item->subtitle ?: 'Villa 1');
$energyItems = $mediaByKind['energy'] ?? collect();
$whyChooseItems = $mediaByKind['why_choose'] ?? collect();
$payments = $mediaByKind['payment'] ?? collect();
$taglineSource = $project->tagline ?: ($project->short_description ?? '');
$taglineLines = collect(preg_split('/\r\n|\r|\n/', (string) $taglineSource) ?: [])
->map(fn ($line) => trim($line))
->filter()
->values();
$taglineH2 = $taglineLines->shift() ?? '';
$taglineH3Lines = $taglineLines;
$bookingFormRaw = trim((string) ($project->booking_form_url ?? ''));
if ($bookingFormRaw === '') {
$bookingFormPath = asset('pdf/booking_application-form.pdf');
} elseif (str_starts_with($bookingFormRaw, 'http://') || str_starts_with($bookingFormRaw, 'https://')) {
$bookingFormPath = $bookingFormRaw;
} elseif (str_starts_with($bookingFormRaw, 'projects/')) {
$bookingFormPath = asset('storage/'.$bookingFormRaw);
} else {
$bookingFormPath = asset($bookingFormRaw);
}
$brochureRaw = trim((string) ($project->brochure_path ?? ''));
if ($brochureRaw === '') {
$brochurePath = asset('pdf/Ramkamal-Royale-brochure.pdf');
} elseif (str_starts_with($brochureRaw, 'http://') || str_starts_with($brochureRaw, 'https://')) {
$brochurePath = $brochureRaw;
} elseif (str_starts_with($brochureRaw, 'projects/')) {
$brochurePath = asset('storage/'.$brochureRaw);
} else {
$brochurePath = asset($brochureRaw);
}
$sustainableBg = asset_image($project->sustainable_bg) ?: asset('assets/ongoing/sustainable.jpg');
$hasSustainable = $project->sustainable_bg || $project->sustainable_intro || $energyItems->isNotEmpty() || $whyChooseItems->isNotEmpty();
$hasLocation = $project->map_embed || $project->address || $project->location_video;
@endphp
@section('content')
@if($project->intro_html || $project->short_description || $hasWalkthrough)
{{ $project->highlights_description ?: 'Discover our projects, amenities, lifestyle experiences, and community stories through immersive video walkthroughs and exclusive project highlights.' }} {{ $item->description }} {{ $project->why_choose_description ?: 'Thoughtfully designed homes that combine prime location, sustainable living, smart technology, and timeless luxury for an elevated lifestyle.' }} {{ $item->description }} {{ $item->title }} {{ $project->gallery_description }} Explore the architecture, interiors, amenities, and lifestyle {{ $project->green_amenity_description ?: 'Designed for eco-conscious living with energy-efficient solutions, water conservation systems, and green technologies that support a smarter future.' }} {{ $item->description ?: ($item->title ?? '') }} {{ $project->modern_amenity_description ?: 'Thoughtfully curated modern features and smart conveniences that enhance comfort, security, and everyday living experiences.' }} {{ $item->description ?: ($item->title ?? '') }} {{ $project->spec_description ?: 'Each villa boasts premium configurations with quality materials, smart amenities, and meticulous construction standards.' }} {{ $project->floorplan_description ?: $project->title.' designs maximize space, comfort and natural light across multiple levels.' }} {{ $project->location_description ?: ($project->location ?: 'Explore the project location and connectivity advantages.') }}{{ $project->short_description }}
@endif
@if($project->intro_html)
{!! $project->intro_html !!}
@endif
@if($hasWalkthrough)
@php
$walkthroughEmbed = fn ($url) => 'https://www.youtube.com/embed/'.youtube_video_id($url).'?loop=0&rel=0&mute=1&autoplay=1';
$validWalkthroughs = $walkthroughVideos->filter(fn ($video) => youtube_video_id($video->video_url ?? ''))->values();
$defaultWalkthroughTitle = $project->walkthrough_title ?: 'Walkthrough Video';
$defaultWalkthroughDescription = $project->walkthrough_description ?: 'Explore every detail of '.$project->title.' through an immersive project walkthrough experience.';
@endphp
@if($validWalkthroughs->isNotEmpty())
{{ $project->highlights_tag ?: 'HIGHLIGHTS' }}
{{ $project->highlights_title ?: 'Explore Ramkamal Through Video' }}
'.$sustainableIntro.'
';
}
} else {
$introLines = preg_split('/\r\n|\r|\n/', $sustainableIntro, 2);
$introFirst = e(trim($introLines[0]));
$introRest = isset($introLines[1]) ? trim($introLines[1]) : '';
$sustainableIntro = ''.$introFirst.($introRest !== '' ? ' '.e($introRest).'' : '').'
';
}
@endphp
{!! $sustainableIntro !!}
@endif
@if($energyItems->isNotEmpty())
{{ $project->why_choose_title ?: 'Why Choose '.$project->title }}
{{ $project->gallery_tag ?: 'SHOWCASE' }}
{{ $project->gallery_title ?: 'Project Gallery' }}
@if($project->gallery_description)
experiences crafted at Ramkamal.
{{ $project->green_amenity_tag ?: 'SUSTAINABLE' }}
{{ $project->green_amenity_title ?: 'Go Green Amenities' }}
{{ $project->modern_amenity_tag ?: 'INNOVATIVE' }}
{{ $project->modern_amenity_title ?: 'Modern & Special Amenities' }}
{{ $project->spec_title ?: 'Specifications' }}
{{ $item->title }}
@endif
@if($item->description)
{{ $project->floorplan_title ?: 'Floor Plan' }}
@foreach($floorplans as $villaName => $plans)
@endif
@foreach($plans as $floor)
{{ $project->location_title ?: 'Location Map' }}
 }})
 }})
Site Address : {!! nl2br(e($project->address)) !!}
 }})
 }})
{{ $project->payment_title ?: 'Easy Payment Schedule' }}
@foreach($payments as $item)