/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GLOBAL */
html {
    color: #333;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background: #f4f6f9;
    color: #333;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Default (Light) */
.theme-light {
    --bg: #ffffff;
    --text: #222222;
    --header-bg: #f5f5f5;
}

/* Dark */
.theme-dark {
    --bg: #1f1f1f;
    --text: #f5f5f5;
    --header-bg: #333333;
}

body {
    background: var(--bg);
    color: var(--text);
}

header {
    background: var(--header-bg);
}

/* MAIN CONTAINER */
.container {
    display: grid;
    width: min(95%, 1400px);
    margin: 0 auto;
    background: cadetblue;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header"
        "main"
        "footer";
    border-radius: 2rem;
    text-align: center;
    color: black;
}

.container.active {
    background-color: cornflowerblue;
}


/* HEADER */
header {
    grid-area: header;
    background: #333;
    color:white;
    padding:1rem;
    text-align:center;
    display:grid;
    align-items:center;
}


/* MAIN */
main {
    grid-area: main;
    padding:1rem;
}


/* FOOTER */
footer {
    grid-area: footer;
    background:#333;
    padding:1rem;
    color: white;
    
}
ul{
    list-style: none;
}
#welcome{
    padding: 1rem;
}
a{
    text-decoration: none;
    color: black;
}

/*Post Section*/
.post-image {
    width:100%;
    max-height:500px;
    object-fit:cover;
    border-radius:8px;
    margin-bottom:25px;
}
/* POST PAGE */

/* POST PAGE */

.post-page{
    max-width:1000px;
    margin:40px auto;
    padding:20px;
}

/* POST CARD */

.post-card{
    background:#fff;
    border-radius:18px;
    padding:40px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    margin-bottom:40px;
}

.post-title{
    font-size:2.5rem;
    margin-bottom:15px;
    color:#2d3748;
}

.post-meta{
    color:#6b7280;
    font-size:.95rem;
    margin-bottom:30px;
    border-bottom:1px solid #e5e7eb;
    padding-bottom:15px;
}

.post-content{
    font-size:1.1rem;
    line-height:1.8;
    color:#444;
}

/* COMMENTS */

.comments-section{

    display:flex;

    flex-direction:column;

    gap:18px;

}
.comments-heading{
    margin-bottom:25px;
    font-size:2rem;
    color:#2d3748;
}

/* POST CARD */

.post-card{
    background:#fff;
    border-radius:18px;
    padding:40px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    margin-bottom:40px;
}

.post-title{
    font-size:2.5rem;
    margin-bottom:15px;
    color:#2d3748;
}

.post-meta{
    color:#6b7280;
    font-size:.95rem;
    margin-bottom:30px;
    border-bottom:1px solid #e5e7eb;
    padding-bottom:15px;
}

.post-content{
    font-size:1.1rem;
    line-height:1.8;
    color:#444;
}

/* COMMENTS */

.comments-section{
    margin-top:20px;
}

.comments-heading{
    margin-bottom:25px;
    font-size:2rem;
    color:#2d3748;
}

/* BLOG IMAGE SECTION */
/* BLOG IMAGE SECTION */

.comment-content-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: center;
    align-items: stretch;
    
}
a .comment-content-box{
   
    display:flex;
    gap:20px;
    justify-content:center;
    margin-bottom:40px;
    color: black;
}
.comment-content-img {
    flex:1;
    display: flex;
    max-width:450px;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.comment-content-img img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius:12px;
}

/* COMMENTS */
.comment{
    display:flex;
    gap:20px;
    align-items:flex-start;
    background:#fff;
    border-radius:14px;
    padding:20px 25px;
    margin-bottom:18px;

    box-shadow:0 3px 12px rgba(0,0,0,.08);

    transition:.25s;
}

.comment::before{

    content:attr(data-letter);

    width:50px;

    height:50px;

    border-radius:50%;

    background:#3b82f6;

    color:white;

    display:flex;

    align-items:center;

    justify-content:center;

    font-weight:bold;

    font-size:1.2rem;

    flex-shrink:0;

}
.comment:hover{

    transform:translateY(-3px);

    box-shadow:0 10px 25px rgba(0,0,0,.12);

}

.comment h3{

    color:#3b82f6;

    margin-bottom:10px;

    font-size:1.2rem;

}

.comment p{

    color:#444;

    line-height:1.7;

}

/* WRAPPER */
.wrapper {

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
    max-width:1100px;
    margin:auto;

}
.blog-card {

    background:white;
    padding:25px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
    color:#333;

}


.blog-card h2 {

    margin-bottom:10px;

}


.blog-card a {

    display:inline-block;
    margin-top:15px;
    background:#333;
    color:white;
    padding:10px 18px;
    border-radius:6px;

}

/* BUTTONS */
button {

    color:white;
    background:blue;
    padding:.5rem;
    border-radius:6px;
    border:none;

}


/* PLACEHOLDER PAGE */
.placeholder-container {

    display:grid;
    grid-template-areas:
        "header"
        "hero"
        "main"
        "features";

    gap:2rem;
    min-height:100vh;

}


.placeholder-hero {

    grid-area:hero;
    background:#4f7df3;
    padding:5rem 2rem;
    text-align:center;

}


