* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove extra margin from body when embedded */
body {
    margin: 0;
    padding: 0;
}

/* Remove top margin from main container */
.products-section {
    margin-top: 0;
    padding-top: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px; /* Reduced from 60px */
    margin-top: 0; /* Ensure no top margin */
    padding-top: 0; /* Remove any top padding */
    animation: fadeInDown 0.8s ease;
}

.section-title h2 {
    font-size: 3.8rem; /* Increased from 2.8rem */
    background: linear-gradient(135deg, #ffe6b3, #ffd700, #ffb347);
    -webkit-background-clip: text;
    background-clip: text;
    color: green;
    margin-bottom: 20px;
    margin-top: 0; /* Remove top margin */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.section-title p {
    color: green;
    font-size: 1.5rem; /* Increased from 1.2rem */
    margin-top: 0; /* Remove top margin */
}

/* Grid wrapper for centering */
.cards-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* Alternative: If you want exactly 3 columns on desktop with centering */
@media (min-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
    }
}

/* For 2 columns on medium screens */
@media (min-width: 768px) and (max-width: 1023px) {
    .cards-container {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
}

.course-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.2, 0.95, 0.4, 1.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 620px; /* Increased from 540px */
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    will-change: transform, box-shadow;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 55px rgba(0, 0, 0, 0.25);
}

.card-image {
    position: relative;
    width: 100%;
    height: auto; /* Increased from 240px */
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.course-card:hover .card-image img {
    transform: scale(1.1);
}

.discount-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #FF2400, #E34234, #FF0800);
    color: #fff; 
    padding: 10px 20px; /* Increased from 8px 16px */
    border-radius: 50px;
    font-size: 18px; /* Increased from 14px */
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
    backdrop-filter: blur(5px);
    border: 1px solid #ffd700;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
        border-color: #ffea00;
    }
}

