/* Brand Logo & Text Styles */
.logo-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-decoration: none !important;
}

.logo-img {
    height: 43px;
    width: auto;
    margin-right: 15px;
    flex-shrink: 0 !important;
}

.logo-text {
    font-size: 30px;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    letter-spacing: -1px;
    white-space: nowrap;
    flex-shrink: 0 !important;
}

.header-logo-text {
    color: #ffffff;
}

.footer-logo-text {
    color: #2C2B5E;
}

/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 23, 23, 0.8);
    z-index: 9999;
    animation: fadeIn 0.4s ease-in-out;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 95%;
    min-height: 500px;
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

.popup-inner {
    display: flex;
    align-items: stretch;
    min-height: 500px;
}

.popup-image {
    flex: 1;
    background: linear-gradient(135deg, #EC1C23, #d41419);
    padding: 60px 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.popup-text {
    flex: 1;
    padding: 60px 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #EC1C23;
}

.popup-text h2 {
    color: #2c3e50;
    font-size: 32px;
    margin: 0 0 20px 0;
    line-height: 1.2;
    font-weight: 800;
}

.popup-text h3 {
    color: #7f8c8d;
    font-size: 20px;
    margin: 0 0 35px 0;
    font-weight: 500;
    line-height: 1.5;
}

.popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EC1C23, #d41419);
    color: white;
    padding: 18px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(236, 28, 35, 0.2);
    width: 100%;
    max-width: 320px;
}

.popup-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(236, 28, 35, 0.3);
    color: #fff;
}

.popup-btn:active {
    transform: translateY(-1px);
}

