/* ========== VARIABLES ========== */
:root {
    --primary-color: #0f1c61;
    --accent-color: #4f6df5;
    --secondary-color: #ff6b6b;
    --light-bg: #f9f9f9;
    --card-bg: #fff;
    --dark-text: #333;
    --light-text: #fff;
    --footer-bg: #09001c;
    --accent-yellow: #f1c40f;
    --link-color: #f1c40f;

    --blue-600: #0077b6;
    --blue: #0f1c61;
    --blue-500: #00b4d8;
    --orange-600: #ff6600;
    --green-500: #28a745;
    --card-shadow: 0 6px 18px rgba(6,24,63,0.08);
    --radius: 12px;
    --max-width: 1180px;
}

/* ========== GLOBAL RESET & TYPOGRAPHY ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Poppins", Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background: var(--light-bg);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease;
}
a:hover { color: var(--accent-yellow); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 18px; }

/* ========== TOPBAR ========== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary-color);
    color: var(--light-text);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.topbar .logo a {
    color: var(--light-text);
    font-weight: 800;
    font-size: 1.3rem;
}
nav {
    display: flex;
    gap: 15px;
}
nav a {
    color: var(--light-text);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
nav a:hover { background-color: rgba(255,255,255,0.1); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger span {
    width: 25px; height: 3px;
    background: var(--light-text);
    border-radius: 2px;
    transition: 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    nav {
        display: none;
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--primary-color);
        padding: 15px 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    nav.active { display: flex; }

    .hamburger { display: flex; }}

/* ========== HERO ========== */
.hero {
    text-align: center;
    padding: 100px 20px;
    color: var(--light-text);
    background: linear-gradient(45deg, #0000ff, #ff6600);
}
.hero h1 { font-size: 2.8rem; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 30px; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;

    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn:hover { transform: translateY(-4px); }
.btn-free { background: var(--card-bg); color: var(--primary-color); }
.btn-paid { background: var(--secondary-color); color: var(--light-text); }
.btn-enroll { background: var(--orange-600); color:#fff; }

/* ========== COURSE SECTIONS ========== */
.course-block { margin: 24px 0; }
.course-block-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.block-title { font-size: 20px; color: var(--primary-color); }
.header-controls { display: flex; gap: 10px; }
.arrow {
    background: var(--orange-600); color:#fff;
    padding:0px 5px; border-radius:8px;
    cursor:pointer; font-size:18px;
}
.view-all { color: var(--primary-color); font-weight:600; }
.course-row {
    display:flex; gap:18px; overflow-x:auto; padding:10px 4px 18px;
    scroll-behavior:smooth;
}
.course-card {
    flex:0 0 270px; background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow:hidden; display:flex; flex-direction:column;
}
.course-card:hover { transform: translateY(-8px); }
.thumb-wrap { position:relative; height:150px; overflow:hidden; }
.thumb-wrap img { width:100%; height:100%; object-fit:cover; }
.badge { position:absolute; top:10px; left:10px; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:700; color:#fff; }
.badge-free { background: var(--green-500); }
.badge-paid { background: var(--orange-600); }
.card-content { padding:12px 14px; }
.card-title { font-size:16px; margin:0 0 6px; color: var(--primary-color); }
.card-desc { font-size:13px; color:#586274; min-height:42px; }
.card-meta { display:flex; justify-content:space-between; align-items:center; gap:8px; color:#444; font-weight:600; margin-top:5px; font-size: .8rem;}
.card-actions { display:flex; gap:8px; padding:10px; border-top:1px solid #f1f5f9;     justify-content: space-between}
.btn-detail { background:#fff; border:1px solid #e6eef7;  color:var(--primary-color); border-radius:8px; text-decoration:none; display:inline-block; }

/* ========== HOW TO BUY ========== */
.how-to-buy {
    background:linear-gradient(180deg,#f8fbff, #ffffff);
    padding:28px;
    border-radius:12px;
    margin:28px 0;
}
.buy-steps { display:flex; gap:12px; margin-bottom: 20px; }
.step {
    display:flex; gap:12px; background:#fff; padding:12px;
    border-radius:10px; box-shadow: var(--card-shadow);
}
.step-no {
    width:42px; height:30px; border-radius:10px; background: var(--primary-color);
    color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700;
}

/* ========== WHY JOIN US / BENEFITS ========== */
.why-section, .benefits, .courses, .about-mission, .about-values {
    padding: 10px 20px;
    background: var(--light-bg);
    text-align: center;
}


.why-section h2, .benefits h2, .courses h2,  .about-mission h2, .about-values h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.why-section .benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    background: none; /* Override parent bg */
    padding: 0;
}

.benefit {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}

.benefit.fade-in {
    animation: fadeIn 1s forwards;
    animation-delay: var(--delay);
}

.benefit h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}
.benefit p {
    color: #555;
    font-size: 0.95rem;
}

.benefit:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* ========== BENEFITS (LIST) ========== */
.benefits ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
    margin-bottom: 20px;
}
.benefits ul li {
    background: var(--card-bg);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem;
}
.benefits ul li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* ========== LEARNING SECTION ========== */
.learning{
        padding: 10px 20px;
    background: black;
    text-align: center;
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
}

.learning-card {
    background: linear-gradient(135deg, #fdfbfb, #ebedee);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: center;
}

.learning h2{
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: white;

}

.learning-card h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.learning-card p {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 20px;
}

.learning-card .btn {
    background: var(--accent-color);
    color: var(--light-text);
    padding: 10px 20px;
    font-size: 0.9rem;
    margin-top: auto; /* Push to bottom */
}

.learning-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* ========== ABOUT SECTIONS ========== */
.about-mission {
    max-width: 1000px;
    margin: auto;
    padding: 30px 20px;
}
.about-mission h2 { margin-bottom: 20px; }
.about-mission p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-values {
    background: #f8f9fd;
    padding: 30px 20px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: auto;
}

.value-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.value-card h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 1.2rem;
}
.value-card p {
    font-size: 1rem;
}

/* ========== FOOTER ========== */
.line {
    height: 1px;
    background-color: #bdb5c9;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
}
.line1 { width: 200px; }
.line2 { width: 100px; }
.line3 { width: 150px; }

.footer {
    background-color: var(--footer-bg);
    color: var(--light-text);
    padding: 40px 20px;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer h2 {
    font-size: 2em;
    margin: 1px;
    color: var(--light-text);
    text-align: center;
}

.footer p {
    font-size: 1em;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 25px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-info,
.footer-links,
.footer-social {
    flex: 1;
    min-width: 200px;
}

.footer-info h4,
.footer-links h4,
.footer-social h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
    border-bottom: 1px solid rgb(71, 71, 70);
}

.footer-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
    border-bottom: 1px solid rgb(71, 71, 70);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    font-size: 1em;
    margin-bottom: 5px;
    border-bottom: 1px solid rgb(71, 71, 70);
}

.footer-social {
    /* Change from flex to block to make the heading and icons stack vertically */
    display: block;
    gap: 10px;
}

.footer-social h4 {
    /* The heading needs margin to push the icons down */
    margin-bottom: 10px;
    font-size: 1.5em;
    border-bottom: 1px solid rgb(71, 71, 70);
}

.footer-social a {
    display: inline-block;
    font-size: 1.5em;
    color: var(--light-text);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    margin: 0 5px; /* Add horizontal margin between icons */
}

.footer-social a:hover {
    background-color: var(--accent-yellow);
    color: var(--primary-color);
}

.footer-bottom {
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 10px;
    font-size: 1em;
    text-align: center;
}

.footer .footer-bottom p {
    text-align: center;
    font-size: 1em;
    margin: 1px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--primary-color);
        padding: 15px 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    nav.active { display: flex; }

    .hamburger { display: flex; }

    .hero h1 { font-size: 1.8rem; line-height: 1.3; }
    .hero p { font-size: 1rem; margin-bottom: 20px; }

    .btn-group {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .btn {
        width: 100%;
        font-size: 1rem;
        padding: 10px 10px;
        text-align: center;
    }

    .why-section, .benefits, .courses, .learning, .about-mission, .about-values {
        padding: 50px 15px;
    }

    .why-section h2, .benefits h2, .courses h2, .learning h2, .about-mission h2, .about-values h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    .why-section .benefits {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-content { flex-direction: column; gap: 20px; }
    
    .footer p { text-align: left; }
}
/* ========== RESPONSIVE ========== */
@media (max-width: 900px){
    .hero h1 { font-size:28px; }

}
@media (max-width:520px){
    .course-card { flex:0 0 250px; }
    .thumb-wrap { height:130px; }
    .block-title { font-size:1rem; }
    .arrow { font-size:13px; padding: 2px 7px; }
    .view-all { font-size:.9rem; }
    .buy-steps{flex-wrap:wrap;}
}
