 /* ===== HORIZONTAL SCROLLABLE COURSE SECTION ===== */

 .ed-course {
     background: #ffffff;
     padding: 60px 0;
     position: relative;
     overflow: hidden;
 }

 .ed-course__shapes {
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     z-index: 1;
     pointer-events: none;
 }

 .ed-course__shapes img {
     opacity: 0.03;
 }

 /* Section Header */
 .ed-section-head {
     margin-bottom: 0;
 }

 .ed-section-head__sm-title {
     color: #d73502;
     font-size: 16px;
     font-weight: 700;
     margin-bottom: 8px;
     display: block;
 }

 .ed-section-head__title {
     font-size: 28px;
     font-weight: 700;
     color: #0f1111;
     margin: 0;
     line-height: 1.3;
 }

 .see-more-link {
     color: #007185;
     font-size: 14px;
     text-decoration: none;
     font-weight: 500;
     transition: color 0.2s ease;
 }

 .see-more-link:hover {
     color: #c7511f;
     text-decoration: underline;
 }

 /* Horizontal Course Wrapper */
 .horizontal-course-wrapper {
     position: relative;
     z-index: 2;
     margin-top: 30px;
 }

 /* Navigation Arrows */
 .course-nav-arrow {
     position: absolute;
     top: 50%;
     transform: translateY(-50%);
     width: 40px;
     height: 40px;
     background: rgba(255, 255, 255, 0.9);
     border: 1px solid #ddd;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     z-index: 10;
     transition: all 0.3s ease;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 }

 .course-nav-arrow:hover {
     background: #ffffff;
     border-color: #007bff;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
 }

 .course-nav-left {
     left: -20px;
 }

 .course-nav-right {
     right: -20px;
 }

 .course-nav-arrow i {
     font-size: 18px;
     color: #333;
 }

 /* Horizontal Course Container */
 .horizontal-course-container {
     display: flex;
     gap: 20px;
     padding: 20px 0;
     overflow-x: auto;
     scroll-behavior: smooth;
     scrollbar-width: none;
     -ms-overflow-style: none;
 }

 .horizontal-course-container::-webkit-scrollbar {
     display: none;
 }

 /* Course Card Horizontal */
 .course-card-horizontal {
     min-width: 280px;
     max-width: 280px;
     background: #ffffff;
     border: 1px solid #e0e0e0;
     border-radius: 12px;
     overflow: hidden;
     position: relative;
     transition: all 0.3s ease;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 }

 .course-card-horizontal:hover {
     transform: translateY(-4px);
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
     border-color: #007bff;
 }

 /* Course Discount Badge */
 .course-discount-badge {
     position: absolute;
     top: 12px;
     left: 12px;
     background: #d73502;
     color: white;
     padding: 6px 10px;
     font-size: 12px;
     font-weight: 700;
     border-radius: 6px;
     z-index: 5;
 }

 /* Course Image */
 .course-image-link {
     display: block;
     position: relative;
     overflow: hidden;
     aspect-ratio: 4/3;
 }

 .course-image-link img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     transition: transform 0.3s ease;
 }

 .course-card-horizontal:hover .course-image-link img {
     transform: scale(1.08);
 }

 /* Course Content */
 .course-content {
     padding: 20px;
 }

 /* Course Badges */
 .course-badges {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 12px;
 }

 .course-category-badge {
     background: #e7f3ff;
     color: #007185;
     padding: 4px 8px;
     font-size: 10px;
     font-weight: 700;
     border-radius: 4px;
     text-transform: uppercase;
     letter-spacing: 0.5px;
 }

 .course-level-badge {
     padding: 4px 8px;
     font-size: 10px;
     font-weight: 600;
     border-radius: 4px;
     text-transform: capitalize;
 }

 .level-beginner {
     background: #e8f5e8;
     color: #2e7d2e;
 }

 .level-intermediate {
     background: #fff3cd;
     color: #856404;
 }

 .level-advanced {
     background: #f8d7da;
     color: #721c24;
 }

 /* Course Title */
 .course-title-link {
     text-decoration: none;
     display: block;
     margin-bottom: 12px;
 }

 .course-title-link h5 {
     font-size: 16px;
     font-weight: 700;
     color: #0f1111;
     line-height: 1.4;
     margin: 0;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
 }

 .course-title-link:hover h5 {
     color: #c7511f;
 }

 /* Course Instructor */
 .course-instructor {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-bottom: 8px;
 }

 .instructor-img {
     width: 20px;
     height: 20px;
     border-radius: 50%;
     object-fit: cover;
 }

 .course-instructor span {
     font-size: 12px;
     color: #565959;
     font-weight: 500;
 }

 /* Course Duration */
 .course-duration {
     display: flex;
     align-items: center;
     gap: 6px;
     margin-bottom: 12px;
     font-size: 12px;
     color: #565959;
 }

 .course-duration i {
     font-size: 14px;
     color: #888;
 }

 /* Course Rating */
 .course-rating {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-bottom: 8px;
 }

 .stars {
     display: flex;
     gap: 2px;
 }

 .stars i {
     font-size: 12px;
     color: #ddd;
 }

 .stars i.filled {
     color: #ff9900;
 }

 .rating-score {
     font-size: 12px;
     color: #007185;
     font-weight: 600;
 }

 /* Students Enrolled */
 .students-enrolled {
     display: flex;
     align-items: center;
     gap: 6px;
     margin-bottom: 12px;
     font-size: 12px;
     color: #565959;
 }

 .students-enrolled i {
     font-size: 14px;
     color: #888;
 }

 /* Course Price */
 .course-price-section {
     margin-bottom: 15px;
 }

 .price-display {
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .current-price {
     font-size: 20px;
     font-weight: 700;
     color: #b12704;
 }

 .original-price {
     font-size: 14px;
     color: #565959;
     text-decoration: line-through;
 }

 .free-course {
     font-size: 20px;
     font-weight: 700;
     color: #007600;
 }

 /* Enroll Button */
 .course-enroll-btn {
     background: #ff9900;
     color: #0f1111;
     padding: 10px 16px;
     border-radius: 8px;
     text-decoration: none;
     font-size: 14px;
     font-weight: 700;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
     transition: all 0.3s ease;
     margin-bottom: 12px;
     text-transform: uppercase;
     letter-spacing: 0.5px;
 }

 .course-enroll-btn:hover {
     background: #fa8900;
     color: #0f1111;
     transform: translateY(-1px);
     box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
 }

 .course-enroll-btn i {
     font-size: 16px;
 }

 /* Course Lessons Info */
 .course-lessons-info {
     display: flex;
     align-items: center;
     gap: 6px;
     font-size: 12px;
     color: #565959;
     padding-top: 8px;
     border-top: 1px solid #f0f0f0;
 }

 .course-lessons-info i {
     font-size: 14px;
     color: #888;
 }

 /* No Courses Available */
 .no-courses-available {
     text-align: center;
     padding: 60px 20px;
     color: #565959;
     font-size: 16px;
 }

 /* ===== RESPONSIVE DESIGN ===== */

 /* Large Desktop (1200px and above) */
 @media (min-width: 1200px) {
     .horizontal-course-container {
         gap: 24px;
     }

     .course-card-horizontal {
         min-width: 300px;
         max-width: 300px;
     }
 }

 /* Desktop (992px to 1199px) */
 @media (min-width: 992px) and (max-width: 1199px) {
     .course-card-horizontal {
         min-width: 270px;
         max-width: 270px;
     }
 }

 /* Tablet (768px to 991px) */
 @media (min-width: 768px) and (max-width: 991px) {
     .ed-course {
         padding: 50px 0;
     }

     .horizontal-course-container {
         gap: 16px;
         padding: 16px 0;
     }

     .course-card-horizontal {
         min-width: 250px;
         max-width: 250px;
     }

     .course-nav-left {
         left: -15px;
     }

     .course-nav-right {
         right: -15px;
     }
 }

 /* Mobile (767px and below) */
 @media (max-width: 767px) {
     .ed-course {
         padding: 40px 0;
     }

     .ed-section-head__title {
         font-size: 24px;
     }

     .horizontal-course-container {
         gap: 12px;
         padding: 12px 0;
     }

     .course-card-horizontal {
         min-width: 220px;
         max-width: 220px;
     }

     .course-content {
         padding: 16px;
     }

     .course-nav-arrow {
         width: 35px;
         height: 35px;
     }

     .course-nav-left {
         left: -10px;
     }

     .course-nav-right {
         right: -10px;
     }
 }

 /* Extra Small Mobile (575px and below) */
 @media (max-width: 575px) {
     .course-card-horizontal {
         min-width: 200px;
         max-width: 200px;
     }

     .course-content {
         padding: 12px;
     }

     .course-title-link h5 {
         font-size: 14px;
     }

     .current-price {
         font-size: 18px;
     }

     .course-enroll-btn {
         padding: 8px 12px;
         font-size: 12px;
     }
 }

 /* Animation Keyframes */
 @keyframes rotate-ani {
     0% {
         transform: rotate(0deg);
     }

     100% {
         transform: rotate(360deg);
     }
 }

 @keyframes updown-ani {

     0%,
     100% {
         transform: translateY(0px);
     }

     50% {
         transform: translateY(-15px);
     }
 }

 .rotate-ani {
     animation: rotate-ani 20s linear infinite;
 }

 .updown-ani {
     animation: updown-ani 4s ease-in-out infinite;
 }

 /* ===== MODERN CONTACT WIDGET DESIGN ===== */

 .contact-widget-modern {
     background: #f8f9fb !important;
     border-radius: 16px !important;
     padding: 24px !important;
     margin-bottom: 24px !important;
     box-shadow: none !important;
     border: 1px solid #e8eaf2 !important;
 }

 .contact-widget-title {
     font-size: 18px !important;
     font-weight: 700 !important;
     color: #2c3e50 !important;
     margin-bottom: 20px !important;
     text-align: left !important;
     position: relative !important;
     padding-bottom: 0 !important;
 }

 .contact-widget-title::after {
     display: none !important;
 }

 /* Contact Info Cards */
 .contact-info-card {
     background: #ffffff !important;
     border-radius: 12px !important;
     padding: 20px !important;
     margin-bottom: 16px !important;
     display: flex !important;
     align-items: flex-start !important;
     gap: 16px !important;
     border: 1px solid #e8eaf2 !important;
     transition: all 0.3s ease !important;
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
 }

 .contact-info-card:last-child {
     margin-bottom: 0 !important;
 }

 .contact-info-card:hover {
     transform: translateY(-2px) !important;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
     border-color: #007bff !important;
 }

 /* Contact Icon Wrapper */
 .contact-icon-wrapper {
     flex-shrink: 0 !important;
 }

 .contact-icon-bg {
     width: 50px !important;
     height: 50px !important;
     border-radius: 12px !important;
     display: flex !important;
     align-items: center !important;
     justify-content: center !important;
     position: relative !important;
     overflow: hidden !important;
 }

 /* Different background colors for each contact type */
 .support-bg {
     background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%) !important;
 }

 .message-bg {
     background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%) !important;
 }

 .location-bg {
     background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%) !important;
 }

 .contact-icon-bg img {
     width: 24px !important;
     height: 24px !important;
     filter: brightness(0) invert(1) !important;
     z-index: 2 !important;
     position: relative !important;
 }

 /* Contact Details */
 .contact-details {
     flex: 1 !important;
     min-width: 0 !important;
 }

 .contact-title {
     font-size: 16px !important;
     font-weight: 600 !important;
     color: #2c3e50 !important;
     margin: 0 0 6px 0 !important;
     line-height: 1.3 !important;
 }

 .contact-link {
     color: #6c7293 !important;
     font-size: 14px !important;
     font-weight: 500 !important;
     text-decoration: none !important;
     line-height: 1.4 !important;
     display: block !important;
     transition: color 0.3s ease !important;
     word-wrap: break-word !important;
     overflow-wrap: break-word !important;
 }

 .contact-link:hover {
     color: #007bff !important;
 }

 /* Special styling for location text */
 .location-text {
     max-width: 180px !important;
     word-break: break-word !important;
     white-space: normal !important;
 }

 /* ===== RESPONSIVE DESIGN ===== */

 /* Large Desktop (1200px and above) */
 @media (min-width: 1200px) {
     .contact-widget-modern {
         padding: 28px !important;
     }

     .contact-info-card {
         padding: 22px !important;
         gap: 18px !important;
     }

     .contact-icon-bg {
         width: 55px !important;
         height: 55px !important;
     }

     .contact-icon-bg img {
         width: 26px !important;
         height: 26px !important;
     }

     .contact-title {
         font-size: 17px !important;
     }

     .contact-link {
         font-size: 15px !important;
     }
 }

 /* Desktop (992px to 1199px) */
 @media (min-width: 992px) and (max-width: 1199px) {
     .contact-widget-modern {
         padding: 22px !important;
     }

     .contact-info-card {
         padding: 18px !important;
     }
 }

 /* Tablet (768px to 991px) */
 @media (min-width: 768px) and (max-width: 991px) {
     .contact-widget-modern {
         padding: 20px !important;
         margin-bottom: 20px !important;
     }

     .contact-info-card {
         padding: 16px !important;
         gap: 14px !important;
         margin-bottom: 14px !important;
     }

     .contact-icon-bg {
         width: 45px !important;
         height: 45px !important;
     }

     .contact-icon-bg img {
         width: 22px !important;
         height: 22px !important;
     }

     .contact-title {
         font-size: 15px !important;
     }

     .contact-link {
         font-size: 13px !important;
     }

     .location-text {
         max-width: 160px !important;
     }
 }

 /* Mobile (767px and below) */
 @media (max-width: 767px) {
     .contact-widget-modern {
         padding: 18px !important;
         border-radius: 12px !important;
         margin-bottom: 18px !important;
     }

     .contact-widget-title {
         font-size: 16px !important;
         margin-bottom: 16px !important;
         text-align: center !important;
     }

     .contact-info-card {
         padding: 14px !important;
         gap: 12px !important;
         margin-bottom: 12px !important;
         border-radius: 10px !important;
     }

     .contact-icon-bg {
         width: 42px !important;
         height: 42px !important;
         border-radius: 10px !important;
     }

     .contact-icon-bg img {
         width: 20px !important;
         height: 20px !important;
     }

     .contact-title {
         font-size: 14px !important;
         margin-bottom: 4px !important;
     }

     .contact-link {
         font-size: 12px !important;
     }

     .location-text {
         max-width: 140px !important;
         font-size: 11px !important;
         line-height: 1.3 !important;
     }
 }

 /* Extra Small Mobile (575px and below) */
 @media (max-width: 575px) {
     .contact-widget-modern {
         padding: 16px !important;
     }

     .contact-info-card {
         padding: 12px !important;
         gap: 10px !important;
         flex-direction: column !important;
         text-align: center !important;
     }

     .contact-icon-wrapper {
         align-self: center !important;
     }

     .contact-icon-bg {
         width: 40px !important;
         height: 40px !important;
     }

     .contact-icon-bg img {
         width: 18px !important;
         height: 18px !important;
     }

     .contact-details {
         text-align: center !important;
     }

     .location-text {
         max-width: none !important;
         font-size: 12px !important;
     }
 }

 /* Accessibility improvements */
 .contact-link:focus {
     outline: 2px solid #007bff !important;
     outline-offset: 2px !important;
     border-radius: 4px !important;
 }

 /* Reduce motion for users who prefer it */
 @media (prefers-reduced-motion: reduce) {

     .contact-info-card,
     .contact-link {
         transition: none !important;
     }

     .contact-info-card:hover {
         transform: none !important;
     }
 }

 /* Print styles */
 @media print {
     .contact-widget-modern {
         box-shadow: none !important;
         border: 1px solid #ccc !important;
     }

     .contact-info-card {
         box-shadow: none !important;
         border: 1px solid #ddd !important;
     }
 }

 /* Container holding the logos */
 .logo-container {
     display: flex;
     flex-wrap: nowrap;
     /* Prevent wrapping */
     justify-content: center;
     /* Center horizontally */
     align-items: center;
     /* Center vertically */
     gap: 10px;
     /* Space between logos */
     overflow-x: auto;
     /* Allow horizontal scrolling if too wide */
     padding: 10px 0;
 }

 /* Make logos responsive */
 .logo-container img {
     max-height: 50px;
     /* Adjust max height as needed */
     width: auto;
     object-fit: contain;
 }

 /* Optional: Hide scrollbar in some browsers */
 .logo-container::-webkit-scrollbar {
     display: none;
 }

 .logo-container {
     -ms-overflow-style: none;
     /* IE and Edge */
     scrollbar-width: none;
     /* Firefox */
 }

 /* Responsive fix: Ensure single line on mobile */
 @media (max-width: 767px) {
     .logo-container {
         justify-content: flex-start;
         /* Align left on small screens */
     }

     .logo-container img {
         max-height: 40px;
         /* Slightly smaller on mobiles */
     }
 }

 /* ===== MODERN LOGIN MODAL DESIGN ===== */

