/* 🌐 Global Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease-in-out;
}

/* 🌑 Dark Mode Global Styles */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0;
}

body.dark-mode section,
body.dark-mode .card,
body.dark-mode .carousel-inner,
body.dark-mode #galleryContainer img {
    background-color: #1e1e1e !important;
    color: #e0e0e0;
    box-shadow: none;
}

body.dark-mode .btn {
    background-color: #444 !important;
    color: #fff !important;
}

body.dark-mode h2 {
    background: linear-gradient(to right, #555, #333) !important;
    color: #fff !important;
}

body.dark-mode .welcome-heading {
    background: linear-gradient(to right, #ffffff, #bbbbbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .welcome-text {
    color: #ddd;
}

/* 🖼️ Carousel */
#imageCarousel {
    max-width: 800px;
    margin: auto;
}

.carousel-inner img,
.carousel-item img {
    height: 315px;
    object-fit: cover;
    border-radius: 12px;
}

/* 📦 Cards */
.card {
    border: none;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/* 🔘 Buttons */
.btn,
.social-btn {
    border-radius: 50px !important;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover,
.social-btn:hover {
    opacity: 0.8;
}

/* 🎥 Featured & Video Grid */
#featuredVideo {
    text-align: center;
    margin: 20px auto;
    max-width: 800px;
}

#featuredVideo iframe {
    width: 100%;
    border-radius: 10px;
}

#videosContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    justify-items: center;
}

.video-item {
    width: 100%;
    max-width: 350px;
    text-align: center;
}

#loadMoreBtn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

#loadMoreBtn:hover {
    background-color: #0056b3;
}

/* 🏠 Welcome Section */
#home {
    background: url('images/train-bg.jpg') center/cover no-repeat;
    padding: 80px 20px;
    text-align: center;
    color: white;
    position: relative;
}

#home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.welcome-heading {
    font-size: 42px;
    font-weight: bold;
    background: linear-gradient(to right, #ffffff, #d3d3d3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 10px;
}

.welcome-text {
    font-size: 18px;
    color: #f1f1f1;
    max-width: 600px;
    margin: auto;
    font-family: 'Roboto', sans-serif;
    position: relative;
    z-index: 2;
}

/* 🖼️ Gallery */
#galleryContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    justify-items: center;
}

#galleryContainer img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* 📍 Sections */
section {
    padding: 50px 20px;
    border-radius: 15px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
    background: #ffffff;
}

section h2 {
    display: inline-block;
    background: linear-gradient(to right, #007bff, #0056b3);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 26px;
    font-weight: bold;
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.2);
}

/* 📞 Contact Section */
#contact {
    background: #222;
    color: white;
    border-radius: 0;
    margin-bottom: 0;
}

#contact h2 {
    background: linear-gradient(to right, #28a745, #218838);
}

/* 🌙 Dark Mode Toggle with Icons */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.toggle-label .icon {
    position: absolute;
    top: 4px;
    font-size: 20px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.toggle-label .sun {
    left: 8px;
    opacity: 1;
}

.toggle-label .moon {
    right: 8px;
    opacity: 0;
}

.toggle-label .slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #ccc;
    border-radius: 30px;
    transition: background-color 0.4s;
}

.toggle-label .slider::before {
    content: "";
    position: absolute;
    height: 24px; width: 24px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked + .toggle-label .slider {
    background-color: #333;
}

input[type="checkbox"]:checked + .toggle-label .slider::before {
    transform: translateX(30px);
}

input[type="checkbox"]:checked + .toggle-label .sun {
    opacity: 0;
}

input[type="checkbox"]:checked + .toggle-label .moon {
    opacity: 1;
}

/* 📱 Responsive Design */
@media (max-width: 1024px) {
    #videosContainer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section h2 {
        font-size: 22px;
        padding: 12px 25px;
    }

    #galleryContainer {
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome-heading {
        font-size: 32px;
    }

    .welcome-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #galleryContainer {
        grid-template-columns: repeat(1, 1fr);
    }
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
  }
  
  .video-card {
    background-color: #1c1c1c;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    color: white;
    position: relative;
    cursor: pointer;
  }
  
  .video-card:hover {
    transform: scale(1.03);
  }
  
  .video-thumb {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .video-info {
    padding: 10px;
  }
  
  .video-title {
    font-size: 16px;
    font-weight: bold;
  }
  
  .video-views {
    font-size: 14px;
    color: #aaa;
  }
  
  .video-card iframe {
    width: 100%;
    height: 200px;
    border: none;
  }

  .blog-section {
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    text-align: center;
    color: #f0f0f0;
  }
  
  .blog-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
  }
  
  .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  .blog-card {
    background: linear-gradient(145deg, #1e1e2f, #2b2b3c);
    padding: 1.5rem;
    border-radius: 15px;
    color: #f5f5f5;
    text-align: left;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .blog-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px #00ffe5;
  }
  
  .blog-card .tag {
    background: #00bcd4;
    color: #000;
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    font-size: 0.75rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .blog-card h3 {
    margin-top: 1.2rem;
    font-size: 1.3rem;
  }
  
  .blog-card .date {
    font-size: 0.85rem;
    color: #bbbbbb;
    margin: 0.3rem 0;
  }
  
  .blog-card .excerpt {
    margin: 0.8rem 0;
    font-size: 1rem;
    color: #dddddd;
  }
  
  .read-more {
    text-decoration: none;
    color: #00ffe5;
    font-weight: bold;
    font-size: 0.95rem;
  }

  .full-post {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #cccccc;
    line-height: 1.6;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
  }
  
  .blog-card.expanded .full-post {
    max-height: 200px;
    opacity: 1;
  }
  
  .hidden {
    display: none;
  }
  
  .blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  .modal-content {
    background: #1e1e2f;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    color: #f5f5f5;
    box-shadow: 0 0 20px #00ffe5;
    position: relative;
    animation: fadeIn 0.3s ease;
  }
  
  .modal-content h3 {
    margin-bottom: 0.5rem;
  }
  
  .modal-content .date {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .close-btn {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
  }
  
  @keyframes fadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  