/* ===== Global Styles ===== */
:root {
    --primary-color: #0052CC;
    --secondary-color: #28a745;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-muted: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== Navigation ===== */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #003d99;
    border-color: #003d99;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero-section h1 {
    color: var(--dark-color);
    line-height: 1.2;
}

.hero-section .lead {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hero-section img {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== About Section ===== */
.about-section {
    padding: 80px 0;
}

.about-section .card {
    transition: all 0.3s ease;
}

.about-section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.icon-box {
    display: inline-block;
}

/* ===== Features Section ===== */
.features-section {
    padding: 80px 0;
}

.feature-card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card img {
    transition: transform 0.3s ease;
}

.feature-card:hover img {
    transform: scale(1.1);
}

.feature-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.feature-icon-symbol {
    font-size: 3.5rem;
}

/* ===== Categories Section ===== */
.categories-section {
    padding: 80px 0;
}

.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.icon-box-category {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #0066ff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== Testimonial Section ===== */
.testimonial-section {
    padding: 80px 0;
}

.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.avatar-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #0066ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 80px 0;
}

.cta-section .btn-light {
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-section .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.5);
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 80px 0;
}

.contact-info i {
    transition: transform 0.3s ease;
}

.contact-info:hover i {
    transform: scale(1.2);
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 82, 204, 0.15);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark-color);
}

.footer a {
    transition: all 0.3s ease;
}

.footer .text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}

.hover-white:hover {
    color: #fff !important;
}

/* Social Buttons */
.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 82, 204, 0.4);
}

.social-btn i {
    font-size: 1.25rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Responsive Design ===== */
@media (max-width: 991px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .about-section, .features-section, .categories-section, .testimonial-section, .contact-section {
        padding: 60px 0;
    }
}

@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
}

/* ===== Alert Messages ===== */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===== Utility Classes ===== */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.rounded-4 {
    border-radius: 15px !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* ===== Course Section ===== */
.course-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em; /* 1.5 * 2 lines */
}

.card:hover .course-title {
    color: var(--primary-color) !important;
}

/* ===== Category Section ===== */
.category-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3em; /* Ensure consistent height */
}

/* Ensure stretched-link works nicely with hover states */
.category-card {
    position: relative; /* Ensure it's a containing block */
    transition: all 0.3s ease;
}

.category-card:hover .text-dark {
    color: var(--primary-color) !important;
}
