/*
Theme Name: My Own Theme
Theme URI: https://blog.alanandr.eu
Author: Alan Andreu
Author URI: https://alanandr.eu
Description: Custom Theme based on HTML and CSS, in compliance with SEO best practices.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-own-theme
*/

* {
    font-family: 'Arial', sans-serif;
    transition: all 0.3s ease;
}

body {
    margin: 0;
    background-color: #000;
}

a {color: white;text-decoration: none;}

a:hover {text-decoration: underline;}

.icon {
    margin: 0;
    width: 25px;
    height: 25px;
    margin-right: 10px;
    vertical-align: middle;
}

body > header {
    display: flex;
    position: relative;
    width: 100%;
    height: 400px;
    padding: 10px;
    box-sizing: border-box; /* Ensures padding is included in the width */
    background-image: url(https://blog.alanandr.eu/wp-content/themes/my-own-theme/assets/img/blog_bg.png);
    background-size: cover;
    background-position: center;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
}

body > header nav {
    width: auto;
    height: 25px;
    position: absolute;
    padding: 10px 15px 10px 15px;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    font-size: 14px;
    font-weight: normal;
    font-style: italic;
}

body > header nav img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin-right: 10px;
    object-fit: contain;
    display: inline;
    vertical-align: middle;
}

body > header nav p {
    display: inline;
}

body > header img {
    max-width: 80%;
    height: auto;
}

body > footer {
    padding: 20px;
    background-color: black;
    color: white;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    text-align: center;
}

main {
    display: flex;
    justify-content: center;
    background-color: #142523;
    padding-top: 20px;
}

main > section {
    width: 60%;
    max-width: 800px;
    margin-right: 20px;
}

main > aside {
    width: 20%;
    max-width: 300px;
    text-align: center;
}

section > article,
aside > section {
    padding: 10px;
    margin-bottom: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #235347;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: justify;
}

article > header,
section > header {
    display: flex;
    width: auto;
    height: 50px;
    max-width: 100%; /* Ensures it doesn't exceed the container */
    max-height: 100%;
    background-color: #0E724F;
    border: 2px solid #107D57;
    border-radius: 5px;
    box-shadow: inset 0 1.5rem 0 0 #107D57;
    font-size: 1rem;
    justify-content: center;
    color: #CBE58E;
    white-space: nowrap; /* Prevents text from wrapping */
    text-overflow: ellipsis; /* Adds ellipsis for overflow text */
    overflow: hidden; /* Hides any overflow text */
    margin-bottom: 10px;
}

article > header a{
    color: #CBE58E
}

section > header {
    height: 40px;
    box-shadow: inset 0 1.25rem 0 0 #107D57;
    
    h1 {
        font-size: 1rem;
    }
}

.post-category{
    margin:0;
    padding: 5px;
    border-radius: 5px;
    background-color: #1b1b1b;
    width: fit-content;

    ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        text-align: left;
    }

    .tilt{
    background-color: #0b0b0b;
    border-radius: 3px;
    width: max-content;
    display: inline-flex;
    padding: 5px;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: bold;

        a {
            text-decoration: none;
        }
    }
}

header > h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0;
    padding: 0;
}

aside > img {
    width: 100%;
    max-width: 300px;
    border-radius: 50%;
    border: 20px solid #632e81;
    box-sizing: border-box;
    margin-bottom: 20px;
    text-align: center;
}

aside > section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

aside > section ul > li {
    padding: 5px 0 5px 0;
    border-bottom: 1px dotted rgba(203, 229, 142, 0.2);
}

aside > section ul > li:first-child {
    padding-top: 0;
}

aside > section ul > li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

aside p {
    margin: 0;
    font-size: 0.9rem;
}

article > footer div {
    margin-top: 10px;
    width: auto;
    box-shadow:inset 0 0.8rem 0 0 #A1CE3F;
    background-color:#94C42B;
    border:2px solid #A1CE3F;
    border-radius: 5px;
    display: inline-block;
    color:#ffffff;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 10px 5px 10px;
    text-decoration:none;
    text-shadow:1px 1px 1px #486900;
}

.separator {
    width: 80%;
    margin: auto;
    padding: 10px 0px 25px 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.comments {
    float: right;
}

/* Publish Comment Styles */
.publish-comment {
    width: 100%;
    background-color: #A1CE3F;
    margin-bottom: 20px;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.publish-comment form {
    margin: 0;
    background-color: #94C42B;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.publish-comment label {
    width: 100%;
    padding: 5px 10px 2px 10px;
    box-sizing: border-box;
    border-radius: 5px 5px 0px 0px;
    background-color: #CBE58E;
    font-size: 1em;
    font-weight: bold;
    color: #0E724F;
}

.publish-comment input[type="text"],
.publish-comment textarea {
    margin-bottom: 10px;
    padding: 8px;
    width: 100%;
    border: 3px solid #CBE58E;
    border-radius: 0px 0px 5px 5px;
    box-sizing: border-box;
    resize: vertical;
    font-size: 1em;
}

.comment-submit {
    margin: 0;
    background-color: #0E724F;
    color: white;
    padding: 10px 20px;
    box-shadow: inset 0 1.2rem 0 0 #107D57;
    border: 3px solid #107D57;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    
}

.comment-submit:hover {
    box-shadow: inset 0 0 0 0 #0E724F;
}

.comments-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;

    li {
        margin: 0 0 10px 0;
    }

    li:last-child {
        margin-bottom: 0px;
    }   
}

/* Comment Styles */
.comment {
    background-color: black;
    border-radius: 10px;
    border: 1px solid #333;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.comment h2 {
    margin: 0;
    padding: 10px;
    background-color: #1c1c1c;
    border-radius: 10px 10px 0px 0px;
    font-size: 1em;
    font-weight: normal;
}

.comment span {
    margin: 0;
    padding: 0;
    float: right;
    font-size: 0.7em;
    color: #A1CE3F;
}

.comment p {
    margin: 0;
    padding: 10px;
    font-size: 0.8em;
    line-height: 1.5;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: space-between; /* separa los grupos a izquierda y derecha */
  align-items: center; /* centra verticalmente */
  width: 100%;
  margin: 2rem 0;
  box-sizing: border-box;
}

.pagination ul {
  display: flex;
  gap: 10px; /* espacio entre los botones */
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination li {
  margin: 0 5px;
  background-color: #A1CE3F;
  border: 3px solid #CBE58E;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
}

.pagination li:hover {
  background: #94C42B;
}

.pagination .disabled {
  background-color: #999;
  border: 3px solid #fff;
  opacity: 0.6;
  cursor: not-allowed;
}

.pagination .disabled:hover {
  background: #999;
}



/* Responsive Design */
@media screen and (max-width: 1080px) {
    main {
        flex-direction: column;
        align-items: center;
    }
    main > section,
    main > aside {
        width: 90%;
        margin: 0;
    }

    aside {
        max-width: 60%;
    }

    aside img {
        width: 62%;
        max-width: 300px;
    }
}