Compare commits

..

No commits in common. "9739a5a04abe2a6996838fa5d103925d47d7fddd" and "e04089042dd140aac602812e6c3871462ebc8916" have entirely different histories.

3 changed files with 315 additions and 416 deletions

View File

@ -548,7 +548,6 @@
<div class="practice-card-icon">💻</div> <div class="practice-card-icon">💻</div>
<h3>Coding Practice</h3> <h3>Coding Practice</h3>
<p>Level up your coding skills by practicing the hiring Questions.</p> <p>Level up your coding skills by practicing the hiring Questions.</p>
<div class="practice-footer-text">400+ Questions</div>
</div> </div>
<a href="#" class="practice-cta-btn">Start Now ➤</a> <a href="#" class="practice-cta-btn">Start Now ➤</a>
</div> </div>
@ -563,7 +562,7 @@
<div> <div>
<div class="practice-card-icon">📋</div> <div class="practice-card-icon">📋</div>
<h3>Interview Preparation</h3> <h3>Interview Preparation</h3>
<p>Crack Top companies in just 5 days with unbelivable learning</p> <p>Crack Top companies in just 5 days.</p>
<div class="practice-footer-text">20+ Companies</div> <div class="practice-footer-text">20+ Companies</div>
</div> </div>
<a href="#" class="practice-cta-btn">Start Now ➤</a> <a href="#" class="practice-cta-btn">Start Now ➤</a>

679
main.css
View File

