fix: mobile

This commit is contained in:
dhanush.s 2025-09-27 02:48:56 +05:30
parent 94315ae34d
commit 6b8f7e616b
3 changed files with 627 additions and 536 deletions

View File

@ -161,10 +161,8 @@
<header class="navbar"> <header class="navbar">
<div class="logo">Kodepilot</div> <div class="logo">Kodepilot</div>
<input type="text" class="search" placeholder="Search Opportunities"> <input type="text" class="search" placeholder="Search Opportunities">
<nav>
<a href="/login">Log in</a>
</nav>
<div class="buttons"> <div class="buttons">
<a href="/login">Log in</a>
<button class="business" onclick="getInTouch()">Get in touch</button> <button class="business" onclick="getInTouch()">Get in touch</button>
<button class="login" onclick="goToApplay()">Apply</button> <button class="login" onclick="goToApplay()">Apply</button>
</div> </div>
@ -178,11 +176,56 @@
by by
your your
dream company.</p> dream company.</p>
<button class="button_blue_box"><img <button class="button_blue_box">
src="https://d8it4huxumps7.cloudfront.net/uploads/images/655edc8c1fab9_diamond_1.png?d=82x84" <img src="https://d8it4huxumps7.cloudfront.net/uploads/images/655edc8c1fab9_diamond_1.png?d=82x84"
width="41" height="42" alt="diamond" loading="lazy"><span><span width="41" height="42" alt="diamond" loading="lazy">
class="nameContainer">Aditya</span><strong> Just Went <span>
Kodepilot!</strong></span></button> <span class="nameContainer">Aditya</span>
<strong class="descContainer"> Just Went Kodepilot!</strong>
</span>
</button>
<style>
.nameContainer,
.descContainer {
transition: opacity 0.5s;
}
.fade-out {
opacity: 0;
}
.fade-in {
opacity: 1;
}
</style>
<script>
const data = [
{ name: "Aditya", text: "Just Went Kodepilot!" },
{ name: "Priya", text: "won a Hackathon!" },
{ name: "Rahul", text: "earned a Scholarship!" },
{ name: "Sneha", text: "joined a Festival!" }
];
let index1 = 0;
const nameEl1 = document.querySelector(".nameContainer");
const descEl1 = document.querySelector(".descContainer");
setInterval(() => {
nameEl1.classList.add("fade-out");
descEl1.classList.add("fade-out");
setTimeout(() => {
index1 = (index1 + 1) % data.length;
nameEl1.textContent = data[index1].name;
descEl1.textContent = " " + data[index1].text;
nameEl1.classList.remove("fade-out");
descEl1.classList.remove("fade-out");
nameEl1.classList.add("fade-in");
descEl1.classList.add("fade-in");
setTimeout(() => {
nameEl1.classList.remove("fade-in");
descEl1.classList.remove("fade-in");
}, 500);
}, 500);
}, 2000);
</script>
</div> </div>
<div class="cards"> <div class="cards">
<div class="card green">Internships<br><small>Gain Practical Experience</small></div> <div class="card green">Internships<br><small>Gain Practical Experience</small></div>
@ -475,7 +518,8 @@
" "
</p> </p>
<p class="slide-text"> <p class="slide-text">
"The Kodepilot curriculum is laser-focused on job placement. I mastered the required skills and secured my position at GBL with confidence." "The Kodepilot curriculum is laser-focused on job placement. I mastered the required
skills and secured my position at GBL with confidence."
</p> </p>
<div class="slide-logo-box"> <div class="slide-logo-box">
<div class="profile-box"> <div class="profile-box">
@ -496,7 +540,8 @@
" "
</p> </p>
<p class="slide-text"> <p class="slide-text">
"After taking the QA and DevOps courses, Kodepilot made me ready for the global stage. I was immediately placed with a top-tier company: Accenture." "After taking the QA and DevOps courses, Kodepilot made me ready for the global stage. I
was immediately placed with a top-tier company: Accenture."
</p> </p>
<div class="slide-logo-box"> <div class="slide-logo-box">
<div class="profile-box"> <div class="profile-box">
@ -516,7 +561,8 @@
" "
</p> </p>
<p class="slide-text"> <p class="slide-text">
"Kodepilot's training in AWS and DevOps was the key to my career breakthrough. I went from learning the skills to successfully landing a role at Infosys." "Kodepilot's training in AWS and DevOps was the key to my career breakthrough. I went
from learning the skills to successfully landing a role at Infosys."
</p> </p>
<div class="slide-logo-box"> <div class="slide-logo-box">
<div class="profile-box"> <div class="profile-box">
@ -536,77 +582,79 @@
<section> <section>
<!-- <div class="practice-cards-container"> --> <!-- <div class="practice-cards-container"> -->
<div class="practice-container"> <div class="practice-container">
<h1 class="practice-title">Practice Coding & Ace Hiring Assessments</h1> <div class="practice-container-box">
<p class="practice-subtitle">Level up your coding skills by practicing the hiring assessments of your <div class="practice-container-text-box">
dream companies & ace your placement game!</p> <h1 class="practice-title">Practice Coding & Ace Hiring Assessments</h1>
<p class="practice-subtitle">Level up your coding skills by practicing the hiring assessments of
<div class="practice-cards-wrapper"> your
<!-- Coding Practice Card --> dream companies & ace your placement game!</p>
<div class="practice-card active">
<div class="practice-card-content">
<div>
<div class="practice-card-icon">💻</div>
<h3>Coding Practice</h3>
<p>Level up your coding skills by practicing the hiring Questions.</p>
<div class="practice-footer-text">400+ Questions</div>
</div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div>
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_1.png" alt="Coding Practice">
</div>
</div> </div>
<div class="practice-cards-wrapper">
<!-- Interview Preparation Card --> <div class="practice-card active">
<div class="practice-card"> <div class="practice-card-content">
<div class="practice-card-content"> <div>
<div> <div class="practice-card-icon">💻</div>
<div class="practice-card-icon">📋</div> <h3>Coding Practice</h3>
<h3>Interview Preparation</h3> <p>Level up your coding skills by practicing the hiring Questions.</p>
<p>Crack Top companies in just 5 days with unbelivable learning</p> <div class="practice-footer-text">400+ Questions</div>
<div class="practice-footer-text">20+ Companies</div> </div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div> </div>
<a href="#" class="practice-cta-btn">Start Now ➤</a> <div class="practice-card-svg">
</div> <img src="assets/images/codinghiringassesments/nope_1.png" alt="Coding Practice">
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_2.png" alt="Coding Practice">
</div>
</div>
<!-- Projects Card -->
<div class="practice-card">
<div class="practice-card-content">
<div>
<div class="practice-card-icon">📂</div>
<h3>Projects</h3>
<p>Projects epitomize perfect synergy for success.</p>
<div class="practice-footer-text">15+ Projects</div>
</div> </div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div> </div>
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_3.webp" alt="Coding Practice">
</div>
</div>
<!-- Skill Based Assessments Card --> <!-- Interview Preparation Card -->
<div class="practice-card"> <div class="practice-card">
<div class="practice-card-content"> <div class="practice-card-content">
<div> <div>
<div class="practice-card-icon">📝</div> <div class="practice-card-icon">📋</div>
<h3>Skill Based Assessments</h3> <h3>Interview Preparation</h3>
<p>Assess your skills and get ahead of the curve.</p> <p>Crack Top companies in just 5 days with unbelivable learning</p>
<div class="practice-footer-text">2000+ Questions</div> <div class="practice-footer-text">20+ Companies</div>
</div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div>
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_2.png" alt="Coding Practice">
</div> </div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div> </div>
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_4.webp" alt="Coding Practice"> <!-- Projects Card -->
<div class="practice-card">
<div class="practice-card-content">
<div>
<div class="practice-card-icon">📂</div>
<h3>Projects</h3>
<p>Projects epitomize perfect synergy for success.</p>
<div class="practice-footer-text">15+ Projects</div>
</div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div>
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_3.webp" alt="Coding Practice">
</div>
</div>
<!-- Skill Based Assessments Card -->
<div class="practice-card">
<div class="practice-card-content">
<div>
<div class="practice-card-icon">📝</div>
<h3>Skill Based Assessments</h3>
<p>Assess your skills and get ahead of the curve.</p>
<div class="practice-footer-text">2000+ Questions</div>
</div>
<a href="#" class="practice-cta-btn">Start Now ➤</a>
</div>
<div class="practice-card-svg">
<img src="assets/images/codinghiringassesments/nope_4.webp" alt="Coding Practice">
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- </div> -->
</section> </section>
@ -619,7 +667,8 @@
</div> </div>
<div class="card-easy-right"> <div class="card-easy-right">
<h2>The Future of Your Career Starts Now. Learn, Grow, Achieve</h2> <h2>The Future of Your Career Starts Now. Learn, Grow, Achieve</h2>
<p>Stop waiting for opportunity—create it. Dive into our extensive library to level up your expertise and unlock your next big career move.</p> <p>Stop waiting for opportunity—create it. Dive into our extensive library to level up your
expertise and unlock your next big career move.</p>
<div class="features"> <div class="features">
<div class="feature"><span></span>50+ Courses</div> <div class="feature"><span></span>50+ Courses</div>
<div class="feature"><span></span>Certificate</div> <div class="feature"><span></span>Certificate</div>
@ -676,8 +725,8 @@
<footer class="footer"> <footer class="footer">
<div class="footer-container"> <div class="footer-container">
<div class="footer-section company-section"> <div class="footer-section company-section">
<div class="logo" style="text-align: left; margin-left: 0; padding-left: 0;">Kodepilot</div> <div class="logo" style="text-align: left; margin-left: 0; padding-left: 0;">Kodepilot</div>
<p class="tagline">Built with <span class="heart"></span> in India for the world</p> <p class="tagline">Built with <span class="heart"></span> in India for the world</p>
<div class="contact-info"> <div class="contact-info">
<h4>Stay Connected</h4> <h4>Stay Connected</h4>
@ -694,14 +743,14 @@
</div> </div>
</div> </div>
<div > <div>
<strong style="color: white; font-size: 14px; line-height: 30px;">Support Inquiries</strong> <strong style="color: white; font-size: 14px; line-height: 30px;">Support Inquiries</strong>
<div style="margin-bottom: 20px; line-height: 23px; margin-left: -27px;"> <div style="margin-bottom: 20px; line-height: 23px; margin-left: -27px;">
<div class="contact-item"> <div class="contact-item">
<i class="fas fa-envelope"></i> <i class="fas fa-envelope"></i>
support@kodepilot.com support@kodepilot.com
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -772,7 +821,7 @@
<li><a href="#">Mentorship & Alumni</a></li> <li><a href="#">Mentorship & Alumni</a></li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="footer-bottom"> <div class="footer-bottom">
<div style="max-width: 1200px; margin: 0 auto; padding: 0 20px;"> <div style="max-width: 1200px; margin: 0 auto; padding: 0 20px;">

