/*
Theme Name: Warmazono Music Library
Theme URI: https://warmazon.com
Author: Warmazono
Description: Tema personalizado para Tu Biblioteca Digital Warmazono.
Version: 2.3.0
License: GNU General Public License v2 or later
Text Domain: warmazono-music-library
*/

/* --- 1. RESET Y COMPATIBILIDAD MULTI-NAVEGADOR --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: #0d0e12;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Reset de elementos interactivos y de formulario para Safari, Firefox, Chrome y Edge */
input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Eliminar selector de cancelar/limpiar nativo en inputs tipo search */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 2. HEADER --- */
.site-header {
    background-color: #0a0b0e;
    border-bottom: 1px solid #1a1d24;
    padding: 15px 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    position: relative;
    z-index: 100;
}

.header-brand {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background-color: #00e676;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #000000;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #888888;
}

.header-right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 25px;
}

/* BUSCADOR DEL HEADER */
.header-search-container {
    position: relative;
}

.header-search-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background-color: #14171f;
    border: 1px solid #282d3b;
    border-radius: 20px;
    padding: 6px 16px;
    width: 250px;
    gap: 8px;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
}

.header-search-form:focus-within {
    border-color: #00e676;
    background-color: #1a1f2c;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.2);
}

.search-icon-left {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.header-search-field {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #ffffff;
}

.header-search-field::placeholder {
    color: #888888;
    font-weight: 500;
}

.main-nav ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    list-style: none;
    gap: 25px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cccccc;
    padding-bottom: 2px;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav .active a {
    color: #00e676;
    border-bottom: 2px solid #00e676;
}

/* --- 3. HERO SECTION INICIO --- */
.hero-section {
    background: -webkit-radial-gradient(center ellipse at top, #141e19 0%, #0d0e12 70%);
    background: radial-gradient(ellipse at top, #141e19 0%, #0d0e12 70%);
    text-align: center;
    padding: 70px 20px 40px 20px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-title span {
    color: #00e676;
}

.hero-subtitle {
    color: #a0a5b5;
    font-size: 1.1rem;
    margin-bottom: 35px;
}

.search-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    overflow: hidden;
}

.search-field {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    color: #333333;
}

.search-submit {
    background-color: #00e676;
    border: none;
    width: 55px;
    border-radius: 6px;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #000000;
    -webkit-transition: background-color 0.2s;
    transition: background-color 0.2s;
}

.search-submit:hover {
    background-color: #00c853;
}

/* --- 4. CATEGORIES SECTION --- */
.categories-section {
    padding: 40px 20px 80px 20px;
    text-align: center;
    background-color: #0d0e12;
}

.categories-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.categories-title span {
    color: #00e676;
}

.categories-subtitle {
    color: #888888;
    font-size: 0.95rem;
    margin-bottom: 45px;
}

.categories-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.category-card {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 210px;
    max-width: 235px;
    border-radius: 12px;
    padding: 35px 20px 25px 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    text-align: center;
    -webkit-transition: transform 0.2s;
    transition: transform 0.2s;
}

.category-card:hover {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
}

.card-ebook { background-color: #123356; }
.card-periodico { background-color: #92381e; }
.card-revista { background-color: #186f3b; }
.card-comic { background-color: #6a1b9a; }
.card-audiolibro { background-color: #b73a2a; }

.card-icon {
    width: 56px;
    height: 56px;
    background-color: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #ffffff;
}

.card-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    line-height: 1.4;
    min-height: 40px;
}

.btn-explore {
    width: 100%;
    margin-top: auto;
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    -webkit-transition: background-color 0.2s, border-color 0.2s;
    transition: background-color 0.2s, border-color 0.2s;
    text-align: center;
}

.btn-explore:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

/* --- 5. ARCHIVE / CATEGORY / SEARCH GRID --- */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
}

.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.archive-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 10px;
}

.search-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
}

.archive-description {
    color: #888888;
    font-size: 0.95rem;
}

.posts-5-col-grid {
    display: grid;
    grid-template-columns: repeat(5, 150px);
    gap: 20px;
    justify-content: center;
}

.post-card-item {
    width: 150px;
    height: auto;
    background-color: #161820;
    border: 1px solid #262a36;
    border-radius: 8px;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-transition: transform 0.2s, border-color 0.2s;
    transition: transform 0.2s, border-color 0.2s;
}

.post-card-item:hover {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
    border-color: #00e676;
}

.post-thumb-link {
    display: block;
    width: 150px;
    height: 150px;
    background-color: #222633;
    overflow: hidden;
}

.post-thumb-img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

.post-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: #1f2330;
    color: #555555;
}

.post-info {
    padding: 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
}

.post-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: #e0e0e0;
    margin: 0;
    word-break: break-word;
}

.post-card-item:hover .post-item-title {
    color: #00e676;
}

.no-posts-found {
    text-align: center;
    grid-column: 1 / -1;
    color: #888888;
    padding: 50px 0;
}

/* --- 6. SINGLE POST --- */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
    text-align: center;
}

.single-post-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 25px;
    line-height: 1.25;
}

.single-post-image-wrapper {
    margin: 0 auto 30px auto;
    max-width: 250px;
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.single-post-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: block;
    -o-object-fit: cover;
    object-fit: cover;
}

.single-post-meta {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.meta-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 8px;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.meta-label {
    font-weight: 700;
    color: #00e676;
    font-size: 0.95rem;
}

.category-badge a {
    display: inline-block;
    background-color: #e50914;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 5px 14px;
    border-radius: 6px;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
    text-decoration: none;
}

.category-badge a:hover {
    opacity: 0.85;
}

.tag-badge a {
    display: inline-block;
    background-color: #1f2330;
    border: 1px solid #333b4f;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 5px 14px;
    border-radius: 6px;
    -webkit-transition: background-color 0.2s;
    transition: background-color 0.2s;
    text-decoration: none;
}

.tag-badge a:hover {
    background-color: #00e676;
    color: #000000;
    border-color: #00e676;
}

.single-post-divider {
    border: 0;
    height: 1px;
    background-color: #262a36;
    margin: 30px 0 35px 0;
}

.single-post-content {
    text-align: left;
    color: #d0d0d0;
    font-size: 1.05rem;
    line-height: 1.7;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content a {
    color: #00e676;
    font-weight: 700;
    text-decoration: none;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}

.single-post-content a:hover {
    color: #00c853;
    text-decoration: underline;
}

/* --- 7. PAGINACIÓN Y FOOTER --- */
.pagination-container {
    text-align: center;
    margin-top: 50px;
}

.pagination-container .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background-color: #1a1d28;
    color: #cccccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination-container .page-numbers.current {
    background-color: #00e676;
    color: #000000;
    font-weight: 700;
}

.site-footer {
    background-color: #050608;
    border-top: 1px solid #1a1d24;
    padding: 30px 20px;
    text-align: center;
    color: #666666;
    font-size: 0.85rem;
}

@media (max-width: 1100px) {
    .categories-grid {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    .category-card {
        min-width: 250px;
    }
}