box-shadow: 0 5px 15px rgba(236, 28, 35, 0.3);
margin-top: 10px;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 28, 35, 0.4);
    color: white;
    text-decoration: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 991px) {

    /* Tablet: Side-by-side but compact */
    .popup-content {
        max-width: 850px;
        width: 95%;
        min-height: 400px;
    }

    .popup-inner {
        min-height: 400px;
        display: flex;
        flex-direction: row;
    }

    .popup-image {
        flex: 1;
        padding: 30px;
        min-height: auto;
    }

    .popup-text {
        flex: 1.2;
        padding: 40px 30px;
    }

    .popup-text h2 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {

    /* Mobile: Stacked with balanced proportions */
    .popup-content {
        width: 90%;
        max-width: 400px;
        height: auto;
        max-height: 85vh;
        /* Keep it within view */
        display: flex;
        flex-direction: column;
        border-radius: 15px;
        margin: 0 auto;
    }

    .popup-inner {
        flex-direction: column;
        min-height: 0;
        height: 100%;
        overflow-y: auto;
        display: flex;
    }

    /* Header Image Section */
    .popup-image {
        flex: 0 0 auto;
        padding: 25px 20px;
        /* More breathing room */
        min-height: auto;
        justify-content: center;
        background: linear-gradient(135deg, #EC1C23, #d41419);
    }

    .popup-image img {
        max-height: 140px;
        /* Larger, clearer image */
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    /* Content Section */
    .popup-text {
        flex: 1 0 auto;
        padding: 25px 20px;
        text-align: center;
    }

    .popup-text h2 {
        font-size: 24px;
        margin-bottom: 5px;
        color: #333;
    }

    .popup-text h3 {
        font-size: 16px;
        margin-bottom: 12px;
        color: #666;
    }

    .price {
        font-size: 22px;
    }

    .benefits {
        margin: 15px 0;
        text-align: center;
    }

    .benefits li {
        font-size: 14px;
        margin: 8px 0;
        color: #555;
    }

    .popup-btn {
        display: inline-block;
        padding: 10px 20px;
        font-size: 13px;
        margin-top: 10px;
        width: auto;
        min-width: 160px;
        border-radius: 50px;
    }

    /* Close Button */
    .popup-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
        color: rgba(255, 255, 255, 0.95);
        background: transparent;
        width: auto;
        height: auto;
        line-height: 1;
        box-shadow: none;
    }
}

@media (max-width: 360px) {

    /* Adjustments for very small screens (iPhone SE, etc) */
    .popup-content {
        width: 95%;
    }

    .popup-image {
        padding: 20px 15px;
    }

    .popup-image img {
        max-height: 110px;
        /* Slightly smaller but still visible */
    }

    .popup-text {
        padding: 20px 15px;
    }

    .popup-text h2 {
        font-size: 20px;
    }

    .popup-text h3 {
        font-size: 15px;
    }

    .popup-btn {
        width: 100%;
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* ========================================
   Course Modal Styles
   ======================================== */
.course-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 23, 23, 0.85);
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
    padding: 40px 20px;
}

.course-modal-content {
    background: #fff;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: courseModalIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.course-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    line-height: 1;
}

.course-modal-close:hover {
    color: #ffd700;
    transform: scale(1.2);
}

.course-modal-header {
    background: linear-gradient(135deg, #2C2B5E, #1a1a40);
    padding: 35px 30px 25px;
    text-align: center;
}

.course-modal-header h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-modal-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.course-modal-body {
    padding: 30px;
}

.course-modal-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #EC1C23;
}

.course-info-item {
    padding: 8px 0;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.course-info-item i {
    color: #EC1C23;
    font-size: 16px;
    min-width: 20px;
    margin-top: 3px;
}

.course-info-item strong {
    color: #2C2B5E;
    margin-right: 5px;
}

.course-modal-benefits h4 {
    color: #2C2B5E;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.course-modal-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-modal-benefits ul li {
    position: relative;
    padding: 8px 0 8px 28px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}

.course-modal-benefits ul li:last-child {
    border-bottom: none;
}

.course-modal-benefits ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 14px;
}

.course-modal-footer {
    padding: 0 30px 30px;
    text-align: center;
}

.course-demo-btn {
    display: inline-block;
    background: linear-gradient(135deg, #EC1C23, #d41419);
    color: #fff !important;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 17px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(236, 28, 35, 0.3);
    letter-spacing: 0.5px;
}

.course-demo-btn i {
    margin-right: 8px;
    font-size: 20px;
    color: #25D366;
}

.course-demo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(236, 28, 35, 0.4);
    color: #fff !important;
    text-decoration: none !important;
}

/* Course Modal Responsive */
@media (max-width: 768px) {
    .course-modal {
        padding: 20px 15px;
    }

    .course-modal-content {
        border-radius: 12px;
    }

    .course-modal-header {
        padding: 25px 20px 20px;
    }

    .course-modal-header h2 {
        font-size: 20px;
    }

    .course-modal-tagline {
        font-size: 13px;
    }

    .course-modal-body {
        padding: 20px;
    }

    .course-modal-info {
        padding: 15px;
    }

    .course-info-item {
        font-size: 13px;
    }

    .course-modal-footer {
        padding: 0 20px 25px;
    }

    .course-demo-btn {
        padding: 13px 30px;
        font-size: 15px;
        width: 100%;
    }
}

@keyframes courseModalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Course card sizing & button centering */
.courses-area .row {
    justify-content: center;
}

.courses-area .row>[class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

@media (min-width: 992px) {
    .courses-area .row>.col-lg-3 {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

.courses-area .single-course .course-img img {
    width: 100%;
    height: auto;
}


/* Mobile Spacing Adjustments */
@media (max-width: 991px) {

    /* Testimonials */
    .testimonial-area.pt-110 {
        padding-top: 20px !important;
    }

    /* About Us - reduce bottom space to help "Why Choose Us" gap */
    .about-area {
        padding-bottom: 20px !important;
    }

    /* Why Choose Us */
    .notice-area {
        padding-top: 10px !important;
        padding-bottom: 20px !important;
    }

    .notice-left,
    .notice-right {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    /* Meet Our Faculty */
    .teacher-area {
        padding-top: 35px !important;
        padding-bottom: 10px !important;
    }

    .teacher-area .section-title {
        margin-bottom: 20px !important;
    }

    .teacher-area .section-title h2 {
        margin-top: 0 !important;
    }

    /* Our Courses */
    .courses-area {
        padding-top: 15px !important;
    }

    .courses-area .section-title {
        margin-bottom: 45px !important;
    }

    .courses-area .section-title h2 {
        margin-top: 0 !important;
    }

    /* Slogan Text */
    .slogan-text {
        font-size: 22px !important;
        line-height: 1.4 !important;
    }

    /* Slogan Area Spacing */
    .subscribe-area {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
        margin-top: 0px !important;
        margin-bottom: 0px !important;
    }

    /* Logo Mobile Size & Alignment */
    .logo {
        padding-top: 20px !important;
        padding-bottom: 10px !important;
    }
    .logo-img {
        height: 32px !important;
        margin-right: 10px !important;
    }
    .logo-text {
        font-size: 22px !important;
    }
}