#placeholder-main {

    grid-area:main;
    display:grid;
    grid-template-columns:3fr 3fr 1fr;
    gap:2rem;
    padding:0 2rem;

}


.placeholder-content,
aside {

    background:white;
    color:black;
    padding:2rem;
    border-radius:8px;
 


}


.placeholder-features {

    grid-area:features;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:1.5rem;
    padding:0 2rem;
    color:black;
    align-items: stretch;


}


.placeholder-features article {

    background:white;
    padding:2rem;
    border-radius:8px;
    display: flex;
    flex-direction: column;

}

/* HOME IMAGE */

#placeholder-main figure {
    width: 100%;
    height: 400px;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
}

#placeholder-main picture {
    display: block;
    width: 100%;
    height: 100%;
}

#placeholder-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* NAVIGATION */
nav {

    padding:2rem;

}


nav ul {

    list-style:none;
    display:grid;
    grid-auto-flow:column;
    justify-content:end;

}


nav a {

    color:white;
    text-decoration:none;
    padding:.8rem;

}


nav a:hover {

    background:blueviolet;

}

.back-link {

    display:inline-block;
    margin-top:30px;
    padding:10px 20px;

    background:#333;
    color:white;

    border-radius:6px;

    text-decoration:none;

}


.back-link:hover {

    background:#555;

}

/* FOOTER */
.site-footer {

    background:#1a1a1a;
    padding:60px 20px 20px;

}


.footer-container {

    display:flex;
    flex-wrap:wrap;
    max-width:1200px;
    margin:auto;
    justify-content:space-between;
    gap:30px;

}


.footer-column {

    flex:1;
    min-width:220px;

}

/* =========================================================
   BLOG FEATURED IMAGES
   ========================================================= */

.comment-content-box {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

    width: 100%;

    max-width: 1100px;

    margin: 30px auto;

    padding: 0;
}


.comment-content-box img {
    display: block;

    width: 100%;

    height: 280px;

    object-fit: cover;

    border-radius: 10px;
}

@media (max-width: 700px) {

    .comment-content-box {
        grid-template-columns: 1fr;

        gap: 15px;

        margin: 20px auto;
    }


    .comment-content-box img {
        height: 220px;
    }

}

/* FORMS */
form {

    border-radius:5px;
    background:#f2f2f2;
    padding:20px;
    width:100%;
    max-width:500px;
    margin:auto;
    color:black;

}


label {
    display:block;
}


input[type=text],
input[type=email],
input[type=password],
select,
textarea {

    width:100%;
    padding:12px;
    margin:8px 0;
    border:1px solid #ccc;
    border-radius:4px;

}


textarea {

    resize:none;
    height:150px;

}


input[type=submit] {

    width:100%;
    background:#4CAF50;
    color:black;
    padding:14px;
    border:none;
    border-radius:4px;

}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #f5c2c7;
    background: #f8d7da;
    color: #842029;
}

.alert.warning {
    background: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

/* =========================================================
   PUBLIC NAVIGATION
   ========================================================= */

nav {
    padding: 2rem;
}

nav ul {
    list-style: none;
    display: grid;
    grid-auto-flow: column;
    justify-content: end;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

nav a,
nav .logout-link {
    display: block;

    color: white;
    text-decoration: none;

    padding: .8rem;

    font-family: inherit;
    font-size: inherit;

    border-radius: 6px;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

nav a:hover,
nav .logout-link:hover {
    background: blueviolet;
    color: white;
}


/* =========================================================
   LOGOUT FORM
   ========================================================= */

.logout-form {
    display: block;

    margin: 0;
    padding: 0;

    width: auto;

    background: transparent;
    border: none;
    border-radius: 0;
}

.logout-form button {
    display: block;

    margin: 0;
    padding: .8rem;

    width: auto;

    background: transparent;
    color: white;

    border: none;
    border-radius: 6px;

    font-family: inherit;
    font-size: inherit;

    line-height: inherit;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.logout-form button:hover {
    background: blueviolet;
    color: white;
}

nav a:hover,
nav .logout-link:hover {
    background: blueviolet;
}

/* TABLETS */
/* TABLETS */
@media (max-width: 900px) {

    .container {
        width: 98%;
        border-radius: 1rem;
    }

    .comment-content-box {
        gap: 15px;
    }

    .comment-content-img {
        flex: 1 1 300px;
    }

    #placeholder-main {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .wrapper {
        width: 100%;
        padding: 0 15px;
    }
    .placeholder-content{
           align-items: stretch;
           padding: 1rem;
    }

}

/* PHONES */
/* PHONES */
@media (max-width: 600px) {

     #placeholder-main figure {
        height:250px;
    }

    .comment-content-box {
        flex-direction: column;
        gap: 15px;
    }

    .comment-content-img {
        width: 100%;
        flex: 1 1 auto;
    }

    .comment-content-img img {
        width: 100%;
        height: auto;
    }

    .placeholder-features {
        grid-template-columns: 1fr;
        padding: 0;
    }

    nav ul {
        grid-auto-flow: row;
        justify-content: center;
        gap: 10px;
    }

    header {
        grid-template-columns: 1fr;
    }

    .wrapper {
        width: 100%;
        padding: 0 10px;
    }

    h1 {
        font-size: 2rem;
    }

    p {
        font-size: 1rem;
    }
    

}

