@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --black: #1c1c1c;
    --gray: #7e7e7e;
    --gray-light: #E4E4E4;
    --red: #b30000;
    --font-size-base: 1rem;
    --font-size-md: clamp(1.25rem, 0.61vw + 1.1rem, 1.58rem);
    --font-size-lg: clamp(1.56rem, 1vw + 1.31rem, 2.11rem);
    --font-size-xl: clamp(2rem, 1.5vw + 1.5rem, 3rem);
    --border-radius: 10px;
}



body {
    font-family: 'Poppins', sans-serif;
    color: var(--black);
    font-size: var(--font-size-base);
    background-image: url('/img/abc.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    margin: 0;
}

.overlay-wrapper::before {
    content: ""; /*element won’t display anything (like text or symbols) — just whatever styling we give it*/
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3); /* adjust for lightness */
    z-index: -1;
    pointer-events: none; /* ensures it doesn't block clicks */
  }

a { color: var(--black);}
h1 { font-size: var(--font-size-xl);}
h2 { font-size: var(--font-size-lg);}
h3 { font-size: var(--font-size-md);}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-size-base);
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 0.7rem 0.75rem;
    margin-bottom: 1rem;
}

.btn {
    background-color: var(--black);
    border: none;
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    margin: 4px 2px;
    cursor: pointer;
}

.btn-delete {
    padding: 10px 16px;
    background-color: var(--red);
}

img {
    width: 100%;
    height: auto;
}

/* Layout */
.container {
    max-width: 982px;
    margin: 0 auto;
    padding: 0 10px;
}

.main {
    padding: 20px 0;
}

/* Hero Section */
.hero-image {
    max-height: 500px;
    max-width: 650px;
    height: auto;     /* maintains the correct aspect ratio */
    display: block;
    margin: 0 auto; 
    filter: drop-shadow(0px 44px 34px rgba(0,0,0,0.25));
    overflow: hidden;
    border-radius: var(--border-radius);
    margin: 0 auto;
}

/*Main Header */
.header {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    padding-top: 10px;
    grid-template-areas: 
    "logo button"
    "menu menu"
    ;
}

@media only screen and (min-width: 786px) {
    .header {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: 
        "logo menu button";
    }
}

.header__logo {
    grid-area: logo;
    font-weight: 800;
    font-size: 25px;
    text-decoration: none;
}

.header__logo:hover {
    text-decoration: underline;
}

.header__nav {
    grid-area: menu;
    display: flex;
    justify-content: center;
}

.header__button {
    grid-area: button;
    display: flex;
    justify-content: end;
}

.header__button button {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    border: 0;
    padding: 6px 12px;
    background: none;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--black);
}

.header__button button:hover {
    border: 2px solid var(--black);
}

/* Header -> Navigation */
.header__nav ul {
    list-style-type: none;
    display: flex;
    gap: 1rem;
    font-weight: 600;
    padding: 0;
}

.header__nav ul a {
    padding: 10px;
    text-decoration: none;
}

.header__nav ul a:hover {
    text-decoration: none;
}

.header__nav ul a.active {
    color: var(--gray);
}

/* Author - HomePage */
.author {
    padding: 10px 0;
    text-align: center;
}

.author__heading {
    margin-top: 10px;
    margin-bottom: 5px;
}

.author__body {
    /*font-size: var(--font-size-md);*/
    font-size: 1.2rem;
    margin: 5px 0 40px 0;
}

/*Home Article List */
.articles_overlay{
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 800px;
    margin: 0 auto;
    color: #fff;
}


.article__heading {
    margin-top: 4rem;
    font-weight: 600;
}

.article-ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
    display: flex;
    flex-direction: column;
}

.article-list__date {
    font-size: var(--font-size-base);
    color: #5a5a5a; 
    width: 260px;
    font-weight: bold;
    display: inline-block;
}


.article-ul li a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    margin: 18px 0;
}

.article-ul li a span:first-child {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--black); /* or white, depending on background */
  }
  

@media only screen and (min-width: 786px) {
    .article-ul li a {
        flex-direction: row;
        align-items: center;
    }

    .article-list__date {
        text-align: right;
    }
}

.article-ul li {
    font-size: 24px;
    cursor: pointer;
    transition: filter 0.1s;
}

.article-ul li:not(:Last-child) {
    border-bottom: 1px solid var(--gray-light);
}

.article-ul li:hover {
    filter: none;
}

.article-ul:hover li {
    filter: blur(3px);
}

.article-ul:hover li:hover {
    filter: none;
}

.pagination {
    font-size: 1.3rem;
    color: var(--gray);
    text-decoration: none;
    margin-top: 40px;
    display: inline-block;
}

.pagination:hover {
    color: var(--black);
}

.article {
    white-space: pre-wrap;
    font-size: 1.2rem;
}

/* Contact form*/
.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 2rem auto;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  
  .contact-form label {
    font-weight: 600;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
  }
  
  .contact-form button {
    background-color: var(--black);
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  .contact-form button:hover {
    background-color: var(--gray);
  }
  
  #formSuccess {
    display: none;
    color: green;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
  }
  

/* Footer */
.footer {
    margin: 4rem;
    text-align: center;
}

/* SearchBar */
.searchBar {
    visibility: hidden;
    transform: translateY(-100px);
    background-color: var(--black);
    padding: 4px 0;
    position: absolute;
    left: 0;
    right: 0;
}

.searchBar.open {
    transform: translateY(0);
    transition: transform 0.1s;
}

.searchBar input {
    margin: 0;
    padding: 0;
}

#searchClose {
    position: absolute;
    top: 0;
    right: 0;
    color: var(--gray-light);
    padding: 15px;
}

/* Dashboard Admin */
.admin-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-posts {
    padding: 0;
    margin: 0;
}

.admin-post-controls form {
    display: inline-block;
}

.admin-post-controls .btn {
    display: inline-block;
    background-color: var(--black);
    color: var(--gray-light);
    border: 0;
    text-decoration: none;
    font-size: .8rem;
    padding: 4px 8px;
    line-height: 2;
}

.admin-posts li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}