/* Modal Backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
}

/* Modern Login Modal */
.modern-login-modal {
    border-radius: 20px !important;
    border: none !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

/* Modal Header */
.login-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none !important;
    padding: 30px !important;
    position: relative;
}

.login-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.login-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.login-icon-wrapper i {
    font-size: 24px;
    color: #ffffff;
}

.modal-title {
    color: #ffffff !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.2;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Custom Close Button */
.btn-close-custom {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.btn-close-custom:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.btn-close-custom i {
    font-size: 18px;
    color: #ffffff;
}

/* Modal Body */
.login-modal-body {
    padding: 40px !important;
    background: #ffffff;
}

/* Form Group Modern */
.form-group-modern {
    margin-bottom: 24px;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-label-modern i {
    font-size: 16px;
    color: #667eea;
}

/* Form Control Modern */
.form-control-modern {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e8eaf2;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fb;
    color: #2c3e50;
    font-weight: 500;
}

.form-control-modern:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control-modern::placeholder {
    color: #a0a0a0;
    font-weight: 400;
}

.form-control-modern.is-invalid {
    border-color: #e74c3c;
    background: #fff5f5;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control-modern {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #6c7293;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

.password-toggle i {
    font-size: 18px;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

.error-message i {
    font-size: 14px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.remember-me label {
    font-size: 14px;
    color: #6c7293;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.forgot-password-link {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Login Submit Button */
.btn-login-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-login-submit:active {
    transform: translateY(0);
}

.btn-login-submit i {
    font-size: 18px;
}

/* Login Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e8eaf2;
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.login-divider span {
    background: #ffffff;
    padding: 0 16px;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
}

/* Register Section */
.register-section {
    text-align: center;
}

.register-section p {
    color: #6c7293;
    font-size: 15px;
    margin: 0;
}

.register-link {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .modal-dialog {
        max-width: 480px !important;
    }
}

/* Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .modal-dialog {
        max-width: 460px !important;
    }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .modal-dialog {
        max-width: 520px !important;
        margin: 1.75rem auto !important;
    }
    
    .login-modal-header {
        padding: 24px !important;
    }
    
    .login-modal-body {
        padding: 32px !important;
    }
    
    .modal-title {
        font-size: 22px !important;
    }
    
    .login-icon-wrapper {
        width: 45px;
        height: 45px;
    }
    
    .login-icon-wrapper i {
        font-size: 22px;
    }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
    }
    
    .login-modal-header {
        padding: 20px !important;
    }
    
    .login-header-content {
        gap: 12px;
    }
    
    .login-icon-wrapper {
        width: 42px;
        height: 42px;
    }
    
    .login-icon-wrapper i {
        font-size: 20px;
    }
    
    .modal-title {
        font-size: 20px !important;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .btn-close-custom {
        width: 32px;
        height: 32px;
    }
    
    .btn-close-custom i {
        font-size: 16px;
    }
    
    .login-modal-body {
        padding: 28px 20px !important;
    }
    
    .form-group-modern {
        margin-bottom: 20px;
    }
    
    .form-control-modern {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-login-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Extra Small Mobile (575px and below) */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .login-modal-header {
        padding: 18px !important;
        flex-wrap: wrap;
    }
    
    .login-header-content {
        flex-direction: row;
        text-align: left;
    }
    
    .login-icon-wrapper {
        width: 38px;
        height: 38px;
    }
    
    .login-icon-wrapper i {
        font-size: 18px;
    }
    
    .modal-title {
        font-size: 18px !important;
    }
    
    .login-subtitle {
        font-size: 12px;
    }
    
    .login-modal-body {
        padding: 24px 16px !important;
    }
    
    .form-label-modern {
        font-size: 13px;
    }
    
    .form-control-modern {
        padding: 11px 12px;
        font-size: 14px;
    }
    
    .btn-login-submit {
        padding: 13px 18px;
        font-size: 14px;
    }
    
    .remember-me label,
    .forgot-password-link {
        font-size: 13px;
    }
    
    .register-section p {
        font-size: 14px;
    }
}

/* Animation for modal */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* iOS Safari Modal Fixes */
@supports (-webkit-touch-callout: none) {
    /* Target only iOS devices */
    
    /* Fix modal backdrop z-index */
    .modal-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 1040 !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    /* Fix modal dialog positioning */
    .modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 1050 !important;
        width: 100% !important;
        height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .modal-dialog {
        position: relative !important;
        z-index: 1051 !important;
        transform: none !important;
    }
    
    /* Prevent body scroll when modal is open */
    body.modal-open {
        position: fixed !important;
        width: 100% !important;
        overflow: hidden !important;
        -webkit-overflow-scrolling: auto !important;
    }
}