863
main.css
View File

@ -201,6 +201,7 @@
.users_box { .users_box {
max-width: var(--course-max-width); max-width: var(--course-max-width);
max-width: 90%;
} }
.know-cards { .know-cards {
@ -293,6 +294,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: start; text-align: start;
max-width: 100%;
} }
.mnc-box { .mnc-box {
@ -430,9 +432,7 @@
min-height: 100px; min-height: 100px;
padding: 15px 8px; padding: 15px 8px;
} }
}
@media (max-width: 768px) {
.our-numbers { .our-numbers {
padding: 40px 20px; padding: 40px 20px;
} }
@ -493,7 +493,9 @@
} }
.container { .container {
max-width: 1152px; max-width: var(--course-max-width);
;
width: 1152px;
margin: 0 auto; margin: 0 auto;
} }
@ -528,24 +530,17 @@
.cards-grid { .cards-grid {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: repeat(5, 1fr);
gap: 24px; gap: 24px;
} flex-wrap: wrap;
justify-content: center;
@media (min-width: 768px) { align-items: center;
.cards-grid { min-width: 100px;
grid-template-columns: repeat(3, 1fr);
}
}
@media (min-width: 1024px) {
.cards-grid {
grid-template-columns: repeat(5, 1fr);
}
} }
.card-add { .card-add {
border-radius: 24px; border-radius: 24px;
max-width: 130px;
padding: 24px; padding: 24px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@ -780,7 +775,6 @@
@media (max-width: 768px) { @media (max-width: 768px) {
.slide1r-container { .slide1r-container {
margin: 15px;
padding: 20px; padding: 20px;
} }
@ -820,13 +814,25 @@
.image-overlay p { .image-overlay p {
font-size: 12px; font-size: 12px;
} }
.practice-container {
display: none;
}
.course-section {
max-width: 90%;
}
.corces {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
width: 90%;
}
} }
@media (max-width: 480px) { @media (max-width: 480px) {
.slide1r-container {
padding: 15px;
}
.slide1-box { .slide1-box {
gap: 12px; gap: 12px;
padding: 5px; padding: 5px;
@ -881,11 +887,11 @@
} }
.footer-section ul { .footer-section ul {
list-style: none; list-style: none;
padding-left: 0; padding-left: 0;
margin-left: 0; margin-left: 0;
} }
.footer-section ul li { .footer-section ul li {
margin-bottom: 12px; margin-bottom: 12px;
@ -1410,22 +1416,6 @@
background-color: #1d4fa0; background-color: #1d4fa0;
} }
@media (max-width: 900px) {
.card-easy {
flex-direction: column;
width: 90%;
}
.card-easy-right {
padding: 80px 50px;
}
.card-easy-left img {
width: 90%;
max-height: 100%;
}
}
.corces-s { .corces-s {
margin: 40px 0; margin: 40px 0;
} }
@ -1541,440 +1531,475 @@
/*----------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------*/
/* Practice Cards Component CSS - Unique class names to prevent conflicts */ /* Practice Cards Component CSS - Unique class names to prevent conflicts */
.practice-cards-container * {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', system-ui, sans-serif;
}
.practice-cards-container {
background-color: #ffffff;
color: #1f2937;
padding: 40px 20px;
display: flex;
flex-direction: column;
align-items: flex-start;
}
.practice-container {
max-width: 1200px;
width: 100%;
margin: 0 auto;
padding: 0 20px;
}
.practice-container-box {
max-width: var(--course-max-width);
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.practice-container-text-box {
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
padding: 0;
left: 0;
}
/* Practice Cards Component CSS - Unique class names to prevent conflicts */ .practice-title {
/* Practice Cards Component CSS - Unique class names to prevent conflicts */ font-size: 32px;
.practice-cards-container * { font-weight: 700;
margin: 0; margin-bottom: 12px;
padding: 0; color: #111827;
box-sizing: border-box; text-align: left;
font-family: 'Segoe UI', system-ui, sans-serif; width: 100%;
} }
.practice-cards-container { .practice-subtitle {
background-color: #ffffff; font-size: 18px;
color: #1f2937; color: #6b7280;
padding: 40px 20px; max-width: 700px;
display: flex; line-height: 1.5;
flex-direction: column; text-align: left;
align-items: flex-start; width: 100%;
} }
.practice-container { .practice-cards-wrapper {
max-width: 1200px; margin: 30px 0;
width: 100%; display: flex;
margin: 0 auto; height: 380px;
padding: 0 20px; border-radius: 12px;
} overflow: hidden;
position: relative;
gap: 1px;
background-color: #d1d5db;
padding: 1px;
width: 100%;
}
.practice-title { .practice-card {
font-size: 32px; flex: 1;
font-weight: 700; display: flex;
margin-bottom: 12px; transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
color: #111827; cursor: pointer;
text-align: left; position: relative;
width: 100%; overflow: hidden;
} transform-origin: center;
background-color: white;
border-radius: 0;
min-width: 80px;
}
.practice-subtitle { .practice-card:first-child {
font-size: 18px; border-radius: 11px 0 0 11px;
color: #6b7280; }
max-width: 700px;
line-height: 1.5;
text-align: left;
width: 100%;
}
.practice-cards-wrapper { .practice-card:last-child {
margin: 30px 0; border-radius: 0 11px 11px 0;
display: flex; }
height: 380px;
border-radius: 12px;
overflow: hidden;
position: relative;
gap: 1px;
background-color: #d1d5db;
padding: 1px;
width: 100%;
}
.practice-card { .practice-card-content {
flex: 1; flex: 1;
display: flex; padding: 24px;
transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); display: flex;
cursor: pointer; flex-direction: column;
position: relative; justify-content: space-between;
overflow: hidden; transition: all 0.5s ease;
transform-origin: center; min-width: 280px;
background-color: white; z-index: 2;
border-radius: 0; position: relative;
min-width: 80px; }
}
.practice-card:first-child { .practice-card {
border-radius: 11px 0 0 11px; flex: 1;
} transform: scale(1);
}
.practice-card:last-child { .practice-card .practice-card-svg {
border-radius: 0 11px 11px 0; width: 0;
} opacity: 0;
}
.practice-card-content { .practice-card .practice-cta-btn {
flex: 1; opacity: 0;
padding: 24px; transform: translateY(15px);
display: flex; }
flex-direction: column;
justify-content: space-between;
transition: all 0.5s ease;
min-width: 280px;
z-index: 2;
position: relative;
}
/* Default state - first card expanded */ .practice-cards-wrapper:hover .practice-card {
.practice-card:first-child { flex: 1;
flex: 2.5; transform: scale(0.98);
z-index: 10; }
}
.practice-card:not(:first-child) { .practice-cards-wrapper:hover .practice-card:hover {
flex: 1; flex: 2.5;
} transform: translateY(-6px) scale(1.01);
z-index: 10;
}
.practice-card .practice-card-svg { .practice-card:nth-child(1):hover {
width: 0; background-color: #89CFF0;
opacity: 0; }
}
.practice-card .practice-cta-btn { .practice-card:nth-child(2):hover {
opacity: 0; background-color: #FEB4CF;
transform: translateY(15px); }
}
/* Show SVG and CTA for first card by default */ .practice-card:nth-child(3):hover {
.practice-card:first-child .practice-card-svg { background-color: #DFC5FE;
width: 35%; }
opacity: 1;
}
.practice-card:first-child .practice-cta-btn { .practice-card:nth-child(4):hover {
opacity: 1; background-color: #FFE186;
transform: translateY(0); }
}
.practice-card:first-child .practice-card-icon { .practice-card-svg {
transform: scale(1.05) rotate(3deg); width: 0;
} height: 10%;
bottom: 0px;
display: block;
align-items: center;
justify-content: center;
transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0;
padding: 20px;
background: transparent;
flex-shrink: 0;
}
.practice-card:first-child h3 {
transform: translateY(-2px);
}
.practice-card:first-child p, .practice-cards-wrapper:hover .practice-card:hover .practice-card-svg {
.practice-card:first-child .practice-meta-info, width: 35%;
.practice-card:first-child .practice-footer-text { opacity: 1;
transform: translateY(-1px); }
}
/* Hover state - expand hovered card, shrink others */ .practice-card-icon {
.practice-cards-wrapper .practice-card { width: 48px;
transform: scale(1); height: 48px;
} border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
margin-bottom: 16px;
transition: transform 0.5s ease;
}
.practice-cards-wrapper .practice-card:hover { .practice-card:nth-child(1) .practice-card-icon {
flex: 2.5; background-color: #1268f3;
z-index: 10; color: white;
} }
.practice-cards-wrapper .practice-card:not(:hover) { .practice-card:nth-child(2) .practice-card-icon {
flex: 1; background-color: #ef4444;
} color: white;
}
/* Color changes for hover states */ .practice-card:nth-child(3) .practice-card-icon {
.practice-card:nth-child(1):hover { background-color: #8b5cf6;
background-color: #89CFF0; color: white;
} }
.practice-card:nth-child(2):hover { .practice-card:nth-child(4) .practice-card-icon {
background-color: #FEB4CF; background-color: #f59e0b;
} color: white;
}
.practice-card:nth-child(3):hover { /* Icon animation on hover */
background-color: #DFC5FE; .practice-cards-wrapper:hover .practice-card:hover .practice-card-icon {
} transform: scale(1.05) rotate(3deg);
}
.practice-card:nth-child(4):hover { .practice-card h3 {
background-color: #FFE186; font-size: 20px;
} font-weight: 600;
margin-bottom: 12px;
color: #111827;
transition: transform 0.5s ease;
}
/* SVG Container - UPDATED FOR IMAGES */ .practice-card p {
.practice-card-svg { font-size: 15px;
width: 0; color: #6b7280;
height: 100%; line-height: 1.5;
display: flex; margin-bottom: 16px;
align-items: center; transition: transform 0.5s ease;
justify-content: center; }
transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0;
padding: 20px;
background: transparent;
flex-shrink: 0;
overflow: hidden; /* Added to contain the image */
}
/* Image styling - NEW RULES */ .practice-meta-info {
.practice-card-svg img { display: flex;
width: 500%; align-items: center;
height:1200%; margin-bottom: 16px;
object-fit: contain; /* This will scale the image properly */ font-size: 14px;
max-width: 200%; color: #4b5563;
max-height: 200%; transition: transform 0.5s ease;
border-radius: 8px; }
}
/* Show SVG only on hovered card and first card by default */ .practice-meta-logo {
.practice-card:hover .practice-card-svg { width: 24px;
width: 35%; height: 24px;
opacity: 1; background-color: #3b82f6;
} border-radius: 4px;
margin-right: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 12px;
font-weight: bold;
}
.practice-card-icon { .practice-footer-text {
width: 48px; font-size: 14px;
height: 48px; font-weight: 600;
border-radius: 10px; color: #374151;
display: flex; margin-top: auto;
align-items: center; transition: transform 0.5s ease;
justify-content: center; }
font-size: 24px;
margin-bottom: 16px;
transition: transform 0.5s ease;
}
.practice-card:nth-child(1) .practice-card-icon { /* Text animation on hover */
background-color: #1268f3; .practice-cards-wrapper:hover .practice-card:hover h3 {
color: white; transform: translateY(-2px);
} }
.practice-card:nth-child(2) .practice-card-icon { .practice-cards-wrapper:hover .practice-card:hover p,
background-color: #ef4444; .practice-cards-wrapper:hover .practice-card:hover .practice-meta-info,
color: white; .practice-cards-wrapper:hover .practice-card:hover .practice-footer-text {
} transform: translateY(-1px);
}
.practice-card:nth-child(3) .practice-card-icon { .practice-cta-btn {
background-color: #8b5cf6; margin-top: 16px;
color: white; background-color: #111827;
} color: white;
padding: 10px 16px;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
width: fit-content;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0;
transform: translateY(15px);
position: relative;
overflow: hidden;
}
.practice-card:nth-child(4) .practice-card-icon { .practice-cta-btn::before {
background-color: #f59e0b; content: '';
color: white; 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.8s;
}
/* Icon animation on hover */ .practice-cta-btn:hover::before {
.practice-card:hover .practice-card-icon { left: 100%;
transform: scale(1.05) rotate(3deg); }
}
.practice-card h3 { .practice-cta-btn:hover {
font-size: 20px; background-color: #374151;
font-weight: 600; transform: translateY(-2px);
margin-bottom: 12px; }
color: #111827;
transition: transform 0.5s ease;
}
.practice-card p { /* Show CTA button only on hovered card */
font-size: 15px; .practice-cards-wrapper:hover .practice-card:hover .practice-cta-btn {
color: #6b7280; opacity: 1;
line-height: 1.5; transform: translateY(0);
margin-bottom: 16px; }
transition: transform 0.5s ease;
}
.practice-meta-info { /* Subtle overlay effect */
display: flex; .practice-card::after {
align-items: center; content: '';
margin-bottom: 16px; position: absolute;
font-size: 14px; top: 0;
color: #4b5563; left: 0;
transition: transform 0.5s ease; width: 100%;
} height: 100%;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
opacity: 0;
transition: opacity 0.6s ease;
pointer-events: none;
}
.practice-meta-logo { .practice-card:hover::after {
width: 24px; opacity: 1;
height: 24px; }
background-color: #3b82f6;
border-radius: 4px;
margin-right: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 12px;
font-weight: bold;
}
.practice-footer-text { /* REMOVED: Default expanded state for first card */
font-size: 14px; /* Now all cards start equal and only expand on hover */
font-weight: 600;
color: #374151;
margin-top: auto;
transition: transform 0.5s ease;
}
/* Text animation on hover */ /* Show SVG and CTA button only on hover */
.practice-card:hover h3 { .practice-cards-wrapper .practice-card .practice-card-svg {
transform: translateY(-2px); width: 0;
} opacity: 0;
}
.practice-card:hover p, .practice-cards-wrapper .practice-card .practice-cta-btn {
.practice-card:hover .practice-meta-info, opacity: 0;
.practice-card:hover .practice-footer-text { transform: translateY(15px);
transform: translateY(-1px); }
}
.practice-cta-btn { .practice-cards-wrapper:hover .practice-card:hover .practice-card-svg {
margin-top: 16px; width: 35%;
background-color: #111827; opacity: 1;
color: white; }
padding: 10px 16px;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
width: fit-content;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0;
transform: translateY(15px);
position: relative;
overflow: hidden;
}
.practice-cta-btn::before { .practice-cards-wrapper:hover .practice-card:hover .practice-cta-btn {
content: ''; opacity: 1;
position: absolute; transform: translateY(0);
top: 0; }
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.8s;
}
.practice-cta-btn:hover::before { /* Mobile responsiveness */
left: 100%; @media (max-width: 992px) {
} .practice-cards-container {
display: none;
}
}
.practice-cta-btn:hover { @media (max-width: 768px) {
background-color: #374151; .practice-container {
transform: translateY(-2px); display: none;
} }
/* Show CTA button only on hovered card and first card by default */ .mnc-box {
.practice-card:hover .practice-cta-btn { display: flex;
opacity: 1; align-items: center;
transform: translateY(0); max-width: 90%;
} padding: 20px;
}
/* Subtle overlay effect */ .slide1r-container {
.practice-card::after { padding: 20px;
content: ''; width: 90%;
position: absolute; }
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
opacity: 0;
transition: opacity 0.6s ease;
pointer-events: none;
}
.practice-card:hover::after { .card-add {
opacity: 1; height: auto;
} width: 120px;
}
/* Mobile responsiveness */ .container {
@media (max-width: 992px) { padding: 20px;
.practice-cards-container { width: 90%;
align-items: flex-start; }
padding: 30px 15px;
}
.practice-cards-wrapper {
flex-direction: column;
height: auto;
border-radius: 12px;
gap: 0;
}
.practice-card { .move-slider-container {
flex-direction: row; padding: 20px;
height: 120px; width: 90%;
border-radius: 0 !important; }
min-width: auto;
}
.practice-card:first-child { .move-slider-animation-box {
border-radius: 12px 12px 0 0 !important; margin-top: 393px;
height: 120px; margin-right: 0px;
flex: 1; }
}
.practice-card:last-child { .move-slider-box-static {
border-radius: 0 0 12px 12px !important; padding: 20px;
} min-width: 90%;
}
.practice-card:hover { .card-simple {
height: 300px; max-width: var(--course-max-width);
flex-direction: column; margin: 0px auto;
} display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.practice-card:hover .practice-card-svg { .crd {
width: 100%; width: 90%;
height: 120px; }
}
/* Mobile image styling */ .hero h1 {
.practice-card:hover .practice-card-svg img { font-size: 30px;
object-fit: cover; /* Better fit for mobile */ width: 103%;
} }
.practice-card-content { .hero p {
min-width: auto; font-size: 12px;
padding: 20px; width: 90%;
} }
}
@media (max-width: 768px) { .cards-grid {
.practice-cards-container { display: flex;
padding: 25px 10px; flex-wrap: wrap;
} justify-content: center;
align-items: center;
.practice-title { gap: 20px;
font-size: 28px; }
}
.practice-subtitle {
font-size: 16px;
}
}
@media (max-width: 480px) { .card-easy-right h2 {
.practice-cards-container { font-size: 1.3em;
padding: 20px 8px; margin: 0 0 0px 0;
} }
.practice-title { .features {
font-size: 24px; display: flex;
} flex-wrap: wrap;
gap: 20px;
.practice-subtitle { }
font-size: 14px;
} .feature {
} display: flex;
align-items: center;
font-size: 16px;
}
.card-easy {
flex-direction: column;
width: 90%;
}
.card-easy-right {
padding: 50px 50px;
}
.card-easy-left img {
width: 90%;
max-height: 100%;
}
.our-numbers {
margin: 0 auto 0 auto;
}
.corces-s {
margin: 0px 0;
}
}

93
main.js
View File

@ -1,5 +1,5 @@
function goToApplay() { function goToApplay() {
window.location.href = "/applay/"; window.location.href = "/apply/";
} }
function getInTouch() { function getInTouch() {
@ -422,56 +422,73 @@ function renderCourses(allCourses) {
} }
}); });
// If temp still has >= 4, push it
if (temp.courses.length >= 4) { if (temp.courses.length >= 4) {
mergedSections.push(temp); mergedSections.push(temp);
} }
// Render sections
mergedSections.forEach(sectionData => { mergedSections.forEach(sectionData => {
const section = document.createElement('div'); const section = document.createElement('div');
section.className = 'course-section'; section.className = 'course-section';
section.innerHTML = ` section.innerHTML = `
<h2 class="course-category-title">${sectionData.category}</h2> <h2 class="course-category-title">${sectionData.category}</h2>
<div class="course-slider-box"> <div class="course-slider-box">
<div class="course-slider"> <div class="course-slider">
<button class="prev-btn nav-button"></button> <button class="prev-btn nav-button"></button>
<div class="course-track"></div> <div class="course-track"></div>
<button class="next-btn nav-button"></button> <button class="next-btn nav-button"></button>
</div> </div>
</div> </div>
`; `;
const track = section.querySelector('.course-track'); const track = section.querySelector('.course-track');
const prevBtn = section.querySelector('.prev-btn');
const nextBtn = section.querySelector('.next-btn');
sectionData.courses.forEach(course => { sectionData.courses.forEach(course => {
const courseDiv = document.createElement('div'); const courseDiv = document.createElement('div');
courseDiv.className = 'course-card'; courseDiv.className = 'course-card';
courseDiv.innerHTML = ` courseDiv.innerHTML = `
<a href="${course.link}" target="_blank"> <a href="${course.link}" target="_blank">
<div class="course-image" style="background-image: url(${course.image});"></div> <div class="course-image" style="background-image: url(${course.image});"></div>
</a> </a>
<div class="course-content"> <div class="course-content">
<a href="${course.link}" class="course-name" target="_blank">${course.name}</a> <a href="${course.link}" class="course-name" target="_blank">${course.name}</a>
<div class="course-description">${course.description}</div> <div class="course-description">${course.description}</div>
</div> </div>
`; `;
track.appendChild(courseDiv); track.appendChild(courseDiv);
}); });
// Slider buttons // Button scrolling
const prevBtn = section.querySelector('.prev-btn'); const scrollAmount = 300;
const nextBtn = section.querySelector('.next-btn'); prevBtn.addEventListener('click', () => track.scrollBy({ left: -scrollAmount, behavior: 'smooth' }));
nextBtn.addEventListener('click', () => track.scrollBy({ left: scrollAmount, behavior: 'smooth' }));
prevBtn.addEventListener('click', () => { // Touch swipe
track.scrollBy({ left: -300, behavior: 'smooth' }); let startX = 0;
let isDragging = false;
track.addEventListener('touchstart', e => {
startX = e.touches[0].clientX;
isDragging = true;
}); });
nextBtn.addEventListener('click', () => {
track.scrollBy({ left: 300, behavior: 'smooth' }); track.addEventListener('touchmove', e => {
if (!isDragging) return;
const x = e.touches[0].clientX;
const walk = (startX - x) * 10;
track.scrollLeft += walk;
startX = x;
});
track.addEventListener('touchend', () => {
isDragging = false;
}); });
container.appendChild(section); container.appendChild(section);
}); });
} }
@ -493,7 +510,7 @@ function stepScroll() {
track.appendChild(first); track.appendChild(first);
track.style.transition = 'none'; track.style.transition = 'none';
track.style.transform = 'translateX(0)'; track.style.transform = 'translateX(0)';
void track.offsetWidth; // force reflow void track.offsetWidth;
track.style.transition = 'transform 0.5s ease'; track.style.transition = 'transform 0.5s ease';
track.removeEventListener('transitionend', handler); track.removeEventListener('transitionend', handler);
}); });
@ -505,42 +522,42 @@ setInterval(stepScroll, 3000);
/*--------------------------------------------------------*/ /*--------------------------------------------------------*/
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function () {
const cards = document.querySelectorAll('.practice-card'); const cards = document.querySelectorAll('.practice-card');
let activeCard = document.querySelector('.practice-card.active'); let activeCard = document.querySelector('.practice-card.active');
let lastActiveCard = activeCard; let lastActiveCard = activeCard;
// Function to set active card // Function to set active card
function setActiveCard(card) { function setActiveCard(card) {
// Remove active class from all cards // Remove active class from all cards
cards.forEach(c => { cards.forEach(c => {
c.classList.remove('active'); c.classList.remove('active');
}); });
// Add active class to the specified card // Add active class to the specified card
card.classList.add('active'); card.classList.add('active');
// Update last active card // Update last active card
lastActiveCard = card; lastActiveCard = card;
} }
// Set first card as active by default if none is active // Set first card as active by default if none is active
if (!activeCard && cards.length > 0) { if (!activeCard && cards.length > 0) {
setActiveCard(cards[0]); setActiveCard(cards[0]);
} }
// Add click event listeners (better for mobile and accessibility) // Add click event listeners (better for mobile and accessibility)
cards.forEach(card => { cards.forEach(card => {
card.addEventListener('click', function() { card.addEventListener('click', function () {
setActiveCard(this); setActiveCard(this);
}); });
}); });
// Optional: Add hover effect for desktop (complementary to click) // Optional: Add hover effect for desktop (complementary to click)
cards.forEach(card => { cards.forEach(card => {
card.addEventListener('mouseenter', function() { card.addEventListener('mouseenter', function () {
// Only activate on hover if you want that behavior // Only activate on hover if you want that behavior
// setActiveCard(this); // setActiveCard(this);
}); });
}); });
}); });