@ -1105,7 +1105,6 @@
align-items: center; align-items: center;
gap: 20px; gap: 20px;
margin-top: 76px; margin-top: 76px;
padding-bottom: 40px;
} }
.move-slider-box-static { .move-slider-box-static {
@ -1541,425 +1540,355 @@
/*----------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------*/
/* 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 Component CSS - Unique class names to prevent conflicts */ .practice-cards-container {
.practice-cards-container * { background-color: #ffffff;
margin: 0; color: #1f2937;
padding: 0; padding: 40px 20px;
box-sizing: border-box; display: flex;
font-family: 'Segoe UI', system-ui, sans-serif; flex-direction: column;
} align-items: center;
}
.practice-cards-container { .practice-container {
background-color: #ffffff; max-width: 1300px;
color: #1f2937; width: 100%;
padding: 40px 20px; }
display: flex;
flex-direction: column;
align-items: flex-start;
}
.practice-container { .practice-title {
max-width: 1200px; font-size: 32px;
width: 100%; font-weight: 700;
margin: 0 auto; margin-bottom: 12px;
padding: 0 20px; color: #111827;
} text-align: left;
}
.practice-title { .practice-subtitle {
font-size: 32px; font-size: 18px;
font-weight: 700; color: #6b7280;
margin-bottom: 12px; max-width: 700px;
color: #111827; /* margin: 0 auto 40px; */
text-align: left; line-height: 1.5;
width: 100%; text-align: left;
} }
.practice-subtitle { .practice-cards-wrapper {
font-size: 18px; margin: 30px 0;
color: #6b7280; display: flex;
max-width: 700px; height: 380px;
line-height: 1.5; border-radius: 12px;
text-align: left; overflow: hidden;
width: 100%; /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); */
} position: relative;
gap: 1px;
background-color: #d1d5db;
padding: 1px;
}
.practice-cards-wrapper { .practice-card {
margin: 30px 0; flex: 1;
display: flex; display: flex;
height: 380px; transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
border-radius: 12px; cursor: pointer;
overflow: hidden; position: relative;
position: relative; overflow: hidden;
gap: 1px; transform-origin: center;
background-color: #d1d5db; background-color: white;
padding: 1px; border-radius: 0;
width: 100%; }
}
.practice-card { .practice-card:first-child {
flex: 1; border-radius: 11px 0 0 11px;
display: flex; }
transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
cursor: pointer;
position: relative;
overflow: hidden;
transform-origin: center;
background-color: white;
border-radius: 0;
min-width: 80px;
}
.practice-card:first-child { .practice-card:last-child {
border-radius: 11px 0 0 11px; border-radius: 0 11px 11px 0;
} }
.practice-card:last-child { .practice-card-content {
border-radius: 0 11px 11px 0; flex: 1;
} padding: 24px;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: all 0.7s ease;
min-width: 0;
z-index: 2;
position: relative;
}
.practice-card-content { /* Color changes for active and hover states */
flex: 1; .practice-card.active {
padding: 24px; background-color: #c6e0f1;
display: flex; }
flex-direction: column;
justify-content: space-between;
transition: all 0.5s ease;
min-width: 280px;
z-index: 2;
position: relative;
}
/* Default state - all cards equal size */ .practice-card:nth-child(1):hover,
.practice-card { .practice-card:nth-child(1).active {
flex: 1; background-color: #89CFF0;
transform: scale(1); }
}
.practice-card .practice-card-svg { .practice-card:nth-child(2):hover,
width: 0; .practice-card:nth-child(2).active {
opacity: 0; background-color: #FEB4CF;
} }
.practice-card .practice-cta-btn { .practice-card:nth-child(3):hover,
opacity: 0; .practice-card:nth-child(3).active {
transform: translateY(15px); background-color: #DFC5FE;
} }
/* Hover state - expand hovered card, shrink others */ .practice-card:nth-child(4):hover,
.practice-cards-wrapper:hover .practice-card { .practice-card:nth-child(4).active {
flex: 1; background-color: #FFE186;
transform: scale(0.98); }
}
.practice-cards-wrapper:hover .practice-card:hover { /* SVG Container */
flex: 2.5; .practice-card-svg {
transform: translateY(-6px) scale(1.01); width: 0;
z-index: 10; height: 100%;
} display: flex;
align-items: center;
justify-content: center;
transition: all 1.3s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0;
padding: 20px;
background: transparent;
}
/* Color changes for hover states */ .practice-card-svg svg {
.practice-card:nth-child(1):hover { width: 100%;
background-color: #89CFF0; height: 100%;
} max-width: 180px;
max-height: 180px;
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}
.practice-card:nth-child(2):hover { .practice-card-icon {
background-color: #FEB4CF; width: 48px;
} height: 48px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
margin-bottom: 16px;
transition: transform 0.5s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.practice-card:nth-child(3):hover { .practice-card:nth-child(1) .practice-card-icon {
background-color: #DFC5FE; background-color: #1268f3;
} color: white;
}
.practice-card:nth-child(4):hover { .practice-card:nth-child(2) .practice-card-icon {
background-color: #FFE186; background-color: #ef4444;
} color: white;
}
/* SVG Container */ .practice-card:nth-child(3) .practice-card-icon {
.practice-card-svg { background-color: #8b5cf6;
width: 0; color: white;
height: 100%; }
display: flex;
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-svg svg { .practice-card:nth-child(4) .practice-card-icon {
width: 100%; background-color: #f59e0b;
height: 100%; color: white;
max-width: 150px; }
max-height: 150px;
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}
/* Show SVG only on hovered card */ .practice-card h3 {
.practice-cards-wrapper:hover .practice-card:hover .practice-card-svg { font-size: 20px;
width: 35%; font-weight: 600;
opacity: 1; margin-bottom: 12px;
} color: #111827;
transition: transform 0.5s ease;
}
.practice-card-icon { .practice-card p {
width: 48px; font-size: 15px;
height: 48px; color: #6b7280;
border-radius: 10px; line-height: 1.5;
display: flex; margin-bottom: 16px;
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 { .practice-meta-info {
background-color: #1268f3; display: flex;
color: white; align-items: center;
} margin-bottom: 16px;
font-size: 14px;
color: #4b5563;
transition: transform 0.5s ease;
}
.practice-card:nth-child(2) .practice-card-icon { .practice-meta-logo {
background-color: #ef4444; width: 24px;
color: white; 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-card:nth-child(3) .practice-card-icon { .practice-footer-text {
background-color: #8b5cf6; font-size: 14px;
color: white; font-weight: 600;
} color: #374151;
margin-top: auto;
transition: transform 0.5s ease;
}
.practice-card:nth-child(4) .practice-card-icon { .practice-cta-btn {
background-color: #f59e0b; 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;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* Icon animation on hover */ .practice-cta-btn::before {
.practice-cards-wrapper:hover .practice-card:hover .practice-card-icon { content: '';
transform: scale(1.05) rotate(3deg); 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;
}
.practice-card h3 { .practice-cta-btn:hover::before {
font-size: 20px; left: 100%;
font-weight: 600; }
margin-bottom: 12px;
color: #111827;
transition: transform 0.5s ease;
}
.practice-card p { .practice-cta-btn:hover {
font-size: 15px; background-color: #374151;
color: #6b7280; transform: translateY(-2px);
line-height: 1.5; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
margin-bottom: 16px; }
transition: transform 0.5s ease;
}
.practice-meta-info { /* Active card styles */
display: flex; .practice-card.active {
align-items: center; flex: 3.5;
margin-bottom: 16px; transform: translateY(-8px) scale(1.02);
font-size: 14px; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
color: #4b5563; z-index: 10;
transition: transform 0.5s ease; }
}
.practice-meta-logo { .practice-card.active .practice-card-svg {
width: 24px; width: 45%;
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-footer-text { .practice-card.active .practice-cta-btn {
font-size: 14px; opacity: 1;
font-weight: 600; transform: translateY(0);
color: #374151; }
margin-top: auto;
transition: transform 0.5s ease;
}
/* Text animation on hover */ .practice-card.active .practice-card-icon {
.practice-cards-wrapper:hover .practice-card:hover h3 { transform: scale(1.1) rotate(5deg);
transform: translateY(-2px); }
}
.practice-cards-wrapper:hover .practice-card:hover p, .practice-card.active h3 {
.practice-cards-wrapper:hover .practice-card:hover .practice-meta-info, transform: translateY(-3px);
.practice-cards-wrapper:hover .practice-card:hover .practice-footer-text { }
transform: translateY(-1px);
}
.practice-cta-btn { .practice-card.active p,
margin-top: 16px; .practice-card.active .practice-meta-info,
background-color: #111827; .practice-card.active .practice-footer-text {
color: white; transform: translateY(-2px);
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 { /* Hover effects for non-active cards */
content: ''; .practice-card:hover:not(.active) {
position: absolute; flex: 1.3;
top: 0; transform: translateY(-4px) scale(1.01);
left: -100%; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
width: 100%; z-index: 5;
height: 100%; }
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.8s;
}
.practice-cta-btn:hover::before { .practice-card:hover:not(.active) .practice-card-svg {
left: 100%; width: 25%;
} opacity: 0.8;
}
.practice-cta-btn:hover { /* Subtle overlay effect */
background-color: #374151; .practice-card::after {
transform: translateY(-2px); content: '';
} 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;
}
/* Show CTA button only on hovered card */ .practice-card.active::after,
.practice-cards-wrapper:hover .practice-card:hover .practice-cta-btn { .practice-card:hover::after {
opacity: 1; opacity: 1;
transform: translateY(0); }
}
/* Subtle overlay effect */ @media (max-width: 992px) {
.practice-card::after { .practice-cards-wrapper {
content: ''; flex-direction: column;
position: absolute; height: auto;
top: 0; border-radius: 12px;
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 { .practice-card {
opacity: 1; flex-direction: column;
} height: auto;
border-radius: 0 !important;
}
/* REMOVED: Default expanded state for first card */ .practice-card:first-child {
/* Now all cards start equal and only expand on hover */ border-radius: 12px 12px 0 0 !important;
}
/* Show SVG and CTA button only on hover */ .practice-card:last-child {
.practice-cards-wrapper .practice-card .practice-card-svg { border-radius: 0 0 12px 12px !important;
width: 0; }
opacity: 0;
}
.practice-cards-wrapper .practice-card .practice-cta-btn { .practice-card.active .practice-card-svg,
opacity: 0; .practice-card:hover .practice-card-svg {
transform: translateY(15px); width: 100%;
} height: 200px;
}
.practice-cards-wrapper:hover .practice-card:hover .practice-card-svg { .practice-card.active {
width: 35%; transform: translateY(-5px) scale(1.01);
opacity: 1; }
}
.practice-cards-wrapper:hover .practice-card:hover .practice-cta-btn { .practice-card:hover:not(.active) {
opacity: 1; transform: translateY(-3px) scale(1.005);
transform: translateY(0); }
} }
/* Mobile responsiveness */
@media (max-width: 992px) {
.practice-cards-container {
align-items: flex-start;
padding: 30px 15px;
}
.practice-cards-wrapper {
flex-direction: column;
height: auto;
border-radius: 12px;
gap: 0;
}
.practice-card {
flex-direction: row;
height: 120px;
border-radius: 0 !important;
min-width: auto;
}
.practice-card:first-child {
border-radius: 12px 12px 0 0 !important;
height: 120px;
flex: 1;
transform: none;
}
.practice-card:last-child {
border-radius: 0 0 12px 12px !important;
}
.practice-cards-wrapper:hover .practice-card:hover {
height: 300px;
flex-direction: column;
}
.practice-cards-wrapper:hover .practice-card:hover .practice-card-svg {
width: 100%;
height: 120px;
}
.practice-card-content {
min-width: auto;
padding: 20px;
}
}
@media (max-width: 768px) {
.practice-cards-container {
padding: 25px 10px;
}
.practice-title {
font-size: 28px;
}
.practice-subtitle {
font-size: 16px;
}
}
@media (max-width: 480px) {
.practice-cards-container {
padding: 20px 8px;
}
.practice-title {
font-size: 24px;
}
.practice-subtitle {
font-size: 14px;
}
}

49
main.js
View File

@ -502,45 +502,16 @@ function stepScroll() {
setInterval(stepScroll, 3000); setInterval(stepScroll, 3000);
document.querySelectorAll('.course-slider').forEach(slider => {
const track = slider.querySelector('.course-track');
const prev = slider.querySelector('.prev-btn');
const next = slider.querySelector('.next-btn');
/*--------------------------------------------------------*/ prev.addEventListener('click', () => {
track.scrollBy({ left: -300, behavior: 'smooth' });
});
document.addEventListener('DOMContentLoaded', function() { next.addEventListener('click', () => {
const cards = document.querySelectorAll('.practice-card'); track.scrollBy({ left: 300, behavior: 'smooth' });
let activeCard = document.querySelector('.practice-card.active');
let lastActiveCard = activeCard;
// Function to set active card
function setActiveCard(card) {
// Remove active class from all cards
cards.forEach(c => {
c.classList.remove('active');
});
// Add active class to the specified card
card.classList.add('active');
// Update last active card
lastActiveCard = card;
}
// Set first card as active by default if none is active
if (!activeCard && cards.length > 0) {
setActiveCard(cards[0]);
}
// Add click event listeners (better for mobile and accessibility)
cards.forEach(card => {
card.addEventListener('click', function() {
setActiveCard(this);
});
}); });
});
// Optional: Add hover effect for desktop (complementary to click)
cards.forEach(card => {
card.addEventListener('mouseenter', function() {
// Only activate on hover if you want that behavior
// setActiveCard(this);
});
});
});