Compare commits

..

5 Commits

Author SHA1 Message Date
KaviSaparamadu cb50fbbb19 ui chng 2026-08-07 15:04:46 +05:30
KaviSaparamadu 582c3a7e18 ui 2026-08-07 13:07:19 +05:30
KaviSaparamadu 523179880e ui 2 2026-08-07 12:41:16 +05:30
KaviSaparamadu 5f2abd44b4 ui chngs 2026-08-07 11:57:59 +05:30
KaviSaparamadu ba9b90f6e8 ui1 2026-08-07 11:25:00 +05:30
4 changed files with 1424 additions and 181 deletions

View File

@ -25,11 +25,16 @@
}
body {
font-family: 'Segoe UI', Arial, sans-serif;
font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
color: var(--text-main);
background-color: #ffffff;
}
h1, h2, h3, h4, h5, h6,
.course-title, .features-section h2, .feature-box h5 {
font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}
/* ===== Hero Section ===== */
.hero {
background-image: linear-gradient(rgba(207, 220, 238, 0.9), rgba(35, 29, 29, 0.85)), url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1600&q=80');
@ -37,12 +42,30 @@ body {
background-position: center;
background-repeat: no-repeat;
color: #ffffff;
padding: 130px 0;
padding: 92px 0 100px;
text-align: center;
}
.hero-badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.14);
border: 1px solid rgba(255, 255, 255, 0.28);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: #FFE618;
font-size: 12.5px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 8px 18px;
border-radius: 999px;
margin-bottom: 18px;
}
.hero h1 {
font-size: 55px;
font-size: clamp(2.2rem, 4.5vw, 3.4rem);
font-weight: 800;
text-shadow: 0 2px 15px rgba(0,0,0,0.4);
}
@ -50,10 +73,16 @@ body {
.hero p {
max-width: 700px;
margin: auto;
font-size: 19px;
font-size: 17px;
color: #F1F5F9;
}
.search-results-hint {
margin-top: 14px;
font-size: 13.5px;
color: rgba(255, 255, 255, 0.75);
}
/* --- Premium Search Box Styling --- */
.search-box {
max-width: 550px;
@ -65,17 +94,50 @@ body {
background: #fff;
border-radius: 100px;
border: 1px solid rgba(255, 255, 255, 0.1);
transition: box-shadow 0.3s ease;
}
.search-box:focus-within {
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255, 230, 24, 0.35);
}
.search-box-icon {
display: flex;
align-items: center;
padding-left: 24px;
color: #94A3B8;
font-size: 15px;
}
.search-box input {
width: 100%;
padding: 16px 28px;
padding: 16px 12px;
border: none;
outline: none;
font-size: 16px;
color: #333;
}
.search-box-clear {
display: none;
align-items: center;
padding: 0 14px;
border: none;
background: transparent;
color: #94A3B8;
cursor: pointer;
font-size: 15px;
transition: color 0.2s ease;
}
.search-box-clear:hover {
color: var(--secondary);
}
.search-box-clear.visible {
display: flex;
}
.search-box button {
background: linear-gradient(135deg, #13141A 0%, #8ca8e9 100%);
color: #fff;
@ -94,27 +156,34 @@ body {
.course-card {
overflow: hidden;
background: #fff;
transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
border: 1px solid var(--card-border);
border-radius: 22px;
box-shadow: 0 8px 24px var(--shadow-color);
transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
}
.course-card:hover {
transform: translateY(-6px);
transform: translateY(-7px);
box-shadow: 0 22px 48px rgba(62, 81, 184, 0.14);
border-color: rgba(62, 81, 184, 0.25);
}
.course-image-wrapper {
padding: 20px;
height: 100%;
overflow: hidden;
}
.course-card img {
height: 220px;
width: 100%;
object-fit: cover;
border-radius: 16px;
transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.course-card:hover img {
transform: scale(1.04);
transform: scale(1.05);
}
.course-card .card-body {
@ -165,6 +234,9 @@ body {
}
.badge-bestseller {
display: inline-flex;
align-items: center;
gap: 5px;
background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-orange) 100%);
color: #fff;
font-weight: 700;
@ -173,7 +245,14 @@ body {
border-radius: 30px;
text-transform: uppercase;
letter-spacing: 0.05em;
box-shadow: 0 4px 10px rgba(188, 26, 26, 0.2);
box-shadow: 0 4px 10px rgba(188, 26, 26, 0.2), 0 0 0 0 rgba(188, 26, 26, 0.4);
animation: badgePulse 2.4s ease-out infinite;
}
@keyframes badgePulse {
0% { box-shadow: 0 4px 10px rgba(188, 26, 26, 0.2), 0 0 0 0 rgba(188, 26, 26, 0.4); }
70% { box-shadow: 0 4px 10px rgba(188, 26, 26, 0.2), 0 0 0 7px rgba(188, 26, 26, 0); }
100% { box-shadow: 0 4px 10px rgba(188, 26, 26, 0.2), 0 0 0 0 rgba(188, 26, 26, 0); }
}
.rating-star {
@ -182,7 +261,34 @@ body {
font-size: 14px;
display: flex;
align-items: center;
gap: 4px;
gap: 6px;
}
.star-rating {
position: relative;
display: inline-block;
font-size: 12px;
line-height: 1;
letter-spacing: 2px;
}
.star-rating-bg {
color: #dde3ea;
}
.star-rating-fill {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
white-space: nowrap;
width: 0;
color: #f39c12;
transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.star-rating.filled .star-rating-fill {
width: calc(var(--rating) / 5 * 100%);
}
.rating-count {
@ -193,13 +299,28 @@ body {
.course-features {
display: flex;
gap: 20px;
font-size: 13.5px;
flex-wrap: wrap;
gap: 10px;
font-size: 12.5px;
color: var(--success-green);
margin-bottom: 24px;
font-weight: 600;
}
.course-features span {
display: inline-flex;
align-items: center;
background: rgba(16, 185, 129, 0.08);
padding: 5px 12px;
border-radius: 8px;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.course-card:hover .course-features span {
background: rgba(16, 185, 129, 0.14);
transform: translateY(-2px);
}
.course-features span i {
margin-right: 6px;
}
@ -214,14 +335,21 @@ body {
padding: 13px 28px;
font-weight: 600;
font-size: 15px;
border-radius: 14px;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
border: 2px solid transparent;
text-decoration: none;
display: block;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
box-shadow: 0 4px 12px rgba(10, 103, 223, 0.2);
}
.read-btn .read-btn-arrow {
transition: transform 0.3s ease;
}
.read-btn:hover {
background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
color: #fff;
@ -229,6 +357,10 @@ body {
box-shadow: 0 6px 18px rgba(188, 26, 26, 0.3);
}
.read-btn:hover .read-btn-arrow {
transform: translateX(4px);
}
/* --- Features Section --- */
.features-section {
background-color: var(--bg-light);
@ -238,6 +370,24 @@ body {
background-size: 20px 20px;
}
.features-eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 255, 255, 0.25);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: #FFE618;
font-size: 12.5px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 7px 18px;
border-radius: 999px;
margin-bottom: 16px;
}
.features-section h2 {
font-size: 45px;
font-weight: 800;
@ -246,6 +396,7 @@ body {
}
.feature-box {
position: relative;
background: #fff;
padding: 40px 28px;
border-radius: 24px;
@ -254,6 +405,18 @@ body {
border: 1px solid var(--card-border);
text-align: center;
box-shadow: 0 6px 20px rgba(62, 81, 184, 0.02);
overflow: hidden;
}
.feature-index {
position: absolute;
top: 14px;
right: 18px;
font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
font-size: 13px;
font-weight: 700;
color: rgba(62, 81, 184, 0.25);
letter-spacing: 0.05em;
}
.feature-icon-wrapper {
@ -266,9 +429,8 @@ body {
align-items: center;
justify-content: center;
font-size: 24px;
margin-bottom: 24px;
margin: 0 auto 24px;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
margin-left: 38%;
}
.feature-box:hover {
@ -278,6 +440,10 @@ body {
color:#6a2525 ;
}
.feature-box:hover .feature-index {
color: rgba(188, 26, 26, 0.35);
}
.feature-box:hover .feature-icon-wrapper {
background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-orange) 100%);
color: #fff;
@ -338,21 +504,27 @@ body {
<section class="hero">
<div class="container">
<div class="animate-on-scroll animated fade-up-init">
<span class="hero-badge"><i class="fa-solid fa-graduation-cap"></i> {{ $courses->count() }} Programs Available</span>
<h1>Our Courses</h1>
<p>
Build your future in the automotive industry through practical
training and internationally recognized learning experiences.
</p>
<div class="search-box">
<span class="search-box-icon"><i class="fas fa-search"></i></span>
<input
type="text"
id="courseSearch"
placeholder="Search Courses by title, level or description..."
>
<button type="button" class="search-box-clear" id="courseSearchClear" aria-label="Clear search">
<i class="fa-solid fa-xmark"></i>
</button>
<button type="button">
<i class="fas fa-search"></i>
</button>
</div>
<p class="search-results-hint" id="searchResultsHint"></p>
</div>
</div>
</section>
@ -392,12 +564,16 @@ body {
<div class="course-meta-row">
@if($course->badge)
<span class="badge-bestseller">{{ $course->badge }}</span>
<span class="badge-bestseller"><i class="fa-solid fa-bolt"></i> {{ $course->badge }}</span>
@endif
@if($course->rating)
<span class="rating-star">
<i class="fas fa-star"></i> {{ $course->rating }}
<span class="star-rating" style="--rating: {{ $course->rating }};">
<span class="star-rating-bg">★★★★★</span>
<span class="star-rating-fill">★★★★★</span>
</span>
{{ $course->rating }}
</span>
@endif
@ -414,7 +590,7 @@ body {
</div>
<div class="course-footer" style="max-width: 200px;">
<a href="/apply" class="read-btn">Apply Course</a>
<a href="/apply" class="read-btn">Apply Course <i class="fa-solid fa-paper-plane read-btn-arrow"></i></a>
</div>
</div>
</div>
@ -440,11 +616,13 @@ body {
background-size: cover;
background-position: center;
background-repeat: no-repeat;">
<span class="features-eyebrow"><i class="fa-solid fa-star"></i> Our Advantage</span>
<h2>Why Study With Us?</h2>
<div class="row g-4">
<div class="col-xl-3 col-md-6">
<div class="feature-box">
<span class="feature-index">01</span>
<div class="feature-icon-wrapper">
<i class="fas fa-chalkboard-teacher"></i>
</div>
@ -455,6 +633,7 @@ body {
<div class="col-xl-3 col-md-6">
<div class="feature-box">
<span class="feature-index">02</span>
<div class="feature-icon-wrapper">
<i class="fas fa-cogs"></i>
</div>
@ -465,6 +644,7 @@ body {
<div class="col-xl-3 col-md-6">
<div class="feature-box">
<span class="feature-index">03</span>
<div class="feature-icon-wrapper">
<i class="fas fa-award"></i>
</div>
@ -475,6 +655,7 @@ body {
<div class="col-xl-3 col-md-6">
<div class="feature-box">
<span class="feature-index">04</span>
<div class="feature-icon-wrapper">
<i class="fas fa-briefcase"></i>
</div>
@ -491,30 +672,47 @@ body {
<script>
document.addEventListener('DOMContentLoaded', function () {
// === 1. Course Search Feature ===
document.getElementById('courseSearch').addEventListener('keyup', function() {
let filter = this.value.toLowerCase();
const courseSearchInput = document.getElementById('courseSearch');
const courseSearchClear = document.getElementById('courseSearchClear');
const searchResultsHint = document.getElementById('searchResultsHint');
const totalCourseCount = document.querySelectorAll('.course-item').length;
function runCourseSearch() {
let filter = courseSearchInput.value.toLowerCase();
let courseItems = document.querySelectorAll('.course-item');
let hasResults = false;
let matchCount = 0;
courseItems.forEach(function(item) {
let title = item.querySelector('.course-title') ? item.querySelector('.course-title').textContent.toLowerCase() : '';
let desc = item.querySelector('.course-short-desc') ? item.querySelector('.course-short-desc').textContent.toLowerCase() : '';
if (title.includes(filter) || desc.includes(filter)) {
item.style.setProperty('display', '', 'important');
hasResults = true;
item.style.setProperty('display', '', 'important');
matchCount++;
item.classList.add('animated');
} else {
item.style.setProperty('display', 'none', 'important');
item.style.setProperty('display', 'none', 'important');
}
});
let noResultsMsg = document.getElementById('noResults');
if (hasResults) {
if (matchCount > 0) {
noResultsMsg.classList.add('d-none');
} else {
noResultsMsg.classList.remove('d-none');
}
courseSearchClear.classList.toggle('visible', filter.length > 0);
searchResultsHint.textContent = filter.length > 0
? `Showing ${matchCount} of ${totalCourseCount} courses`
: '';
}
courseSearchInput.addEventListener('keyup', runCourseSearch);
courseSearchClear.addEventListener('click', function() {
courseSearchInput.value = '';
runCourseSearch();
courseSearchInput.focus();
});
// === 2. Pure Intersection Observer Scroll Animation ===
@ -524,7 +722,7 @@ document.addEventListener('DOMContentLoaded', function () {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animated');
observer.unobserve(entry.target);
observer.unobserve(entry.target);
}
});
}, {
@ -532,6 +730,20 @@ document.addEventListener('DOMContentLoaded', function () {
});
animatedElements.forEach(el => observer.observe(el));
// === 3. Animated Star Rating Fill ===
const starRatings = document.querySelectorAll('.star-rating');
if (starRatings.length) {
const starObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('filled');
starObserver.unobserve(entry.target);
}
});
}, { threshold: 0.4 });
starRatings.forEach(el => starObserver.observe(el));
}
});
</script>

View File

@ -4,16 +4,26 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', 'Automobile Academic')</title>
<title>@yield('title', 'Home') | AutoEdu - Automobile Engineering Academy</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%232D355B'/%3E%3Cpath d='M18 28 L24 16 L40 16 L46 28 Z' fill='%23FFEA85'/%3E%3Crect x='8' y='28' width='48' height='14' rx='6' fill='%23FFEA85'/%3E%3Ccircle cx='20' cy='44' r='6' fill='%231F2541' stroke='%23FFEA85' stroke-width='2'/%3E%3Ccircle cx='44' cy='44' r='6' fill='%231F2541' stroke='%23FFEA85' stroke-width='2'/%3E%3C/svg%3E">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Segoe UI', sans-serif;
font-family: 'Inter', 'Segoe UI', sans-serif;
background: #F6F6F6;
padding-top: 56px;
padding-top: 83px;
}
h1, h2, h3, h4, h5, h6,
.navbar-brand, .site-footer h4 {
font-family: 'Poppins', 'Segoe UI', sans-serif;
}
.navbar {
@ -24,51 +34,144 @@
top: 0;
left: 0;
width: 100%;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
box-shadow: 0 4px 24px rgba(0,0,0,0.16);
border-bottom: 1px solid rgba(255,255,255,0.06);
height: 83px;
display: flex;
align-items: center;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
transition: box-shadow 0.3s ease;
}
.navbar .container {
display: flex;
align-items: center;
}
.navbar-brand {
color: white;
font-weight: bold;
font-size: 24px;
font-size: 22px;
letter-spacing: -0.01em;
display: inline-flex;
align-items: center;
gap: 12px;
transition: opacity 0.2s ease;
}
.navbar-brand i {
color: #FFEA85;
background: rgba(255, 234, 133, 0.12);
width: 42px;
height: 42px;
border-radius: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 18px;
transition: transform 0.25s ease;
}
.navbar-brand:hover i {
transform: rotate(-8deg) scale(1.05);
}
.navbar-brand:hover {
color: #f4f4f8;
opacity: 0.9;
}
.navbar-toggler {
border: none;
box-shadow: none !important;
}
.navbar-nav {
align-items: center;
gap: 2px;
}
.nav-link {
color: rgba(255, 255, 255, 0.9) !important;
margin-left: 20px;
transition: 0.2s ease;
font-weight: bold;
font-size: 18px;
color: rgba(255, 255, 255, 0.85) !important;
margin-left: 2px;
padding: 9px 16px !important;
border-radius: 999px;
transition: color 0.2s ease, background-color 0.2s ease;
font-weight: 600;
font-size: 15.5px;
position: relative;
}
.nav-link:hover,
.nav-link.active-page {
color: #FFEA85 !important;
/* color: #FF4040FC !important; */
font-weight: bold;
background: rgba(255, 255, 255, 0.07);
font-weight: 600;
}
.navbar .btn-outline-light,
.navbar .btn-theme-register {
border-radius: 999px;
font-weight: 600;
padding: 8px 22px !important;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.navbar .btn-outline-light:hover,
.navbar .btn-theme-register:hover {
transform: translateY(-2px);
}
.navbar .btn-theme-register {
box-shadow: 0 8px 20px rgba(130, 36, 36, 0.35);
}
.site-footer {
background:#1F2541;
/* background: #182EA4; */
color: #ffffff;
padding: 60px 0 30px;
padding: 64px 0 30px;
border-top: 3px solid #FFEA85;
}
.site-footer h4 {
color: #FFEA85;
font-weight: 700;
margin-bottom: 18px;
margin-bottom: 20px;
letter-spacing: 0.02em;
font-size: 16px;
text-transform: uppercase;
}
.site-footer p {
color: #f1f3f9;
line-height: 1.6;
line-height: 1.7;
}
.footer-social {
display: flex;
gap: 10px;
margin-top: 22px;
}
.footer-social a {
width: 38px;
height: 38px;
border-radius: 50%;
background: rgba(255, 234, 133, 0.1);
color: #FFEA85;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 14px;
transition: transform 0.2s ease, background-color 0.2s ease;
}
.footer-social a:hover {
background: #FFEA85;
color: #1F2541;
transform: translateY(-3px);
}
.user-dropdown-toggle {
@ -94,6 +197,24 @@
white-space: nowrap;
}
.dropdown-menu {
border: none;
border-radius: 12px;
padding: 8px;
margin-top: 12px !important;
}
.dropdown-item {
border-radius: 8px;
padding: 8px 12px;
font-weight: 500;
transition: background-color 0.15s ease;
}
.dropdown-item:hover {
background-color: #F4F5FA;
}
.footer-links li {
margin-bottom: 10px;
}
@ -113,13 +234,20 @@
margin-bottom: 14px;
color: #f1f3f9;
display: flex;
align-items: flex-start;
gap: 10px;
align-items: center;
gap: 12px;
}
.footer-contact i {
color: #FFEA85;
margin-top: 3px;
background: rgba(255, 234, 133, 0.12);
width: 34px;
height: 34px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.footer-contact a {
@ -199,7 +327,7 @@
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="menu" style="padding-left:214px;">
<div class="collapse navbar-collapse" id="menu">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0 align-items-lg-center">
<li class="nav-item">
<a class="nav-link {{ request()->is('/') ? 'active-page' : '' }}" href="/">Home</a>
@ -222,8 +350,8 @@
@php
$displayName = Auth::user()->first_name . ' ' . Auth::user()->last_name;
@endphp
<div class="dropdown" style="padding-left:325px;">
<a class="user-dropdown-toggle text-white"
<div class="dropdown">
<a class="user-dropdown-toggle text-white"
href="#"
role="button"
id="userMenu"
@ -249,7 +377,7 @@
</ul>
</div>
@else
<div class="d-flex gap-2" style="padding-left:214px;">
<div class="d-flex gap-2">
<a href="/signin" class="btn btn-outline-light btn-sm px-3">Sign In</a>
<!-- Swapped btn-warning for our new custom primary brand color button -->
<a href="/signup" class="btn btn-theme-register btn-sm px-3" style="background: #822424;border: 2px solid #FFF;">Register</a>
@ -271,6 +399,12 @@
<div class="col-md-4">
<h4>Automobile Academic</h4>
<p>Providing excellence in Automotive Engineering Education, Innovation and Research.</p>
<div class="footer-social">
<a href="#" aria-label="Facebook"><i class="fa-brands fa-facebook-f"></i></a>
<a href="#" aria-label="Instagram"><i class="fa-brands fa-instagram"></i></a>
<a href="#" aria-label="LinkedIn"><i class="fa-brands fa-linkedin-in"></i></a>
<a href="#" aria-label="YouTube"><i class="fa-brands fa-youtube"></i></a>
</div>
</div>
<div class="col-md-4">

View File

@ -23,37 +23,152 @@
}
body {
font-family: 'Segoe UI', Arial, sans-serif;
font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
color: var(--text-main);
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}
.hero {
background: linear-gradient(rgba(214, 218, 238, 0.85), rgba(0, 0, 0, 0.6)),
url('https://images.pexels.com/photos/3802510/pexels-photo-3802510.jpeg');
background-size: cover;
background-position: center;
position: relative;
overflow: hidden;
color: #fff;
padding: 80px 0;
padding: 76px 0 64px;
text-align: center;
height: 480px;
min-height: 420px;
display: flex;
align-items: center;
}
.hero-slideshow {
position: absolute;
inset: 0;
z-index: 0;
}
.hero-slide {
position: absolute;
inset: 0;
background-position: center;
background-size: cover;
opacity: 0;
transform: scale(1);
transition: opacity 2s ease-in-out, transform 7s ease-out;
}
.hero-slide.active {
opacity: 1;
transform: scale(1.09);
}
.hero-overlay {
position: absolute;
inset: 0;
z-index: 1;
background: linear-gradient(rgba(214, 218, 238, 0.85), rgba(0, 0, 0, 0.6));
pointer-events: none;
}
.hero > .container {
position: relative;
z-index: 2;
}
.hero-dots {
position: absolute;
left: 0;
right: 0;
bottom: 18px;
z-index: 3;
display: flex;
justify-content: center;
gap: 10px;
}
.hero-dot {
width: 10px;
height: 10px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.15);
padding: 0;
cursor: pointer;
transition: all 0.3s ease;
}
.hero-dot:hover {
background: rgba(255, 255, 255, 0.5);
}
.hero-dot.active {
background: #FFE618;
border-color: #FFE618;
width: 26px;
border-radius: 999px;
}
.hero h1 {
font-size: clamp(2rem, 4vw, 3rem);
}
.hero-badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.16);
border: 1px solid rgba(255, 255, 255, 0.3);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: #FFE618;
font-size: 12.5px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 8px 18px;
border-radius: 999px;
margin-bottom: 18px;
}
.portal-card {
position: relative;
display: flex;
flex-direction: column;
border: none;
border-radius: 15px;
border-radius: 20px;
transition: .4s cubic-bezier(0.165, 0.84, 0.44, 1);
box-shadow: 0 5px 20px rgba(0,0,0,.04);
border: 1px solid var(--card-border);
cursor: pointer;
overflow: hidden;
}
.portal-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, var(--secondary) 0%, var(--accent-orange) 100%);
transform: scaleX(0);
transform-origin: left;
transition: transform 0.4s ease;
}
.portal-card:hover::before {
transform: scaleX(1);
}
.portal-card:hover {
transform: translateY(-8px);
border-color: #5f3131;
box-shadow: 0 15px 30px rgba(62, 81, 184, 0.12);
box-shadow: 0 20px 40px rgba(62, 81, 184, 0.14);
}
.portal-icon {
position: relative;
width: 70px;
height: 70px;
background: #822a32;
@ -64,35 +179,132 @@ body {
justify-content: center;
font-size: 28px;
margin: auto;
box-shadow: 0 8px 18px rgba(130, 42, 50, 0.25);
transition: 0.4s ease;
}
.portal-icon::after {
content: '';
position: absolute;
inset: -11px;
z-index: -1;
border-radius: 50%;
background: rgba(130, 42, 50, 0.08);
transition: background-color 0.4s ease, transform 0.4s ease;
}
.portal-card:hover .portal-icon {
background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
transform: scale(1.1);
box-shadow: 0 5px 15px rgba(188, 26, 26, 0.3);
box-shadow: 0 8px 20px rgba(188, 26, 26, 0.35);
color: #ffed8b;
}
.portal-card:hover .portal-icon::after {
background: rgba(188, 26, 26, 0.14);
transform: scale(1.08);
}
.portal-access-hint {
display: inline-flex;
justify-content: center;
align-items: center;
gap: 6px;
margin-top: auto;
padding-top: 16px;
border-top: 1px dashed var(--card-border);
font-size: 13px;
font-weight: 700;
color: var(--secondary);
opacity: 0.75;
transition: opacity 0.3s ease, color 0.3s ease;
}
.portal-card:hover .portal-access-hint {
opacity: 1;
color: var(--secondary-hover);
}
.portal-access-hint i {
transition: transform 0.3s ease;
}
.portal-card:hover .portal-access-hint i {
transform: translateX(3px);
}
.btn-portal {
background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
color: #fff;
padding: 12px 35px;
border-radius: 8px;
font-weight: 600;
padding: 13px 34px;
border-radius: 999px;
font-weight: 700;
border: 2px solid rgba(255, 255, 255, 0.9);
transition: all 0.3s ease;
}
.btn-portal:hover {
background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
color: #f4ff8d;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(188, 26, 26, 0.3);
color: #fff;
transform: translateY(-3px);
box-shadow: 0 10px 24px rgba(188, 26, 26, 0.4);
}
.btn-hero-outline {
background: rgba(255, 255, 255, 0.12);
color: #fff;
border: 2px solid rgba(255, 255, 255, 0.7);
padding: 13px 34px;
border-radius: 999px;
font-weight: 700;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
transition: all 0.3s ease;
}
.btn-hero-outline:hover {
background: rgba(255, 255, 255, 0.95);
color: var(--secondary-hover);
border-color: #fff;
transform: translateY(-3px);
}
.btn:hover {
border-color: rgba(255, 255, 255, 0.98);
}
.hero-quick-stats {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
margin-top: 36px;
}
.hero-quick-stat {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
color: #fff;
font-size: 13.5px;
font-weight: 600;
padding: 9px 18px;
border-radius: 999px;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.hero-quick-stat:hover {
transform: translateY(-3px);
background: rgba(255, 255, 255, 0.16);
}
.hero-quick-stat i {
color: #FFE618;
}
.modal-content {
border: none;
@ -120,6 +332,19 @@ body {
font-size: 1.35rem;
}
.modal-login-icon {
width: 64px;
height: 64px;
border-radius: 50%;
background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
color: #FFE618;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
box-shadow: 0 10px 24px rgba(188, 26, 26, 0.25);
}
.modal-body {
padding: 10px 25px 20px;
}
@ -200,6 +425,25 @@ body {
box-shadow: 0 6px 15px rgba(188, 26, 26, 0.3);
}
.custom-list-item {
background: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
}
.custom-list-item:hover {
background: #ffffff;
transform: translateX(5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.quick-link-icon {
width: 48px;
height: 48px;
background-color: rgb(108, 55, 55);
color: #fff;
}
.bg-light {
background: linear-gradient(rgba(162, 190, 255, 0.49), rgba(237, 235, 255, 0.9)), url('https://images.pexels.com/photos/3807277/pexels-photo-3807277.jpeg?auto=compress&cs=tinysrgb&w=1600');
background-size: cover;
@ -235,24 +479,56 @@ body {
</style>
<!-- HERO SECTION -->
@php
$studentHeroSlides = [
'https://images.pexels.com/photos/3802510/pexels-photo-3802510.jpeg',
'https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1553440569-bcc63803a83d?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1581093803931-46e730e7622e?auto=format&fit=crop&w=1600&q=80',
];
@endphp
<section class="hero">
<div class="hero-slideshow" aria-hidden="true">
@foreach($studentHeroSlides as $index => $slideImage)
<div class="hero-slide {{ $index === 0 ? 'active' : '' }}" style="background-image: url('{{ $slideImage }}');"></div>
@endforeach
</div>
<div class="hero-overlay" aria-hidden="true"></div>
<div class="hero-dots" aria-hidden="true">
@foreach($studentHeroSlides as $index => $slideImage)
<button type="button" class="hero-dot {{ $index === 0 ? 'active' : '' }}" data-slide-index="{{ $index }}" aria-label="Show slide {{ $index + 1 }}"></button>
@endforeach
</div>
<div class="container" style="padding-top: 46px;">
<div class="animate-item animated fade-up-init">
<span class="hero-badge"><i class="fa-solid fa-user-graduate"></i> Your Academic Hub</span>
<h1 class="fw-bold display-5">Student Portal</h1>
<p class="mt-3 fs-5" style="max-width: 700px; margin: auto;">
Access your courses, timetable, assignments, examination results,
payments and profile from one place.
</p>
<button onclick="studentlogin()" class="btn btn-portal mt-4 shadow">
Student Login
</button>
<div class="d-flex flex-wrap justify-content-center gap-3 mt-4">
<button onclick="studentlogin()" class="btn btn-portal shadow">
<i class="fa-solid fa-right-to-bracket me-2"></i>Student Login
</button>
<a href="#student-services" class="btn btn-hero-outline">
<i class="fa-solid fa-compass me-2"></i>Browse Services
</a>
</div>
<div class="hero-quick-stats">
<span class="hero-quick-stat"><i class="fa-solid fa-clock"></i> 24/7 Access</span>
<span class="hero-quick-stat"><i class="fa-solid fa-shield-halved"></i> Secure Login</span>
<span class="hero-quick-stat"><i class="fa-solid fa-layer-group"></i> 6 Portal Services</span>
</div>
</div>
</div>
</section>
<!-- SERVICES SECTION -->
<section class="py-5 overflow-hidden">
<section id="student-services" class="py-5 overflow-hidden">
<div class="container">
<div class="text-center mb-5 animate-item fade-up-init">
<h2 class="fw-bold">Student Services</h2>
@ -269,6 +545,7 @@ body {
</div>
<h4 class="mt-4 fw-bold">My Courses</h4>
<p class="text-muted mb-0">View enrolled courses and learning materials.</p>
<span class="portal-access-hint">Access Portal <i class="fa-solid fa-arrow-right"></i></span>
</div>
</div>
@ -279,6 +556,7 @@ body {
</div>
<h4 class="mt-4 fw-bold">Class Timetable</h4>
<p class="text-muted mb-0">Check your weekly lecture schedule.</p>
<span class="portal-access-hint">Access Portal <i class="fa-solid fa-arrow-right"></i></span>
</div>
</div>
@ -289,6 +567,7 @@ body {
</div>
<h4 class="mt-4 fw-bold">Assignments</h4>
<p class="text-muted mb-0">Submit assignments and download resources.</p>
<span class="portal-access-hint">Access Portal <i class="fa-solid fa-arrow-right"></i></span>
</div>
</div>
@ -299,6 +578,7 @@ body {
</div>
<h4 class="mt-4 fw-bold">Exam Results</h4>
<p class="text-muted mb-0">View semester and final examination results.</p>
<span class="portal-access-hint">Access Portal <i class="fa-solid fa-arrow-right"></i></span>
</div>
</div>
@ -309,6 +589,7 @@ body {
</div>
<h4 class="mt-4 fw-bold">Fee Payments</h4>
<p class="text-muted mb-0">Pay course fees and download payment receipts.</p>
<span class="portal-access-hint">Access Portal <i class="fa-solid fa-arrow-right"></i></span>
</div>
</div>
@ -319,6 +600,7 @@ body {
</div>
<h4 class="mt-4 fw-bold">Student Profile</h4>
<p class="text-muted mb-0">Update your personal information securely.</p>
<span class="portal-access-hint">Access Portal <i class="fa-solid fa-arrow-right"></i></span>
</div>
</div>
</div>
@ -349,14 +631,10 @@ body {
<div class="d-flex flex-column gap-3">
<!-- Item 1 -->
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between transition-all custom-list-item"
style="background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.05); transition: all 0.3s ease;"
onmouseover="this.style.background='#ffffff'; this.style.transform='translateX(5px)'; this.style.boxShadow='0 5px 15px rgba(0,0,0,0.08)';"
onmouseout="this.style.background='rgba(255, 255, 255, 0.7)'; this.style.transform='translateX(0)'; this.style.boxShadow='none';" onclick="studentlogin()">
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between custom-list-item" onclick="studentlogin()">
<div class="d-flex align-items-center gap-3">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0"
style="width: 48px; height: 48px; background-color: rgb(108, 55, 55); color: #fff;">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0 quick-link-icon">
<i class="fa-solid fa-calendar-days fs-5"></i>
</div>
<div>
@ -369,14 +647,10 @@ body {
</a>
<!-- Item 2 -->
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between transition-all custom-list-item"
style="background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.05); transition: all 0.3s ease;"
onmouseover="this.style.background='#ffffff'; this.style.transform='translateX(5px)'; this.style.boxShadow='0 5px 15px rgba(0,0,0,0.08)';"
onmouseout="this.style.background='rgba(255, 255, 255, 0.7)'; this.style.transform='translateX(0)'; this.style.boxShadow='none';" onclick="studentlogin()">
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between custom-list-item" onclick="studentlogin()">
<div class="d-flex align-items-center gap-3">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0"
style="width: 48px; height: 48px; background-color: rgb(108, 55, 55); color: #fff;">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0 quick-link-icon">
<i class="fa-solid fa-book-bookmark fs-5"></i>
</div>
<div>
@ -389,14 +663,10 @@ body {
</a>
<!-- Item 3 -->
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between transition-all custom-list-item"
style="background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.05); transition: all 0.3s ease;"
onmouseover="this.style.background='#ffffff'; this.style.transform='translateX(5px)'; this.style.boxShadow='0 5px 15px rgba(0,0,0,0.08)';"
onmouseout="this.style.background='rgba(255, 255, 255, 0.7)'; this.style.transform='translateX(0)'; this.style.boxShadow='none';" onclick="studentlogin()">
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between custom-list-item" onclick="studentlogin()">
<div class="d-flex align-items-center gap-3">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0"
style="width: 48px; height: 48px; background-color: rgb(108, 55, 55); color: #fff;">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0 quick-link-icon">
<i class="fa-solid fa-file-lines fs-5"></i>
</div>
<div>
@ -409,14 +679,10 @@ body {
</a>
<!-- Item 4 -->
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between transition-all custom-list-item"
style="background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.05); transition: all 0.3s ease;"
onmouseover="this.style.background='#ffffff'; this.style.transform='translateX(5px)'; this.style.boxShadow='0 5px 15px rgba(0,0,0,0.08)';"
onmouseout="this.style.background='rgba(255, 255, 255, 0.7)'; this.style.transform='translateX(0)'; this.style.boxShadow='none';" onclick="studentlogin()">
<a href="#" class="text-decoration-none text-dark p-3 rounded-3 d-flex align-items-center justify-content-between custom-list-item" onclick="studentlogin()">
<div class="d-flex align-items-center gap-3">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0"
style="width: 48px; height: 48px; background-color: rgb(108, 55, 55); color: #fff;">
<div class="rounded-circle d-flex align-items-center justify-content-center flex-shrink-0 quick-link-icon">
<i class="fa-solid fa-headset fs-5"></i>
</div>
<div>
@ -442,7 +708,7 @@ body {
<h2 class="fw-bold">Ready to Access Your Student Account?</h2>
<p class="text-muted fs-5">Log in to manage your academic activities and stay updated.</p>
<button onclick="studentlogin()" class="btn btn-portal mt-3 shadow">
Student Login
<i class="fa-solid fa-right-to-bracket me-2"></i>Student Login
</button>
</div>
</section>
@ -451,12 +717,15 @@ body {
<div class="modal fade" id="studentLoginModal" tabindex="-1" aria-labelledby="studentLoginModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header d-flex align-items-center justify-content-between">
<h5 class="modal-title w-100 text-center" id="studentLoginModalLabel">
<i class="fa-solid fa-lock-open me-2" style="font-size: 20px; color: var(--secondary);"></i>
<div class="modal-header d-flex flex-column align-items-center position-relative">
<button type="button" class="btn-close position-absolute top-0 end-0 m-3" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="modal-login-icon">
<i class="fa-solid fa-lock-open"></i>
</div>
<h5 class="modal-title text-center mt-3" id="studentLoginModalLabel">
Student Portal Login
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<p class="text-muted small text-center mb-0">Enter your credentials to continue</p>
</div>
<form action="{{ route('student.login.submit') }}" method="POST" id="studentLoginForm">
@csrf
@ -503,6 +772,38 @@ function studentlogin() {
}
document.addEventListener('DOMContentLoaded', function () {
// Hero Background Slideshow
const heroSlides = document.querySelectorAll('.hero-slide');
const heroDots = document.querySelectorAll('.hero-dot');
if (heroSlides.length > 1) {
let activeSlide = 0;
let slideTimer;
const goToSlide = (index) => {
heroSlides[activeSlide].classList.remove('active');
heroDots[activeSlide]?.classList.remove('active');
activeSlide = index;
heroSlides[activeSlide].classList.add('active');
heroDots[activeSlide]?.classList.add('active');
};
const startSlideTimer = () => {
clearInterval(slideTimer);
slideTimer = setInterval(() => {
goToSlide((activeSlide + 1) % heroSlides.length);
}, 5500);
};
heroDots.forEach(dot => {
dot.addEventListener('click', () => {
goToSlide(parseInt(dot.dataset.slideIndex, 10));
startSlideTimer();
});
});
startSlideTimer();
}
const animatedElements = document.querySelectorAll('.animate-item');
const observer = new IntersectionObserver((entries) => {

View File

@ -30,7 +30,7 @@
/* ===== Global Improvements ===== */
body {
font-family: 'Segoe UI', Arial, sans-serif;
font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
color: #1E293B;
background-color: #ffffff;
}
@ -38,95 +38,277 @@ body {
.section {
padding: 53px 0;
}
.section-title, h2, h3, h4, h5, h6 {
font-family: 'Segoe UI', Arial, sans-serif;
font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
font-weight: 700;
letter-spacing: -0.01em;
color: var(--primary);
}
/* ===== Premium Theme Buttons ===== */
.btn-theme {
background: #305CB1;
background: #822424;
color: #fff;
padding: 14px 35px;
border-radius: 40px;
font-weight: 600;
transition: all 0.3s ease;
font-weight: bolder;
padding: 14px 32px;
border-radius: 999px;
font-weight: 700;
box-shadow: none;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.btn-theme:hover {
background: var(--secondary-hover);
border-color: var(--secondary-hover);
background: rgba(130, 36, 36, 0.92);
border-color: #fff;
color: #fff;
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(227, 100, 20, 0.3);
transform: translateY(-4px);
box-shadow: none;
}
.btn-outline-theme {
background: transparent;
background: rgba(255, 255, 255, 0.12);
color: #fff;
border: 2px solid #fff;
border: 2px solid rgba(255, 255, 255, 0.95);
padding: 12px 32px;
border-radius: 40px;
border-radius: 999px;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: none;
transition: transform 0.3s ease, background-color 0.3s ease;
backdrop-filter: blur(12px);
}
.btn-outline-theme:hover {
background: #fff;
background: rgba(255, 255, 255, 0.95);
color: var(--primary);
transform: translateY(-3px);
transform: translateY(-4px);
box-shadow: none;
}
.btn-outline-light-custom {
background: #f2e862;
color: #000000;
border: 2px solid rgba(255, 255, 255, 0.25);
border: 2px solid rgba(255, 255, 255, 0.28);
padding: 12px 32px;
border-radius: 40px;
border-radius: 999px;
font-weight: 600;
backdrop-filter: blur(5px);
transition: all 0.3s ease;
backdrop-filter: blur(12px);
box-shadow: none;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.btn-outline-light-custom:hover {
background: #f2e862;
color: var(--primary);
border-color: #fff;
transform: translateY(-3px);
transform: translateY(-4px);
box-shadow: none;
}
.hero {
height:636px;
background: linear-gradient(rgba(207, 226, 255, 0.88), rgba(0, 9, 15, 0.75)), url('https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80');
background-position: center;
background-size: cover;
}
.hero-content {
height: 100%;
min-height: 92vh;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.28);
}
.hero-slideshow {
position: absolute;
inset: 0;
z-index: 0;
}
.hero-slide {
position: absolute;
inset: 0;
background-position: center;
background-size: cover;
opacity: 0;
transform: scale(1);
transition: opacity 2s ease-in-out, transform 7s ease-out;
}
.hero-slide.active {
opacity: 1;
transform: scale(1.09);
}
.hero-dots {
position: absolute;
left: 0;
right: 0;
bottom: 26px;
z-index: 3;
display: flex;
justify-content: center;
gap: 10px;
}
.hero-dot {
width: 10px;
height: 10px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.15);
padding: 0;
cursor: pointer;
transition: all 0.3s ease;
}
.hero-dot:hover {
background: rgba(255, 255, 255, 0.5);
}
.hero-dot.active {
background: #f2e862;
border-color: #f2e862;
width: 26px;
border-radius: 999px;
}
.hero-overlay {
position: absolute;
inset: 0;
z-index: 1;
background: linear-gradient(rgba(207, 226, 255, 0.88), rgba(0, 9, 15, 0.75));
pointer-events: none;
}
.hero::before {
content: '';
position: absolute;
inset: 0;
z-index: 2;
background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 28%),
radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 30%);
pointer-events: none;
}
.hero-content {
position: relative;
z-index: 3;
width: 100%;
max-width: 980px;
margin: 0 auto;
padding: 48px 24px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
color: #fff;
padding-top: 38px;
}
.hero-badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 255, 255, 0.25);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: #fff;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
padding: 8px 18px;
border-radius: 999px;
margin-bottom: 22px;
}
.hero-badge i {
color: #f2e862;
}
.hero h1 {
font-size: 63px;
font-size: clamp(3rem, 5vw, 5.2rem);
font-weight: 800;
margin-top: -87px;
text-shadow: 0 2px 15px rgba(0,0,0,0.3);
margin: 0;
line-height: 1.05;
letter-spacing: -0.04em;
text-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.hero p {
font-size: 22px;
max-width: 700px;
color: white;
font-size: clamp(1rem, 1.2vw, 1.4rem);
max-width: 760px;
margin: 24px auto 0;
color: rgba(255, 255, 255, 0.92);
letter-spacing: 0.01em;
}
.hero .d-flex {
margin-top: 36px;
z-index: 1;
}
.hero .btn {
min-width: 170px;
}
.hero .btn + .btn {
margin-left: 10px;
}
.hero-stats {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 14px;
margin-top: 44px;
z-index: 1;
position: relative;
}
.hero-stat-pill {
display: flex;
align-items: center;
gap: 10px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.18);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-radius: 999px;
padding: 10px 20px;
color: #fff;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.hero-stat-pill:hover {
transform: translateY(-3px);
background: rgba(255, 255, 255, 0.16);
}
.hero-stat-pill strong {
font-size: 17px;
font-weight: 800;
line-height: 1;
font-variant-numeric: tabular-nums;
}
.hero-stat-pill span {
font-size: 12px;
color: rgba(255, 255, 255, 0.78);
display: block;
letter-spacing: 0.02em;
}
.section-eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
text-transform: uppercase;
font-weight: 700;
font-size: 12.5px;
letter-spacing: 0.1em;
color: #822424;
background: rgba(130, 36, 36, 0.07);
padding: 7px 16px;
border-radius: 999px;
margin-bottom: 14px;
}
.courses-section {
@ -134,16 +316,33 @@ body {
}
.course-card {
position: relative;
border: 1px solid var(--card-border);
border-radius: 18px;
overflow: hidden;
background: #fff;
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s ease;
box-shadow: 0 5px 15px var(--shadow-color);
}
.course-card::after {
content: '';
position: absolute;
inset: 0;
z-index: 3;
pointer-events: none;
background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
transform: translateX(-120%);
transition: transform 0.9s ease;
}
.course-card:hover::after {
transform: translateX(120%);
}
.course-card:hover {
transform: translateY(-6px);
box-shadow: 0 15px 35px rgba(15, 44, 89, 0.12);
transform: translateY(-8px);
box-shadow: 0 24px 45px rgba(15, 44, 89, 0.16);
border-color: rgba(48, 133, 195, 0.25);
}
@ -157,17 +356,24 @@ body {
height: 100%;
width: 100%;
object-fit: cover;
transition: transform 0.6s ease;
transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.course-card:hover img {
transform: scale(1.06);
transform: scale(1.12);
}
.courses-section .row.g-4 > div {
perspective: 1200px;
}
.badge-floating {
position: absolute;
top: 15px;
left: 15px;
display: inline-flex;
align-items: center;
gap: 5px;
background: #BC1A1A;
color: #fff;
font-weight: 700;
@ -177,7 +383,14 @@ body {
text-transform: uppercase;
letter-spacing: 0.05em;
z-index: 2;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 0 rgba(188, 26, 26, 0.45);
animation: badgePulse 2.4s ease-out infinite;
}
@keyframes badgePulse {
0% { box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 0 rgba(188, 26, 26, 0.45); }
70% { box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 8px rgba(188, 26, 26, 0); }
100% { box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 0 rgba(188, 26, 26, 0); }
}
.course-card .card-body {
@ -234,6 +447,12 @@ body {
display: inline-flex;
align-items: center;
gap: 6px;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.course-card:hover .feature-pill {
background: rgba(48, 133, 195, 0.15);
transform: translateY(-2px);
}
.course-footer {
@ -250,9 +469,12 @@ body {
}
.rating-star {
color: #f39c12;
color: #f39c12;
font-weight: 700;
font-size: 14px;
display: inline-flex;
align-items: center;
gap: 6px;
}
.rating-count {
@ -260,23 +482,69 @@ body {
font-weight: 500;
}
.status-chip {
display: inline-flex;
align-items: center;
gap: 5px;
background: rgba(46, 204, 113, 0.1);
padding: 4px 10px;
border-radius: 999px;
}
.star-rating {
position: relative;
display: inline-block;
font-size: 12px;
line-height: 1;
letter-spacing: 2px;
}
.star-rating-bg {
color: #dde3ea;
}
.star-rating-fill {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
white-space: nowrap;
width: 0;
color: #f39c12;
transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.star-rating.filled .star-rating-fill {
width: calc(var(--rating) / 5 * 100%);
}
.read-btn {
background:#822424;
color: white;
padding: 10px 20px;
padding: 12px 20px;
font-weight: 700;
border-radius: 6px;
border-radius: 14px;
font-size: 14px;
transition: all 0.3s ease;
text-decoration: none;
display: block;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.read-btn .read-btn-arrow {
transition: transform 0.3s ease;
}
.course-card:hover .read-btn {
background: #822424;
border-color: #e3eb73;
background: #6a1c1c;
color: #fff;
box-shadow: 0 8px 18px rgba(130, 36, 36, 0.3);
}
.course-card:hover .read-btn .read-btn-arrow {
transform: translateX(4px);
}
/* ===== Why Choose Us ===== */
@ -302,28 +570,34 @@ body {
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
padding: 30px;
transition: all 0.3s ease;
border-radius: 20px;
padding: 36px 30px;
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.custom-feature-card:hover {
transform: translateY(-5px);
transform: translateY(-8px);
background: rgba(0, 0, 0, 0.07);
border-color: rgb(255, 255, 255);
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}
.icon-box {
background: #6a2525;
color: #FFE618;
width: 60px;
height: 60px;
border-radius: 12px;
width: 64px;
height: 64px;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
transition: all 0.3s ease;
margin-bottom: 22px;
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
transition: all 0.35s ease;
}
.custom-feature-card:hover .icon-box {
transform: scale(1.08) rotate(-4deg);
}
.custom-feature-card:hover .icon-box {
@ -334,43 +608,221 @@ body {
/* ===== Animations ===== */
.animate-on-scroll {
opacity: 0;
transition: all 0.8s ease-out;
transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up-init { transform: translateY(30px); }
.fade-up-init { transform: translateY(34px) scale(0.98); }
.zoom-in-init { transform: scale(0.95); }
.animate-on-scroll.animated {
opacity: 1;
transform: translateY(0) scale(1);
}
/* ===== Modal Styling ===== */
.custom-modal-header {
background-color: white;
/* ===== CTA Callout ===== */
.cta-card {
background: linear-gradient(135deg, var(--primary), #1a3f7a);
border-radius: 28px;
padding: 40px 40px;
position: relative;
overflow: hidden;
box-shadow: 0 25px 60px rgba(15, 44, 89, 0.25);
}
.cta-card::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 40%),
radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 45%);
pointer-events: none;
}
.cta-glow {
position: absolute;
width: 340px;
height: 340px;
border-radius: 50%;
filter: blur(90px);
pointer-events: none;
opacity: 0.35;
}
.cta-glow-1 {
top: -120px;
left: -80px;
background: var(--accent-blue);
}
.cta-glow-2 {
bottom: -140px;
right: -60px;
background: var(--secondary);
}
.cta-card > *:not(.cta-glow) {
position: relative;
z-index: 1;
}
.cta-eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 255, 255, 0.25);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: #FFE618;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 6px 16px;
border-radius: 999px;
margin-bottom: 14px;
}
.cta-card h2 {
color: #fff;
font-size: clamp(1.6rem, 3vw, 2.4rem);
margin-bottom: 10px !important;
}
.cta-card p {
color: rgba(255, 255, 255, 0.82);
margin-bottom: 22px !important;
}
.cta-actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 14px;
}
.cta-trust {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 26px;
margin-top: 22px;
padding-top: 16px;
border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.cta-trust-item {
display: inline-flex;
align-items: center;
gap: 8px;
color: rgba(255, 255, 255, 0.85);
font-size: 14px;
font-weight: 600;
}
.cta-trust-item i {
color: #FFE618;
}
/* ===== Modal Styling ===== */
#courseFinderModal .modal-content {
border-radius: 20px;
overflow: hidden;
}
.custom-modal-header {
background-color: white;
color: var(--primary);
border-bottom: 3px solid var(--secondary);
padding: 23px;
padding: 20px 23px;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
}
.modal-close-btn {
width: 36px;
height: 36px;
min-width: 36px;
border-radius: 50%;
border: none;
background: rgba(15, 44, 89, 0.08);
color: var(--primary);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 15px;
transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.modal-close-btn:hover {
background: var(--secondary);
color: #fff;
transform: rotate(90deg);
}
</style>
{{-- ===================== HERO ===================== --}}
@php
$heroSlides = [
'https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1553440569-bcc63803a83d?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1493238792000-8113da705763?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1581093803931-46e730e7622e?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1487754180451-c456f719a1fc?auto=format&fit=crop&w=1600&q=80',
];
@endphp
<section class="hero" role="banner" aria-label="Automobile Engineering Academy Introduction">
<div class="hero-slideshow" aria-hidden="true">
@foreach($heroSlides as $index => $slideImage)
<div class="hero-slide {{ $index === 0 ? 'active' : '' }}" style="background-image: url('{{ $slideImage }}');"></div>
@endforeach
</div>
<div class="hero-overlay" aria-hidden="true"></div>
<div class="hero-dots" aria-hidden="true">
@foreach($heroSlides as $index => $slideImage)
<button type="button" class="hero-dot {{ $index === 0 ? 'active' : '' }}" data-slide-index="{{ $index }}" aria-label="Show slide {{ $index + 1 }}"></button>
@endforeach
</div>
<div class="container h-100">
<div class="hero-content text-center animate-on-scroll animated fade-up-init">
<span class="hero-badge"><i class="fa-solid fa-award"></i> Accredited Automotive Engineering Institute</span>
<h1 class="display-4">Automobile Engineering Academy</h1>
<p class="mb-4">Driving Innovation Through Education, Research &amp; Technology</p>
<div class="d-flex flex-wrap justify-content-center gap-3">
<a href="{{ Route::has('apply') ? route('apply') : '#' }}" class="btn btn-theme" style="background: #822424;border: 2px solid #FFF;">
<a href="{{ Route::has('apply') ? route('apply') : '#' }}" class="btn btn-theme" style="background: #822424; border: 2px solid #FFF;">
<i class="fa-solid fa-user-plus me-2"></i>Apply Now
</a>
<a href="/courses" class="btn btn-outline-theme">
<i class="fa-solid fa-book-open me-2"></i>Explore Courses
</a>
<a href="mailto:imadhigp@gmail.com" class="btn btn-outline-light-custom">
<a href="mailto:imadhigp@gmail.com" class="btn btn-outline-light-custom">
<i class="fa-solid fa-phone me-2"></i>Contact Admissions
</a>
</div>
<div class="hero-stats">
<div class="hero-stat-pill">
<i class="fa-solid fa-user-graduate"></i>
<div><strong class="count-up" data-count-target="2.5" data-count-decimals="1" data-count-suffix="k+">0k+</strong><span>Graduates</span></div>
</div>
<div class="hero-stat-pill">
<i class="fa-solid fa-chalkboard-user"></i>
<div><strong class="count-up" data-count-target="12" data-count-suffix="+">0+</strong><span>Expert Lecturers</span></div>
</div>
<div class="hero-stat-pill">
<i class="fa-solid fa-briefcase"></i>
<div><strong class="count-up" data-count-target="95" data-count-suffix="%">0%</strong><span>Placement Rate</span></div>
</div>
<div class="hero-stat-pill">
<i class="fa-solid fa-award"></i>
<div><strong class="count-up" data-count-target="15" data-count-suffix="+">0+</strong><span>Yrs Excellence</span></div>
</div>
</div>
</div>
</div>
</section>
@ -379,8 +831,8 @@ body {
<section class="section courses-section" aria-labelledby="courses-heading">
<div class="container">
<div class="text-center mb-5 animate-on-scroll fade-up-init">
<span class="text-uppercase fw-bold small d-block mb-2" style="color: #822424; letter-spacing: 0.1em;">Academic Programs</span>
<h2 id="courses-heading" class="display-5 mb-2" style="font-weight: normal; color:#2D355B;">Our Top Courses</h2>
<span class="section-eyebrow"><i class="fa-solid fa-graduation-cap"></i> Academic Programs</span>
<h2 id="courses-heading" class="display-5 mb-2" style="font-weight: 700; color:#2D355B;">Our Top Courses</h2>
<p class="text-muted fs-5">Explore our professional, industry-recognized automotive engineering curriculums.</p>
</div>
@ -431,7 +883,7 @@ body {
<div class="card course-card w-100 d-flex flex-column">
<a href="/courses" style="text-decoration:none;">
<div class="course-image-wrapper">
<span class="badge-floating">{{ $course['badge'] }}</span>
<span class="badge-floating"><i class="fa-solid fa-bolt"></i> {{ $course['badge'] }}</span>
<img src="{{ $course['image'] }}" alt="{{ $course['title'] }}" loading="lazy">
</div>
@ -450,12 +902,16 @@ body {
<div class="course-footer">
<div class="course-meta-row">
<span class="rating-star">
<i class="fas fa-star me-1"></i>{{ $course['rating'] }}
<span class="star-rating" style="--rating: {{ $course['rating'] }};">
<span class="star-rating-bg">★★★★★</span>
<span class="star-rating-fill">★★★★★</span>
</span>
{{ $course['rating'] }}
<span class="rating-count">({{ $course['students'] }})</span>
</span>
<span class="small fw-bold" style="color: #2ecc71;"><i class="fa-solid fa-circle-check me-1"></i>Active</span>
<span class="small fw-bold status-chip" style="color: #2ecc71;"><i class="fa-solid fa-circle-check"></i>Active</span>
</div>
<a href="/courses" class="read-btn">View Details</a>
<a href="/courses" class="read-btn">View Details <i class="fa-solid fa-arrow-right read-btn-arrow"></i></a>
</div>
</div>
</a>
@ -482,6 +938,7 @@ body {
<div class="container why-content-wrapper position-relative" style="z-index: 2;">
<div class="text-center mb-5 animate-on-scroll fade-up-init">
<span class="section-eyebrow" style="background: rgba(255,255,255,0.12); color: #FFE618;"><i class="fa-solid fa-star"></i> Our Advantage</span>
<h2 id="why-us-heading" class="display-5 text-white mb-0 fw-bold" style="letter-spacing: -0.02em;">Why Choose Us?</h2>
</div>
@ -520,11 +977,31 @@ body {
</section>
{{-- ===================== CALL TO ACTION ===================== --}}
<section class="section py-5 text-center animate-on-scroll zoom-in-init">
<section class="section py-5 animate-on-scroll zoom-in-init">
<div class="container">
<h2 class="display-6 mb-3">Join the Future of Automotive Engineering</h2>
<p class="text-muted mb-4 max-width-600 mx-auto">Shape your technical career through modern innovation, practical mastery, and expert guidance.</p>
<a href="{{ Route::has('apply') ? route('apply') : '#' }}" class="btn btn-theme" style="background: #822424;">Apply Now</a>
<div class="cta-card text-center">
<div class="cta-glow cta-glow-1" aria-hidden="true"></div>
<div class="cta-glow cta-glow-2" aria-hidden="true"></div>
<span class="cta-eyebrow"><i class="fa-solid fa-graduation-cap"></i> Enrollment Open for 2026</span>
<h2 class="display-6 mb-3">Join the Future of Automotive Engineering</h2>
<p class="mb-4 max-width-600 mx-auto">Shape your technical career through modern innovation, practical mastery, and expert guidance.</p>
<div class="cta-actions">
<a href="{{ Route::has('apply') ? route('apply') : '#' }}" class="btn btn-theme" style="background: #822424; border: 2px solid #FFF;">
<i class="fa-solid fa-user-plus me-2"></i>Apply Now
</a>
<a href="/courses" class="btn btn-outline-theme">
<i class="fa-solid fa-book-open me-2"></i>Explore Courses
</a>
</div>
<div class="cta-trust">
<span class="cta-trust-item"><i class="fa-solid fa-circle-check"></i> Accredited Programs</span>
<span class="cta-trust-item"><i class="fa-solid fa-circle-check"></i> Flexible Learning</span>
<span class="cta-trust-item"><i class="fa-solid fa-circle-check"></i> Career Support</span>
</div>
</div>
</div>
</section>
@ -534,11 +1011,13 @@ body {
<div class="modal-dialog modal-dialog-centered modal-lg modal-dialog-scrollable">
<div class="modal-content border-0 shadow">
<div class="modal-header custom-modal-header text-white">
<div class="modal-header custom-modal-header">
<h5 class="modal-title fw-bold fs-6 fs-md-5" id="courseFinderModalLabel">
<i class="fa-solid fa-compass me-2"></i>Find Your Course
</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="modal-close-btn" data-bs-dismiss="modal" aria-label="Close">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="modal-body p-3 p-md-4">
@ -650,6 +1129,123 @@ body {
<script>
document.addEventListener('DOMContentLoaded', function () {
// 0. Hero Background Slideshow
const heroSlides = document.querySelectorAll('.hero-slide');
const heroDots = document.querySelectorAll('.hero-dot');
if (heroSlides.length > 1) {
let activeSlide = 0;
let slideTimer;
const goToSlide = (index) => {
heroSlides[activeSlide].classList.remove('active');
heroDots[activeSlide]?.classList.remove('active');
activeSlide = index;
heroSlides[activeSlide].classList.add('active');
heroDots[activeSlide]?.classList.add('active');
};
const startSlideTimer = () => {
clearInterval(slideTimer);
slideTimer = setInterval(() => {
goToSlide((activeSlide + 1) % heroSlides.length);
}, 5500);
};
heroDots.forEach(dot => {
dot.addEventListener('click', () => {
goToSlide(parseInt(dot.dataset.slideIndex, 10));
startSlideTimer();
});
});
startSlideTimer();
}
// 0b. Stat Counters (count up when scrolled into view)
const counters = document.querySelectorAll('.count-up');
if (counters.length) {
const animateCounter = (el) => {
const target = parseFloat(el.dataset.countTarget);
const decimals = parseInt(el.dataset.countDecimals || '0', 10);
const suffix = el.dataset.countSuffix || '';
const duration = 1600;
const startTime = performance.now();
const tick = (now) => {
const progress = Math.min((now - startTime) / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
const value = target * eased;
el.textContent = value.toFixed(decimals) + suffix;
if (progress < 1) {
requestAnimationFrame(tick);
} else {
el.textContent = target.toFixed(decimals) + suffix;
}
};
requestAnimationFrame(tick);
};
const counterObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
animateCounter(entry.target);
counterObserver.unobserve(entry.target);
}
});
}, { threshold: 0.4 });
counters.forEach(el => counterObserver.observe(el));
}
// 0c. Course Card 3D Tilt + Image Parallax
const canHover = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
if (canHover) {
document.querySelectorAll('.course-card').forEach(card => {
const img = card.querySelector('.course-image-wrapper img');
card.addEventListener('mouseenter', () => {
card.style.transition = 'box-shadow 0.4s ease, border-color 0.4s ease';
if (img) img.style.transition = 'none';
});
card.addEventListener('mousemove', (e) => {
const rect = card.getBoundingClientRect();
const relX = (e.clientX - rect.left) / rect.width;
const relY = (e.clientY - rect.top) / rect.height;
const rotateY = (relX - 0.5) * 12;
const rotateX = (0.5 - relY) * 12;
card.style.transform = `translateY(-8px) scale(1.015) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
if (img) {
img.style.transform = `scale(1.14) translate(${(relX - 0.5) * -14}px, ${(relY - 0.5) * -14}px)`;
}
});
card.addEventListener('mouseleave', () => {
card.style.transition = 'transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease';
card.style.transform = '';
if (img) {
img.style.transition = 'transform 0.6s cubic-bezier(0.16, 1, 0.3, 1)';
img.style.transform = '';
}
});
});
}
// 0d. Animated Star Rating Fill
const starRatings = document.querySelectorAll('.star-rating');
if (starRatings.length) {
const starObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('filled');
starObserver.unobserve(entry.target);
}
});
}, { threshold: 0.4 });
starRatings.forEach(el => starObserver.observe(el));
}
// 1. Scroll Animations
const animatedElements = document.querySelectorAll('.animate-on-scroll');
const observer = new IntersectionObserver((entries) => {