/* ==========================================================================
   Homepage Layout Fix - Proper Alignment & Responsive Design
   ========================================================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Container and Grid Fixes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 60px;
    padding: 0 15px;
}

.container-fluid {
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > [class*="col-"] {
    padding: 0 15px;
}

/* Modern Loader Styles */
.modern-loader {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.modern-loader.fade-out {
    opacity: 0;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 150px;
    margin-bottom: 20px;
}

.loader-text {
    font-size: 18px;
    color: #333333;
    margin-bottom: 15px;
    font-weight: 500;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8DC6D8;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Banner Slider Styles */
.modern-banner-slider {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-video,
.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.slide-overlay-1 {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 249, 250, 0.8) 50%, 
        rgba(245, 164, 37, 0.1) 100%);
}

.slide-overlay-2 {
    background: linear-gradient(135deg, 
        rgba(248, 249, 250, 0.9) 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(0, 123, 255, 0.1) 100%);
}

.slide-overlay-3 {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 249, 250, 0.8) 50%, 
        rgba(40, 167, 69, 0.1) 100%);
}

.slide-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #333333;
    max-width: 800px;
    padding: 40px 20px;
    margin: 0 auto;
}

.slide-content h6 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #666666;
    font-weight: 500;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #333333;
    font-weight: 800;
    line-height: 1.2;
}

    .slide-content h1 em {
        color: #8DC6D8;
        font-style: normal;
    }

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666666;
    line-height: 1.5;
}

.modern-cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(45deg, #8DC6D8, #8DC6D8);
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(245, 164, 37, 0.3);
    border: none;
    cursor: pointer;
}

.modern-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 164, 37, 0.4);
    color: #ffffff;
    text-decoration: none;
}

    .modern-cta-button.outline {
        background: transparent;
        color: #8DC6D8;
        border: 2px solid #8DC6D8;
        box-shadow: none;
    }

        .modern-cta-button.outline:hover {
            background: #8DC6D8;
            color: #ffffff;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(245, 164, 37, 0.3);
        }

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(51, 51, 51, 0.3);
    border: 2px solid rgba(51, 51, 51, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .slider-dot.active {
        background: #8DC6D8;
        border-color: #8DC6D8;
        transform: scale(1.2);
    }

.slider-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 15;
}

    .slider-arrows:hover {
        background: #ffffff;
        color: #8DC6D8;
        transform: translateY(-50%) scale(1.1);
    }

.slider-arrow-prev {
    left: 30px;
}

.slider-arrow-next {
    right: 30px;
}

/* Latest News Section */
.latest-news {
    padding: 60px 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333333;
    font-weight: 700;
}

.section-header .section-subtitle {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 0;
}

.news-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 30px;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.news-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #8DC6D8;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 3;
}

.news-image {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: #f8f9fa;
}

.news-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #8DC6D8;
    pointer-events: none;
    z-index: 2;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 0.9rem;
    color: #999999;
    margin-bottom: 10px;
}

.news-meta .news-date {
    display: inline-block;
    margin-right: 15px;
}

.news-meta .news-category {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 16px;
    font-weight: 500;
    text-transform: uppercase;
}