.coupon-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: #ffd700;
    padding: 8px 18px; /* Increased from 6px 14px */
    border-radius: 50px;
    font-size: 13px; /* Increased from 11px */
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 1px;
    z-index: 2;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.card-content {
    padding: 10px; /* Increased from 24px */
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.course-name {
    text-align: center;
    font-size: 2.3rem; /* Increased from 1.35rem */
    font-weight: 800;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
    margin-top: 0; /* Remove top margin */
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-description {
    text-align: justify;
    color: #555;
    font-size: 1.05rem; /* Increased from 0.92rem */
    line-height: 1.8; /* Increased from 1.7 */
    margin-bottom: 24px;
    margin-top: 0; /* Remove top margin */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.details-link {
    text-decoration: none;
    text-align: center;
    display: block;
    color: #667eea;
    font-weight: 600;
    font-size: 1.6rem; /* Added larger font size */
    margin-bottom: 18px;
    margin-top: 0; /* Remove top margin */
    transition: color 0.3s ease;
}

.details-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.price-wrapper {
    text-align: center;
    padding: 22px; /* Increased from 18px */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 24px; /* Increased from 20px */
    margin: 12px 0;
    margin-top: 0; /* Remove top margin */
}

.original-price {
    color: black;
    text-decoration: line-through;
    font-size: 1.9rem; /* Increased from 1.2rem */
    font-weight: 800;
}

.discount-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px; /* Increased from 12px */
}

.discount-info > div {
    text-align: center;
    width: 100%;
}

.original-price, 
.current-price, 
.price-normal {
    display: inline-block;
}

.current-price {
    font-size: 2rem; /* Increased from 1.6rem */
    font-weight: 800;
    background: linear-gradient(135deg, #ee5a24, #ff4757);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-top: 6px;
}

.price-normal {
    font-size: 2.3rem; /* Increased from 1.9rem */
    font-weight: 900;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.price-unit {
    font-size: 1rem; /* Increased from 0.85rem */
    color: #6c757d;
    font-weight: normal;
}

.saved-amount {
    background: linear-gradient(135deg, #38ef7d, #11998e);
    color: white;
    padding: 10px 22px; /* Increased from 8px 18px */
    border-radius: 50px;
    font-size: 1.4rem; /* Increased from 0.85rem */
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(56, 239, 125, 0.3);
    text-align: center;
    justify-content: center;
}

.enroll-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 16px 32px; /* Increased from 14px 28px */
    border-radius: 60px;
    text-decoration: none;
    font-weight: 800;
    font-size: 2rem; /* Increased from 1rem */
    margin-top: 18px;
    margin-bottom: 0; /* Remove bottom margin */
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.enroll-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.enroll-btn:hover::before {
    width: 350px;
    height: 350px;
    text-decoration: none;
}

.enroll-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    text-decoration: none;
}

.load-more-container {
    text-align: center;
    margin-top: 40px; /* Reduced from 60px */
    margin-bottom: 20px;
    padding-top: 0; /* Remove top padding */
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 16px 48px; /* Increased from 14px 40px */
    font-size: 1.25rem; /* Increased from 1.1rem */
    font-weight: bold;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: inline-block;
    width: 24px; /* Increased from 20px */
    height: 24px; /* Increased from 20px */
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scroll-trigger {
    height: 24px;
    margin: 20px 0; /* Reduced from 36px 0 */
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 1rem; /* Added font size */
}

.no-data {
    text-align: center;
    padding: 80px;
    font-size: 1.4rem; /* Increased from 1.2rem */
    color: white;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    grid-column: 1 / -1;
}

.scroll-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 55px; /* Increased from 50px */
    height: 55px; /* Increased from 50px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    font-size: 28px; /* Increased from 24px */
    border: none;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* ========== FIXED MOBILE VIEW - LARGER FONTS ========== */
@media (max-width: 768px) {
    body {
        padding: 0px; /* Reduced from 30px 15px */
        font-size: 18px; /* Increased from 16px */
    }
    
    .cards-wrapper {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .section-title {
        margin-bottom: 30px; /* Reduced from 40px */
        margin-top: 0;
    }
    
    .section-title h2 {
        font-size: 2.4rem; /* Increased from 2.6rem - better readable */
        margin-bottom: 15px;
        margin-top: 0;
    }
    
    .section-title p {
        font-size: 1.3rem; /* Increased from 1.25rem */
        line-height: 1.4;
        margin-top: 0;
    }
    
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-top: 0;
    }
    
    .course-card {
        min-height: auto;
    }
    
    .card-image {
        height: 250px; /* Slightly larger for mobile */
    }
    
    .discount-badge {
        font-size: 18px; /* Increased from 16px */
        padding: 8px 18px;
        top: 12px;
        right: 12px;
    }
    
    .coupon-badge {
        font-size: 15px; /* Increased from 13px */
        padding: 6px 16px;
        top: 12px;
        left: 12px;
    }
    
    .card-content {
        padding: 22px;
    }
    
    .course-name {
        font-size: 1.8rem; /* Increased from 2rem - better for mobile */
        margin-bottom: 12px;
        margin-top: 0;
    }
    
    .short-description {
        font-size: 1rem; /* Increased from 0.95rem */
        line-height: 1.6;
        margin-bottom: 18px;
        margin-top: 0;
    }
    
    .details-link {
        font-size: 1.5rem; /* Increased from default */
        margin-bottom: 15px;
        margin-top: 0;
    }
    
    .price-wrapper {
        padding: 18px;
        margin-top: 0;
    }
    
    .original-price {
        font-size: 1.3rem; /* Increased from default */
    }
    
    .current-price {
        font-size: 1.6rem; /* Increased from 1.8rem - adjusted for mobile */
    }
    
    .price-normal {
        font-size: 1.7rem; /* Increased from 2rem - adjusted for mobile */
    }
    
    .price-unit {
        font-size: 1rem;
    }
    
    .saved-amount {
        font-size: 1.1rem; /* Increased from default */
        padding: 8px 18px;
    }
    
    .enroll-btn {
        font-size: 1.6rem; /* Increased from 1rem */
        padding: 14px 28px;
        margin-top: 15px;
    }
    
    .load-more-container {
        margin-top: 30px; /* Reduced from 40px */
        margin-bottom: 15px;
    }
    
    .load-more-btn {
        padding: 14px 40px;
        font-size: 1.2rem;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .no-data {
        padding: 50px 20px;
        font-size: 1.2rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        padding: 0px; /* Reduced padding for very small screens */
    }
    
    .cards-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 20px; /* Reduced from 24px */
        margin-top: 0;
    }
    
    .course-card {
        min-height: auto;
    }
    
    .section-title {
        margin-bottom: 20px; /* Reduced from 30px */
        margin-top: 0;
    }
    
    .section-title h2 {
        font-size: 2rem; /* Larger for small phones */
        margin-top: 0;
    }
    
    .section-title p {
        font-size: 1.2rem;
        margin-top: 0;
    }
    
    .card-image {
        height: 220px;
    }
    
    .course-name {
        font-size: 1.6rem; /* Comfortable reading size */
        margin-top: 0;
    }
    
    .short-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-top: 0;
    }
    
    .details-link {
        font-size: 1.4rem;
        margin-top: 0;
    }
    
    .original-price {
        font-size: 1.2rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .price-normal {
        font-size: 1.5rem;
    }
    
    .saved-amount {
        font-size: 1rem;
        padding: 6px 15px;
    }
    
    .enroll-btn {
        font-size: 1.5rem;
        padding: 12px 24px;
    }
    
    .load-more-container {
        margin-top: 20px;
        margin-bottom: 10px;
    }
    
    .load-more-btn {
        padding: 12px 32px;
        font-size: 1.1rem;
    }
    
    .discount-badge {
        font-size: 16px;
        padding: 6px 14px;
    }
    
    .coupon-badge {
        font-size: 13px;
        padding: 5px 12px;
    }
}

/* Landscape mode for better readability */
@media (max-width: 768px) and (orientation: landscape) {
    .course-card {
        min-height: auto;
    }
    
    .card-image {
        height: 200px;
    }
    
    .short-description {
        -webkit-line-clamp: 3;
    }
}