/* ========================================
   Enhanced Mobile Styles for Home Components
   ======================================== */

/* ========================================
   1. About Section Mobile - Enhanced & Fixed
   ======================================== */
@media (max-width: 767px) {
  /* Main container fixes */
  .img-box1 {
    position: relative !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 35px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    padding-bottom: 0 !important;
    width: 100% !important;
  }
  
  /* Main image */
  .img-box1 .img1 {
    margin-bottom: 20px;
    width: 100%;
  }
  
  .img-box1 .img1 img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
  }
  
  /* About grid card - centered */
  .about-grid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 220px;
    margin: 20px auto !important;
    padding: 25px 20px !important;
    transform: none !important;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color2) 100%);
  }
  
  .about-grid_year {
    font-size: 36px !important;
    margin-bottom: 10px !important;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
  }
  
  .about-grid_year .counter-number {
    color: #fff;
  }
  
  .about-grid_year .text-theme {
    color: #FFD700 !important;
  }
  
  .about-grid_text {
    font-size: 14px !important;
    color: rgba(255,255,255,0.95);
    margin: 0;
    line-height: 1.4;
  }
  
  /* Hide second image on mobile */
  .img-box1 .img2 {
    display: none !important;
  }
  
  /* Hide decorative shapes */
  .about-shape1,
  .shape-mockup.about-shape1 {
    display: none !important;
  }
  
  /* Mini image styling */
  .about-grid_img {
    text-align: center;
    margin-bottom: 25px !important;
  }
  
  .about-grid_img img {
    max-width: 140px !important;
    height: auto;
    border-radius: 8px;
  }
  
  /* Checklist improvements */
  .checklist {
    margin-bottom: 0;
  }
  
  .checklist ul {
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin: 0;
    list-style: none;
  }
  
  .checklist li {
    font-size: 14px !important;
    padding: 10px 0 !important;
    padding-right: 25px !important;
    position: relative;
    line-height: 1.5;
  }
  
  .checklist li:before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--theme-color);
    font-weight: bold;
    font-size: 16px;
  }
  
  /* Section spacing */
  #about-sec.space {
    padding: 50px 0 !important;
  }
  
  /* Title area */
  #about-sec .title-area {
    margin-bottom: 25px !important;
    text-align: center;
  }
  
  #about-sec .sec-title {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }
  
  #about-sec .sub-title {
    font-size: 14px !important;
  }
  
  /* Paragraphs */
  .about-paragraphs p {
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 15px !important;
    text-align: justify;
  }
  
  /* Button group */
  .btn-group {
    text-align: center;
    margin-top: 30px !important;
  }
  
  .btn-group .th-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Tablet responsive (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .img-box1 {
    margin-right: 0 !important;
    margin-bottom: 40px !important;
    padding-right: 0 !important;
    padding-bottom: 30px !important;
    position: relative;
  }
  
  .img-box1 .img1 {
    margin-bottom: 25px;
  }
  
  .img-box1 .img1 img {
    width: 100%;
    border-radius: 12px;
  }
  
  .about-grid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 25px auto !important;
    max-width: 250px;
    padding: 30px 25px !important;
  }
  
  .about-grid_year {
    font-size: 40px !important;
  }
  
  .about-grid_text {
    font-size: 15px !important;
  }
  
  .img-box1 .img2 {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .img-box1 .img2 img {
    width: 100%;
    border-radius: 12px;
  }
  
  .about-shape1 {
    display: none !important;
  }
  
  #about-sec .title-area {
    text-align: center;
    margin-bottom: 30px !important;
  }
  
  .about-grid_img {
    text-align: center;
  }
}

/* ========================================
   2. Products Carousel Mobile
   ======================================== */
@media (max-width: 767px) {
  .course-carousel,
  .products-carousel {
    margin: 0 -15px !important;
  }
  
  .course-box,
  .product-card {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    margin-bottom: 20px;
  }
  
  .course-img,
  .product-img {
    height: 180px !important;
    overflow: hidden;
  }
  
  .course-img img,
  .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .course-content,
  .product-content {
    padding: 18px 15px !important;
  }
  
  .course-title,
  .product-title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
    min-height: auto !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .course-meta,
  .product-meta {
    font-size: 12px !important;
    margin-bottom: 12px !important;
  }
  
  .course-author,
  .product-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .course-author img,
  .product-author img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
  }
  
  .course-footer,
  .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
  }
  
  .course-price,
  .product-price {
    font-size: 18px !important;
    font-weight: 700;
    color: var(--theme-color);
  }
  
  .course-rating,
  .product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
  }
}

/* ========================================
   3. Why Choose Us Section Mobile
   ======================================== */
