/*
Theme Name: TechLearn
Author: Tejaswini
Description: My WordPress practice theme
Version: 1.0
*/


/* =========================
   GLOBAL STYLES
========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}


/* =========================
   HEADER
========================= */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding a {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}


/* =========================
   HEADER NAVIGATION
========================= */

.site-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    gap: 30px;
}

.site-navigation a {
    font-size: 16px;
    font-weight: 500;
    color: #374151;

    transition: color 0.3s ease;
}

.site-navigation a:hover {
    color: #2563eb;
}


/* =========================
   HERO SECTION
========================= */

.hero {
    position: relative;

    min-height: 500px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* Background image */

.hero-background {
    position: absolute;

    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    z-index: 1;
}


/* Dark gradient overlay */

.hero-overlay {
    position: absolute;

    inset: 0;

    background: linear-gradient(
        rgba(0, 0, 0, 0.65),
        rgba(0, 0, 0, 0.45)
    );

    z-index: 2;
}


/* Hero content */

.hero-content {
    position: relative;

    z-index: 3;

    max-width: 800px;

    padding: 30px;

    text-align: center;

    color: #ffffff;
}

.hero-content h1 {
    margin: 0 0 20px;

    font-size: 52px;
    line-height: 1.1;
    font-weight: 700;
}

.hero-content p {
    margin: 0;

    font-size: 20px;
    line-height: 1.7;
}


/* =========================
   ABOUT SECTION
========================= */

.about-section {
    padding: 90px 30px;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 60px;

    align-items: center;
}


/* About image */

.about-image img {
    display: block;

    width: 100%;
    height: 450px;

    object-fit: cover;

    border-radius: 10px;
}


/* About content */

.about-content h2 {
    margin: 0 0 20px;

    font-size: 38px;
    line-height: 1.2;
    color: #111827;
}

.about-text {
    font-size: 17px;
    line-height: 1.8;
    color: #4b5563;
}


/* =========================
   LATEST POSTS
========================= */

.latest-posts {
    padding: 90px 30px;

    background: #f8fafc;
}

.latest-posts-container {
    max-width: 1200px;
    margin: 0 auto;
}

.latest-posts-container > h2 {
    margin: 0 0 40px;

    text-align: center;

    font-size: 38px;
    color: #111827;
}


/* Posts grid */

.posts-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 30px;
}


/* Post card */

.post-card {
    background: #ffffff;

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);

    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}


/* Post image */

.post-image img {
    display: block;

    width: 100%;
    height: 220px;

    object-fit: cover;
}


/* Post content */

.post-card-content {
    padding: 25px;
}

.post-card h3 {
    margin: 0 0 15px;

    font-size: 22px;
    line-height: 1.4;

    color: #111827;
}

.post-card h3 a:hover {
    color: #2563eb;
}

.post-excerpt {
    margin-bottom: 20px;

    color: #6b7280;

    line-height: 1.7;
}


/* Read More */

.read-more {
    font-weight: 600;

    color: #2563eb;
}

.read-more:hover {
    color: #1d4ed8;
}


/* No posts */

.no-posts {
    text-align: center;

    color: #6b7280;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    background: #111827;

    color: #ffffff;

    padding: 60px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-branding h2 {
    margin: 0 0 10px;

    font-size: 24px;
}

.footer-branding p {
    margin: 0 0 30px;

    color: #d1d5db;
}


/* Footer navigation */

.footer-navigation ul {
    list-style: none;

    margin: 0 0 30px;
    padding: 0;

    display: flex;

    gap: 25px;

    flex-wrap: wrap;
}

.footer-navigation a {
    color: #d1d5db;

    transition: color 0.3s ease;
}

.footer-navigation a:hover {
    color: #ffffff;
}


/* Copyright */

.footer-copyright {
    padding-top: 25px;

    border-top: 1px solid #374151;
}

.footer-copyright p {
    margin: 0;

    color: #9ca3af;

    font-size: 14px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    /* Header */

    .header-container {
        padding: 18px 20px;

        flex-direction: column;

        gap: 20px;
    }

    .site-navigation ul {
        gap: 15px;

        flex-wrap: wrap;

        justify-content: center;
    }


    /* Hero */

    .hero {
        min-height: 420px;
    }

    .hero-content {
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content p {
        font-size: 17px;
    }


    /* About */

    .about-section {
        padding: 60px 20px;
    }

    .about-container {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .about-image img {
        height: 350px;
    }

    .about-content h2 {
        font-size: 32px;
    }


    /* Latest Posts */

    .latest-posts {
        padding: 60px 20px;
    }

    .latest-posts-container > h2 {
        font-size: 32px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }


    /* Footer */

    .site-footer {
        padding: 45px 20px;
    }

    .footer-navigation ul {
        flex-direction: column;

        gap: 12px;
    }

}