/* =============================================
   HOME PAGE STYLES - AHDA Knowledge Hub
   ============================================= */

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #2d0a0a 0%, #4a0a0a 25%, #6b0a0a 50%, #4a0a0a 75%, #2d0a0a 100%);
    background-size: 200% 200%;
    animation: heroGradientShift 15s ease infinite;
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.08) 2px, transparent 2px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F57B2C, #AC1A2C, #14776D, #0B4F66, #F57B2C);
    animation: borderShine 4s ease infinite;
    background-size: 200% 100%;
}

@keyframes borderShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #FFFFFF, #FFD700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.hero-section .lead {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

/* Hero Buttons */
.hero-section .btn-danger,
.hero-section .btn-outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-section .btn-danger {
    background: linear-gradient(135deg, #F57B2C, #AC1A2C);
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-section .btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 123, 44, 0.4);
    background: linear-gradient(135deg, #AC1A2C, #F57B2C);
}

.hero-section .btn-outline-danger {
    border: 2px solid #F57B2C;
    color: white;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: transparent;
}

.hero-section .btn-outline-danger:hover {
    background: #F57B2C;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 123, 44, 0.3);
}

/* ===== SECTION HEADINGS - ALL CENTERED ===== */
.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d0a0a;
    position: relative;
    display: inline-block;
    margin-bottom: 0;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #F57B2C, #8B0000);
    border-radius: 2px;
}

.section-heading p {
    color: #465256;
    margin-top: 1rem;
    font-size: 1rem;
}

/* For backward compatibility */
.container h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d0a0a;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #F57B2C, #8B0000);
    border-radius: 2px;
}

/* ===== COURSE CARDS ===== */
.course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(139, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.15);
    border-color: rgba(245, 123, 44, 0.3);
}

.course-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.1), rgba(139, 0, 0, 0.08));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.course-card:hover .course-icon {
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.2), rgba(139, 0, 0, 0.15));
    transform: scale(1.05);
}

.course-icon i {
    font-size: 32px;
    color: #8B0000;
}

.course-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d0a0a;
    margin-bottom: 0.75rem;
}

.course-card .card-text {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.course-card .btn-outline-danger {
    border: 2px solid #8B0000;
    color: #8B0000;
    background: transparent;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.course-card .btn-outline-danger:hover {
    background: linear-gradient(135deg, #8B0000, #5A0000);
    color: white;
    transform: translateX(5px);
}

/* ===== STATS SECTION - 2x2 ON MOBILE ===== */
#stats {
    background: linear-gradient(135deg, #F3FAFA 0%, #E8F4F4 100%);
    padding: 60px 0;
    position: relative;
}

#stats .row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
    justify-content: center;
}

#stats [class*="col-"] {
    padding: 0 0.5rem;
}

.stats-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(139, 0, 0, 0.08);
    text-align: center;
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.12);
    border-color: rgba(245, 123, 44, 0.2);
}

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8B0000, #F57B2C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.stats-card:hover h2 {
    transform: scale(1.05);
}

.stats-card p {
    font-size: 0.9rem;
    color: #465256;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.text-stats {
    font-size: 0.7rem;
    color: #14776D;
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(20, 119, 109, 0.1);
    border-radius: 20px;
}

/* Desktop: 4 columns */
@media (min-width: 992px) {
    #stats .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Tablet: 2x2 grid */
@media (min-width: 576px) and (max-width: 991px) {
    #stats .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1rem;
    }
}

/* Mobile: 2x2 grid (each card takes 50% width) */
@media (max-width: 575px) {
    #stats .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .stats-card p {
        font-size: 0.75rem;
    }
    
    .text-stats {
        font-size: 0.6rem;
    }
}

/* Extra small devices - ensure proper spacing */
@media (max-width: 380px) {
    .stats-card h2 {
        font-size: 1.3rem;
    }
    
    .stats-card p {
        font-size: 0.7rem;
    }
}

/* ===== RESOURCE SUMMARY SECTION ===== */
.resource-summary {
    background: linear-gradient(135deg, #FFF5F5, #FFFFFF);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(139, 0, 0, 0.1);
}

.resource-summary h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d0a0a;
    margin-bottom: 0.5rem;
}

.resource-summary p {
    color: #465256;
    margin-bottom: 1.5rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, #2d0a0a 0%, #4a0a0a 100%);
    margin-top: 2rem;
}

.cta-box {
    padding: 3rem;
    background: transparent;
    text-align: center;
}

.cta-box h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: linear-gradient(135deg, #F57B2C, #AC1A2C);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 123, 44, 0.4);
    color: white;
}

.btn-cta-secondary {
    background: transparent;
    border: 2px solid #F57B2C;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
    background: #F57B2C;
    color: white;
    transform: translateY(-3px);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-heading h2,
    .container h2 {
        font-size: 1.8rem;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-section .btn-danger,
    .hero-section .btn-outline-danger {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    #stats {
        padding: 40px 0;
    }
    
    .section-heading h2,
    .container h2 {
        font-size: 1.5rem;
    }
    
    .course-card {
        margin-bottom: 1.5rem;
    }
    
    .course-icon {
        width: 55px;
        height: 55px;
    }
    
    .course-icon i {
        font-size: 24px;
    }
    
    .cta-box {
        padding: 2rem;
    }
    
    .cta-box h2 {
        font-size: 1.5rem;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
    }
    
    .hero-section .btn-danger,
    .hero-section .btn-outline-danger {
        display: block;
        width: 80%;
        margin: 0.5rem auto;
    }
    
    .section-heading h2,
    .container h2 {
        font-size: 1.3rem;
    }
    
    .course-card .card-title {
        font-size: 1rem;
    }
    
    .course-card .card-text {
        font-size: 0.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        text-align: center;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* AOS Animation Classes */
[data-aos="fade-up"] {
    animation: fadeInUp 0.8s ease forwards;
}

[data-aos="fade-up"][data-aos-delay="100"] {
    animation-delay: 0.1s;
}

[data-aos="fade-up"][data-aos-delay="200"] {
    animation-delay: 0.2s;
}

[data-aos="fade-up"][data-aos-delay="300"] {
    animation-delay: 0.3s;
}

/* Ensure elements are visible before animation */
[data-aos] {
    opacity: 0;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* ===== CARD HOVER EFFECTS ===== */
.course-card {
    animation: fadeInUp 0.6s ease backwards;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.2s; }
.course-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== BUTTON STYLES ===== */
.btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:active {
    transform: scale(0.96);
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: linear-gradient(135deg, #8B0000, #F57B2C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bg-gradient-maroon {
    background: linear-gradient(135deg, #2d0a0a, #6b0a0a);
}

/* ===== CONTAINER RESPONSIVE PADDING ===== */
.container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}