@media (max-width: 767px) {
  .feature-card,
  .why-choose-card {
    margin-bottom: 25px !important;
    padding: 25px 20px !important;
    text-align: center;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
  }
  
  .feature-card:hover,
  .why-choose-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  }
  
  .feature-icon,
  .why-choose-icon {
    width: 70px !important;
    height: 70px !important;
    margin: 0 auto 15px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color2) 100%);
    border-radius: 50%;
    font-size: 32px !important;
    color: #fff;
  }
  
  .feature-title,
  .why-choose-title {
    font-size: 17px !important;
    margin-bottom: 10px !important;
  }
  
  .feature-text,
  .why-choose-text {
    font-size: 13px !important;
    line-height: 1.6;
    color: #666;
  }
}

/* ========================================
   4. Counter Section Mobile - Enhanced
   ======================================== */
@media (max-width: 767px) {
  .counter-area-1 {
    margin-top: 0 !important;
    transform: none !important;
    padding: 30px 20px !important;
    border-radius: 15px !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: scroll !important;
    position: relative !important;
    overflow: hidden;
  }
  
  /* Ensure background image displays properly on mobile */
  .counter-area-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 94, 244, 0.85);
    z-index: 0;
  }
  
  .counter-area-1 > .row {
    position: relative;
    z-index: 1;
  }
  
  .counter-card-wrap {
    padding: 20px 15px !important;
    margin-bottom: 20px !important;
  }
  
  .counter-card-wrap:last-child {
    margin-bottom: 0 !important;
  }
  
  .counter-card {
    padding: 0 !important;
    background: transparent !important;
    text-align: center;
  }
  
  .counter-card_icon {
    font-size: 36px !important;
    margin-bottom: 12px;
    color: #fff;
  }
  
  .counter-number {
    font-size: 32px !important;
    font-weight: 800;
    color: #fff;
    display: block;
    margin-bottom: 8px;
    line-height: 1.2;
  }
  
  .counter-title {
    font-size: 14px !important;
    color: rgba(255,255,255,0.95);
    font-weight: 500;
    line-height: 1.4;
  }
}

/* Tablet responsive for counter */
@media (min-width: 768px) and (max-width: 991px) {
  .counter-area-1 {
    padding: 40px 30px !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: scroll !important;
  }
  
  .counter-area-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 94, 244, 0.8);
    z-index: 0;
  }
  
  .counter-card-wrap {
    padding: 25px 20px !important;
  }
}

/* ========================================
   5. CTA Sections Mobile
   ======================================== */
@media (max-width: 767px) {
  .cta-wrap,
  .cta-card {
    padding: 40px 25px !important;
    text-align: center !important;
    border-radius: 15px;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    overflow: hidden;
  }
  
  .cta-wrap::before,
  .cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 0;
  }
  
  .cta-wrap > *,
  .cta-card > * {
    position: relative;
    z-index: 1;
  }
  
  .cta-title {
    font-size: 24px !important;
    line-height: 1.3 !important;
    margin-bottom: 15px !important;
    color: #fff;
  }
  
  .cta-text,
  .cta-subtitle {
    font-size: 14px !important;
    margin-bottom: 20px !important;
    color: rgba(255,255,255,0.9);
  }
  
  .cta-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
  }
  
  .cta-btn-group .th-btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* ========================================
   6. Experts/Team Section Mobile
   ======================================== */
@media (max-width: 767px) {
  .team-card,
  .expert-card {
    margin-bottom: 25px !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: #fff;
  }
  
  .team-img,
  .expert-img {
    height: 250px !important;
    overflow: hidden;
    position: relative;
  }
  
  .team-img img,
  .expert-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  
  .team-card:hover .team-img img,
  .expert-card:hover .expert-img img {
    transform: scale(1.05);
  }
  
  .team-content,
  .expert-content {
    padding: 20px !important;
    text-align: center;
  }
  
  .team-title,
  .expert-title {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }
  
  .team-desig,
  .expert-desig {
    font-size: 13px !important;
    color: #666;
    margin-bottom: 12px;
  }
  
  .team-social,
  .expert-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
  }
  
  .team-social a,
  .expert-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    color: var(--theme-color);
    transition: all 0.3s ease;
  }
  
  .team-social a:hover,
  .expert-social a:hover {
    background: var(--theme-color);
    color: #fff;
    transform: translateY(-3px);
  }
}

/* ========================================
   7. Events Section Mobile
   ======================================== */
