* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.9;
}


/* =========================
   Header
========================= */

header {
    background-color: #171717;
    color: white;
    padding: 18px 20px;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.site-title {
    font-size: 26px;
    font-weight: bold;
}

nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

nav a:hover {
    color: #4dabf7;
}


/* =========================
   Main
========================= */

main {
    max-width: 1100px;
    margin: 0 auto;
}


/* =========================
   Hero
========================= */

.hero {
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 20px;
    background: linear-gradient(135deg, #e8f3ff, #f5f7fa);
}

.hero-content {
    max-width: 750px;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: 42px;
    line-height: 1.5;
    color: #171717;
}

.hero p {
    margin: 0 auto 30px;
    font-size: 20px;
    color: #555;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}


/* =========================
   Buttons
========================= */

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-primary {
    background-color: #1677ff;
    color: white;
}

.btn-primary:hover {
    background-color: #095dcc;
}

.btn-secondary {
    background-color: white;
    color: #1677ff;
    border: 1px solid #1677ff;
}

.btn-secondary:hover {
    background-color: #eef6ff;
}


/* =========================
   Intro Sections
========================= */

.intro,
.why-us {
    background-color: white;
    margin: 30px 20px;
    padding: 35px;
    border-radius: 12px;
}

.intro {
    text-align: right;
}

.why-us {
    text-align: center;
}

.intro h2,
.why-us h2 {
    margin-top: 0;
    color: #222;
    font-size: 27px;
}

.intro h3 {
    margin-top: 30px;
    color: #1677ff;
    font-size: 21px;
}

.intro p {
    color: #555;
    font-size: 16px;
}


/* =========================
   Why Python
========================= */

.why-us > p {
    max-width: 850px;
    margin: 0 auto 25px;
    color: #555;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.feature {
    padding: 25px;
    background-color: #f8fafc;
    border-radius: 10px;
    transition: 0.2s;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.feature h3 {
    margin-top: 0;
    color: #222;
    font-size: 19px;
}

.feature p {
    color: #555;
    margin-bottom: 0;
}

.why-us a,
.intro a {
    color: #1677ff;
    font-weight: bold;
    text-decoration: none;
}

.why-us a:hover,
.intro a:hover {
    text-decoration: underline;
}


/* =========================
   Course Cards
========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.card h2 {
    color: #222;
    font-size: 21px;
}

.card p {
    color: #555;
    font-size: 15px;
}

.card a {
    color: #1677ff;
    text-decoration: none;
    font-weight: bold;
}

.card a:hover {
    text-decoration: underline;
}


/* =========================
   Course Topics
========================= */

#topics {
    scroll-margin-top: 30px;
}

#topics .card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#topics .card a {
    margin-top: auto;
}


/* =========================
   Article Image
========================= */

.article-image {
    margin: 30px 20px;
    text-align: center;
}

.article-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}


/* =========================
   Footer
========================= */

footer {
    text-align: center;
    background-color: #171717;
    color: white;
    padding: 25px;
    margin-top: 40px;
}

footer p {
    margin: 0;
}


/* =========================
   Error Page
========================= */

.error-page {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

.error-page h1 {
    color: #222;
    font-size: 32px;
}

.error-page p {
    max-width: 650px;
    margin: 0 auto 30px;
    color: #555;
}


/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

    .header-container {
        flex-direction: column;
    }

    .site-title {
        font-size: 24px;
    }

    nav {
        gap: 15px;
    }

    .hero {
        min-height: 380px;
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .intro,
    .why-us {
        margin: 20px 15px;
        padding: 25px 20px;
    }

    .intro h2,
    .why-us h2 {
        font-size: 24px;
    }
}


/* =========================
   Small Mobile
========================= */

@media (max-width: 480px) {

    header {
        padding: 15px;
    }

    nav {
        gap: 10px;
        font-size: 14px;
    }

    .hero {
        padding: 50px 15px;
    }

    .hero h1 {
        font-size: 27px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .card {
        padding: 25px 20px;
    }
}
/* =========================
   PythonAI Logo
========================= */

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo img {
    width: 130px;
    height: auto;
    display: block;
}



/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

    .header-container {
        flex-direction: column;
        padding: 10px 15px;
    }

    .site-logo img {
        width: 110px;
    }

}