/* =================================================================
   Homepage-Specific Stylesheet
   ================================================================= */

/* --- General Section & Layout --- */
.section { padding: 4rem 0; overflow-x: hidden; }
.section-title { text-align: center; margin-bottom: 3rem; font-size: clamp(2rem, 5vw, 2.5rem); font-weight: var(--font-weight-bold); color: var(--primary-dark); position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background-color: var(--secondary-color); border-radius: 2px; }
.button-container-center { display: flex; justify-content: center; margin-top: 2.5rem; }

/* --- Reveal-on-Scroll Animation --- */
.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* --- Hero Slider --- */
.hero-slider { position: relative; width: 100%; height: 65vh; max-height: 550px; min-height: 450px; overflow: hidden; background-color: var(--primary-dark); }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease-in-out; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.hero-slide.active { opacity: 1; }
.hero-slide::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.55); }
.hero-content { position: relative; z-index: 2; color: var(--white-color); text-align: center; max-width: 850px; }
.hero-content h1, .hero-content h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: var(--font-weight-bold); text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); color: var(--white-color); margin-bottom: 1rem; }
.hero-content p { font-size: clamp(1rem, 2.5vw, 1.2rem); margin-bottom: 2rem; color: rgba(255, 255, 255, 0.95); max-width: 650px; margin-left: auto; margin-right: auto; }
.slider-nav { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 3; }
.slider-dot { width: 12px; height: 12px; background-color: rgba(255, 255, 255, 0.6); border-radius: 50%; cursor: pointer; transition: background-color var(--transition-medium); }
.slider-dot.active { background-color: var(--white-color); }

/* --- Why Choose Us Section --- */
.why-choose-us-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card { background: var(--white-color); padding: 2.5rem 2rem; text-align: center; border-radius: var(--border-radius); box-shadow: var(--box-shadow); transition: transform var(--transition-medium), box-shadow var(--transition-medium); }
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--box-shadow-hover); }
.feature-icon { font-size: 3rem; color: var(--secondary-color); margin-bottom: 1.5rem; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary-color); }

/* --- Featured Courses (Cards) --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; } /* MODIFIED THIS LINE */
.card { display: flex; flex-direction: column; background-color: #fff; border: 1px solid #ddd; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--box-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--box-shadow-hover); }
.card-img-top { width: 100%; height: auto; object-fit: cover; }
.card-body { flex-grow: 1; padding: 1.5rem; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--primary-dark); }
.card-text { flex-grow: 1; color: var(--dark-gray); margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; min-height: 65px; }
.price-section { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--light-gray); }
.price-tag { font-weight: bold; white-space: nowrap; }
.sale-price { color: var(--danger-color); margin-right: 0.5rem; }
.original-price { text-decoration: line-through; color: #888; }
.card-footer { padding: 1rem 1.5rem; background-color: #f8f9fa; text-align: right; }
.card-footer .btn { width: 100%; }

/* --- Student Reviews Section --- */
#student-reviews-section { background: #f9f9f9; }
.reviews-slider { position: relative; overflow: hidden; }
.review-slide { display: none; opacity: 0; transition: opacity 0.6s ease-in-out; }
.review-slide.active { display: block; opacity: 1; }
.review-card { background-color: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1); max-width: 700px; margin: 0 auto; }
.review-header { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.review-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.review-info .review-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700; /* Use font-weight instead of a heading tag */
    color: var(--primary-dark);
}

.review-rating { margin-left: auto; color: #f8b400; }
.review-comment { font-style: italic; color: #444; border-left: 4px solid var(--secondary-color); padding-left: 1rem; margin-top: 1rem; }
#student-reviews-section .slider-nav { margin-top: 2rem; justify-content: center; display: flex; gap: 12px; }
#student-reviews-section .nav-dot { width: 12px; height: 12px; border-radius: 50%; background-color: #ccc; cursor: pointer; transition: background-color 0.3s; }
#student-reviews-section .nav-dot.active { background-color: var(--primary-color); }

/* --- Stats Section --- */
.stats-section { background-color: var(--light-gray); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.stat-item { background: var(--white-color); border-radius: var(--border-radius); padding: 2rem; display: flex; align-items: center; gap: 1.5rem; box-shadow: var(--box-shadow); border-left: 5px solid var(--secondary-color); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.stat-item:hover { transform: translateY(-8px); box-shadow: var(--box-shadow-hover); }
.stat-icon { font-size: 2.8rem; color: var(--secondary-color); }
.stat-info h3 { font-size: 2.8rem; font-weight: var(--font-weight-bold); color: var(--primary-dark); margin: 0 0 0.25rem 0; line-height: 1.1; }
.stat-info p { font-size: 1rem; color: var(--dark-gray); margin: 0; }

/* --- CTA Section --- */
.cta-section { background-color: #fdfdfd; text-align: center; }
.cta-content h2 { font-size: clamp(1.8rem, 4vw, 2.2rem); margin-bottom: 1rem; }
.cta-content p { max-width: 700px; margin: 0 auto 2rem; }
.cta-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }

/* --- Location Section (Redesigned) --- */
.location-section .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem; /* Increased gap for better spacing */
}

.location-section .col {
    flex: 1;
    min-width: 300px; /* Ensures columns don't get too squished */
}

.location-section .location-details h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.location-section .location-details p {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 1.2rem;
}

.location-section .location-details p i {
    margin-top: 0.3rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 20px; /* Ensures consistent icon alignment */
    text-align: center;
}

.location-section .location-details a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.location-section .location-details a:hover {
    color: var(--secondary-dark);
}

.location-section .office-hours {
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
    border-left: 4px solid var(--secondary-color);
}

.location-section .office-hours strong {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.location-section .office-hours span {
    display: block;
    line-height: 1.6;
}

.location-section .map-container-large {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-hover);
    height: 450px; /* Increased height */
    width: 100%;
}

.location-section iframe {
    width: 100%;
    height: 100%;
    border: 0;
}


/* --- Responsive Media Queries --- */
@media (max-width: 767.98px) {
    .section { padding: 3rem 0; }
    .hero-slider { height: 60vh; min-height: 400px; }
    .stat-item { flex-direction: column; text-align: center; gap: 1rem; border-left: none; border-top: 4px solid var(--secondary-color); }
    .review-header { flex-direction: column; align-items: flex-start; }
    .review-rating { margin-left: 0; margin-top: 0.5rem; }
}