@media (max-width: 767px) {
  .event-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    background: #fff;
  }
  
  .event-date {
    width: 100% !important;
    max-width: 100px;
    margin: 0 auto !important;
    padding: 20px !important;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color2) 100%);
    text-align: center;
    color: #fff;
    border-radius: 12px;
    position: relative;
    top: -15px;
  }
  
  .event-date-day {
    font-size: 36px !important;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 5px;
  }
  
  .event-date-month {
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .event-content {
    padding: 0 20px 20px !important;
    text-align: center;
  }
  
  .event-title {
    font-size: 17px !important;
    margin-bottom: 12px !important;
  }
  
  .event-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px !important;
    color: #666;
    margin-bottom: 15px;
  }
  
  .event-meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .event-btn {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   8. Partners/Brands Section Mobile
   ======================================== */
@media (max-width: 767px) {
  .brand-sec,
  .partners-sec {
    padding: 40px 0 !important;
  }
  
  .brand-slider,
  .partners-slider {
    padding: 20px 0;
  }
  
  .brand-card,
  .partner-card {
    padding: 20px !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 0 5px;
    transition: all 0.3s ease;
  }
  
  .brand-card:hover,
  .partner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .brand-logo,
  .partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
  }
  
  .brand-logo img,
  .partner-logo img {
    max-width: 120px !important;
    max-height: 50px !important;
    width: auto;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
  }
  
  .brand-card:hover .brand-logo img,
  .partner-card:hover .partner-logo img {
    filter: grayscale(0%);
  }
}

/* ========================================
   9. Blog Section Mobile
   ======================================== */
@media (max-width: 767px) {
  .blog-box,
  .blog-card {
    margin-bottom: 30px !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: #fff;
    transition: all 0.3s ease;
  }
  
  .blog-box:hover,
  .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  }
  
  .blog-img {
    height: 200px !important;
    overflow: hidden;
    position: relative;
  }
  
  .blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  
  .blog-box:hover .blog-img img,
  .blog-card:hover .blog-img img {
    transform: scale(1.05);
  }
  
  .blog-category,
  .blog-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--theme-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .blog-content {
    padding: 20px !important;
  }
  
  .blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px !important;
    color: #999;
    margin-bottom: 12px;
  }
  
  .blog-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .blog-title {
    font-size: 17px !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .blog-text,
  .blog-excerpt {
    font-size: 13px !important;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .blog-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
  }
  
  .blog-author-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
  }
  
  .blog-author-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .blog-author-info {
    flex: 1;
  }
  
  .blog-author-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--title-color);
  }
  
  .blog-date {
    font-size: 11px;
    color: #999;
  }
  
  .blog-btn,
  .read-more-btn {
    width: 100%;
    text-align: center;
    padding: 12px !important;
    margin-top: 15px;
  }
}

/* ========================================
   10. Testimonials Slider Mobile
   ======================================== */
@media (max-width: 767px) {
  .testi-box,
  .testimonial-card {
    padding: 30px 20px !important;
    margin: 0 10px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
  }
  
  .testi-quote,
  .quote-icon {
    font-size: 60px !important;
    color: rgba(13, 94, 244, 0.1);
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 0;
  }
  
  .testi-text,
  .testimonial-text {
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 20px !important;
    position: relative;
    z-index: 1;
    font-style: italic;
    color: #444;
  }
  
  .testi-rating,
  .rating-stars {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #FFB539;
  }
  
  .testi-author,
  .testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
  }
  
  .testi-author-img,
  .testimonial-author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid var(--theme-color);
  }
  
  .testi-author-img img,
  .testimonial-author-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .testi-author-name,
  .testimonial-author-name {
    font-size: 16px !important;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 5px;
  }
  
  .testi-author-desig,
  .testimonial-author-position {
    font-size: 13px !important;
    color: #666;
  }
  
  /* Swiper pagination for mobile */
  .swiper-pagination {
    margin-top: 25px !important;
  }
  
  .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--theme-color);
    opacity: 0.3;
    margin: 0 5px !important;
  }
  
  .swiper-pagination-bullet-active {
    opacity: 1;
    width: 25px;
    border-radius: 5px;
  }
}

/* ========================================
   11. Category Slider Enhanced Mobile
   ======================================== */
@media (max-width: 767px) {
  .category-slider {
    margin: 0 -10px;
  }
  
  .category-card {
    padding: 25px 15px !important;
    margin: 0 5px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  }
  
  .category-icon {
    width: 65px !important;
    height: 65px !important;
    margin: 0 auto 15px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color2) 100%);
    border-radius: 50%;
    font-size: 30px !important;
    color: #fff;
    transition: all 0.3s ease;
  }
  
  .category-card:hover .category-icon {
    transform: rotateY(360deg);
  }
  
  .category-card h3,
  .category-title {
    font-size: 15px !important;
    margin-bottom: 8px !important;
    font-weight: 700;
    color: var(--title-color);
  }
  
  .category-card p,
  .category-count {
    font-size: 12px !important;
    color: #666;
    margin: 0;
  }
}

/* ========================================
   Performance Optimization Classes
   ======================================== */
@media (max-width: 767px) {
  .will-change-transform {
    will-change: transform;
  }
  
  .gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
  }
}