/* News category styling */
.news-category.promotion { background: rgba(245, 164, 37, 0.1); color: #d97706; }
.news-category.event { background: rgba(16, 185, 129, 0.1); color: #059669; }
.news-category.course { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.news-category.technology { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.news-category.rewards { background: rgba(236, 72, 153, 0.1); color: #be185d; }
.news-category.success { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.news-category.market { background: rgba(251, 146, 60, 0.1); color: #ea580c; }
.news-category.partnership { background: rgba(20, 184, 166, 0.1); color: #0d9488; }
.news-category.analysis { background: rgba(107, 114, 128, 0.1); color: #4b5563; }

.news-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #333333;
    font-weight: 600;
}

.news-excerpt {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #666666;
    line-height: 1.4;
    flex-grow: 1;
}

.read-more {
    font-size: 0.9rem;
    color: #8DC6D8;
    text-decoration: underline;
    transition: color 0.3s ease;
    margin-top: auto;
}

.read-more:hover {
    color: #d39e00;
    text-decoration: none;
}

#additional-news {
    transition: opacity 0.6s ease-in-out;
    opacity: 0;
}

#additional-news.show {
    opacity: 1;
}

/* Gallery Section Styles */
.galleries-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.section-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.section-subheader h3 {
    font-size: 1.8rem;
    color: #333333;
    font-weight: 600;
    margin: 0;
}

.view-all-link {
    color: #8DC6D8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #d39e00;
    text-decoration: none;
}

/* Featured Gallery Cards */
.featured-gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
    margin-bottom: 30px;
}

.featured-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-gallery-card:hover .gallery-cover {
    transform: scale(1.05);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.3) 50%, 
        rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    color: #ffffff;
}

.gallery-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.gallery-info p {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.gallery-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.gallery-type {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.gallery-type.photo {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.gallery-type.video {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.gallery-count {
    opacity: 0.8;
}

.gallery-cta-button {
    display: inline-block;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .gallery-cta-button:hover {
        background: #ffffff;
        color: #8DC6D8;
        text-decoration: none;
        transform: translateY(-2px);
    }

/* Regular Gallery Cards */
.gallery-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.gallery-thumbnail {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: #f8f9fa;
}

.gallery-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-thumb {
    transform: scale(1.05);
}

.gallery-thumb-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #999999;
}

.gallery-thumb-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.gallery-icon {
    font-size: 1rem;
}

.gallery-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-content h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 600;
}

.gallery-content p {
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
}

.gallery-link {
    color: #8DC6D8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    margin-top: auto;
}

.gallery-link:hover {
    color: #d39e00;
    text-decoration: none;
}

/* Photo and Video specific styles */
.photo-card {
    border-left: 4px solid #3b82f6;
}

.video-card {
    border-left: 4px solid #22c55e;
}

.gallery-navigation {
    margin-top: 30px;
}

/* Course Section */
.modern-courses {
    padding: 80px 0;
    background: #ffffff;
}

.section-heading {
    text-align: center;
    margin-bottom: 50px;
}

.section-heading h2 {
    font-size: 2.5rem;
    color: #333333;
    font-weight: 700;
    margin-bottom: 20px;
}

.course-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.down-content {
    padding: 30px;
}

.down-content h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333333;
}

.down-content p {
    color: #666666;
    margin-bottom: 20px;
}

.course-price {
    font-size: 2rem;
    font-weight: 700;
    color: #8DC6D8;
    margin-bottom: 20px;
}

.modern-pay-button {
    background: linear-gradient(45deg, #8DC6D8, #8DC6D8);
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 164, 37, 0.4);
}

/* Contact Section */
.modern-contact {
    padding: 80px 0;
    background: #f8f9fa;
}

.contact-info-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.contact-item {
    margin-bottom: 20px;
}

.contact-label {
    font-weight: 600;
    color: #333333;
    margin-bottom: 5px;
}

.contact-value {
    color: #666666;
    line-height: 1.5;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .slider-arrows {
        display: none;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .section-subheader {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .modern-banner-slider {
        height: 60vh;
        min-height: 400px;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content h6,
    .slide-content p {
        font-size: 1rem;
    }
    
    .modern-cta-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    
    .slider-nav {
        bottom: 20px;
        gap: 8px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .latest-news {
        padding: 40px 0;
    }
    
    .galleries-section {
        padding: 50px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header .section-subtitle {
        font-size: 1rem;
    }
    
    .featured-gallery-card {
        height: 300px;
    }
    
    .gallery-overlay {
        padding: 20px;
    }
    
    .gallery-info h3 {
        font-size: 1.4rem;
    }
    
    .gallery-info p {
        font-size: 0.9rem;
    }
    
    .gallery-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .gallery-cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .contact-info-card {
        margin-bottom: 30px;
    }
    
    .map-container iframe {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: none;
        padding: 0 20px;
    }
    
    .row {
        margin: 0 -10px;
    }
    
    .row > [class*="col-"] {
        padding: 0 10px;
    }
    
    .slide-content {
        padding: 20px 15px;
    }
    
    .news-card,
    .gallery-card {
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .gallery-info h3 {
        font-size: 1.2rem;
    }
    
    .course-card {
        margin-bottom: 30px;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mr-2 {
    margin-right: 0.5rem;
}