/*
Theme Name: ModaPTS Theme
Theme URI: https://modapts.es
Author: ModaPTS
Author URI: https://modapts.es
Description: Theme moderno para ModaPTS - Noticias y actualidad. Diseño elegante con Hero Banner, SEO optimizado.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modapts-theme
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* === CSS VARIABLES === */
:root {
    --primary-color: #e63946;
    --primary-dark: #c1121f;
    --secondary-color: #1d3557;
    --accent-color: #457b9d;
    --light-color: #f1faee;
    --dark-color: #1a1a2e;
    --text-color: #333;
    --text-light: #666;
    --white: #fff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--gray-100);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin: 0 0 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    margin: 0 0 1.5rem 1.5rem;
    padding: 0;
}

li {
    margin-bottom: 0.5rem;
}

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

/* === LAYOUT === */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-area {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 50px 0;
}

.site-main {
    background: var(--gray-100);
    min-height: 50vh;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* === SKIP LINK === */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 15px 25px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    z-index: 100000;
    text-decoration: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* === HEADER === */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.custom-logo-link {
    display: inline-block;
    transition: var(--transition);
}

.custom-logo-link:hover {
    transform: scale(1.02);
}

.custom-logo {
    display: block;
}

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--dark-color);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-title a:hover {
    opacity: 0.85;
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
}

/* === NAVIGATION === */
.main-navigation {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-color) 100%);
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-navigation li {
    margin: 0;
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 14px 24px;
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    width: 100%;
}

.main-navigation a:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

/* === HERO BANNER === */
.hero-banner {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-color) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-banner .site-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hero-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(29,53,87,0.92) 0%, rgba(26,26,46,0.95) 100%);
}

.hero-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-banner-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7), 0 0 30px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
}

.hero-banner-subtitle {
    font-size: 1.375rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 30px;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
}

.hero-banner-cta {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(230,57,70,0.4);
    transition: var(--transition);
}

.hero-banner-cta:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(230,57,70,0.5);
}

/* === ARTICLE / POST === */
article,
.post,
.hentry {
    background: var(--white);
    margin-bottom: 30px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    padding: 0;
}

article:hover,
.post:hover,
.hentry:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Space after hero */
.hero-banner + .site-main {
    margin-top: 0;
}

.hero-banner + .site-main .site-container {
    padding-top: 50px;
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

article:hover .post-thumbnail img {
    transform: scale(1.05);
}

.entry-header {
    padding: 25px 30px 15px;
    background: var(--white);
}

/* Ensure posts in main content have card style */
.main-content > article,
.main-content > .post,
.main-content > .hentry,
#content article,
.site-main article {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    overflow: hidden;
}

.entry-title {
    margin: 0 0 10px;
    font-size: 1.5rem;
    line-height: 1.3;
}

.entry-title a {
    color: var(--dark-color);
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    font-size: 0.8125rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.entry-meta a {
    color: var(--accent-color);
}

.cat-links a {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white) !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.cat-links a:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.entry-content {
    padding: 20px 30px 30px;
    font-size: 1.0625rem;
    line-height: 1.85;
    background: var(--white);
}

/* Entry summary on archive pages */
.entry-summary {
    padding: 0 30px 25px;
    background: var(--white);
}

.entry-content h2 {
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 2px solid var(--gray-200);
    color: var(--secondary-color);
}

.entry-content h3 {
    color: var(--dark-color);
}

.entry-content ul,
.entry-content ol {
    margin-left: 2rem;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary-color);
    background: var(--gray-100);
    font-style: italic;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.entry-content a {
    color: var(--primary-color);
    border-bottom: 1px solid transparent;
}

.entry-content a:hover {
    border-bottom-color: var(--primary-color);
}

/* === READ MORE BUTTON === */
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    margin: 0 30px 25px;
    transition: var(--transition);
}

.read-more-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
}

.read-more-link::after {
    content: '→';
    font-size: 1.1em;
}

/* === SIDEBAR === */
.widget {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.widget-title {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    font-size: 1.125rem;
    color: var(--dark-color);
    position: relative;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.widget li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget a {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget a::before {
    content: '›';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
}

.widget a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* === FOOTER === */
.site-footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #0f0f1a 100%);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget .widget-title {
    color: var(--white);
    border-bottom-color: var(--primary-color);
}

.footer-widget a {
    color: rgba(255,255,255,0.7);
}

.footer-widget a::before {
    color: var(--primary-color);
}

.footer-widget a:hover {
    color: var(--white);
}

.site-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

.site-info a {
    color: var(--primary-color);
}

.site-info a:hover {
    color: var(--white);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: var(--white);
    color: var(--text-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .current {
    background: var(--primary-color);
    color: var(--white);
}

/* === ARCHIVE / CATEGORY === */
.archive-header,
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.archive-title,
.page-title {
    margin: 0;
    font-size: 2rem;
    color: var(--dark-color);
}

.archive-description {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 1.0625rem;
}

/* === SEARCH === */
.search-form {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

.search-submit {
    padding: 14px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.search-submit:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* === 404 PAGE === */
.error-404 {
    text-align: center;
    padding: 100px 20px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.error-404 h1 {
    font-size: 8rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1;
}

.error-404 p {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* === BREADCRUMBS === */
.breadcrumbs {
    padding: 15px 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--accent-color);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: var(--gray-300);
}

/* === POST GRID (Archive) === */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-grid article {
    margin-bottom: 0;
}

/* === FEATURED POSTS SECTION === */
.featured-posts {
    padding: 60px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.section-title span {
    color: var(--primary-color);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .hero-banner {
        height: 400px;
    }

    .hero-banner-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    h1, .entry-title { font-size: 1.5rem; }
    h2 { font-size: 1.375rem; }

    .header-inner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .main-navigation ul {
        justify-content: center;
    }

    .main-navigation a {
        padding: 12px 18px;
        font-size: 0.8125rem;
    }

    .site-container {
        padding: 0 15px;
    }

    .content-area {
        padding: 30px 0;
        gap: 30px;
    }

    .hero-banner {
        height: 350px;
    }

    .hero-banner-title {
        font-size: 2rem;
    }

    .hero-banner-subtitle {
        font-size: 1.125rem;
    }

    .hero-banner-content {
        padding: 30px 20px;
    }

    .entry-header,
    .entry-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }

    .hero-banner {
        height: 300px;
    }

    .hero-banner-title {
        font-size: 1.75rem;
    }

    .hero-banner-cta {
        padding: 14px 30px;
        font-size: 0.875rem;
    }
}
