/*
Theme Name: Partido Político PRIN
Text Domain: prin
Version: 4.4
Description: Tema moderno y renovado del portal web oficial del Partido Político PRIN - Diseño 2026. Fixed Navigation & Sidebar.
Author: Abel Chirinos <jchirinosjara@gmail.com>
Author URI: https://github.com/jchirinosjara
*/

/** Theme Variables */
:root {
    --color-primary: #E10803;
    --color-primary-dark: #b30602;
    --color-primary-light: #ff4d49;
    --color-secondary: #0f172a;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-bg: #f8fafc;
    --color-white: #ffffff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/** Reset & Typography */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Roboto:wght@300;400;500&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

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

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

/** Utilities */
.container {
    max-width: 1280px !important;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

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

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.text-primary {
    color: var(--color-primary);
}

.text-white {
    color: var(--color-white);
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-secondary {
    background-color: var(--color-secondary);
}

/** Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(225, 8, 3, 0.4);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 8, 3, 0.6);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/** Header & Nav */
.top-bar {
    background: var(--color-secondary);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.top-bar a {
    color: inherit;
}

.top-bar i {
    margin-right: 0.5rem;
    color: var(--color-primary);
}

#site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

#site-logo img {
    height: 70px;
    width: auto;
}

.social-links-small a,
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.social-links-small a:hover,
.social-links a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    color: white;
}


#site-navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#site-navigation a {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    display: block;
}

#site-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

/** Header Dropdowns */
#site-navigation ul li {
    position: relative;
}

#site-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
}

#site-navigation ul li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#site-navigation ul ul a {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    white-space: normal;
    /* allow wrap if too long */
    color: var(--color-text);
}

#site-navigation ul ul a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

#site-navigation ul ul a::after {
    display: none;
}


/** Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#hero-slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.3) 100%);
    z-index: 0;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 10;
    padding: 3rem 0;
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(225, 8, 3, 0.9);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(225, 8, 3, 0.4);
}

.hero-title {
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.7;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-description p {
    color: rgba(255, 255, 255, 0.95);
}

.hero-buttons .btn-primary {
    box-shadow: 0 4px 20px rgba(225, 8, 3, 0.4);
}

.slider-indicators {
    display: flex;
    gap: 0.75rem;
}

.indicator-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot:hover {
    transform: scale(1.2);
}

.animate-fade-up {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.animate-fade-up:nth-child(1) {
    animation-delay: 0.2s;
}

.animate-fade-up:nth-child(2) {
    animation-delay: 0.4s;
}

.animate-fade-up:nth-child(3) {
    animation-delay: 0.6s;
}

.animate-fade-up:nth-child(4) {
    animation-delay: 0.8s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text truncation utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ensure word breaks properly */
.card h3,
.card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/** Article Content Typography (Prose) */
.prose {
    color: var(--color-text);
    max-width: 65ch;
}

.prose>*+* {
    margin-top: 1.5em;
}

/* Headings */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h1 {
    font-size: 2.5em;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.prose h2 {
    font-size: 2em;
    position: relative;
    padding-left: 1rem;
}

.prose h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.25em;
    width: 4px;
    height: 1.5em;
    background: var(--color-primary);
    border-radius: 2px;
}

.prose h3 {
    font-size: 1.5em;
    color: var(--color-primary);
}

.prose h4 {
    font-size: 1.25em;
}

.prose h5,
.prose h6 {
    font-size: 1.1em;
}

/* Paragraphs */
.prose p {
    line-height: 1.75;
    margin-bottom: 1.25em;
}

.prose p:first-of-type {
    font-size: 1.15em;
    color: var(--color-text);
}

/* Links */
.prose a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 500;
    transition: var(--transition);
}

.prose a:hover {
    color: var(--color-primary-dark);
    text-decoration: none;
}

/* Lists */
.prose ul,
.prose ol {
    padding-left: 1.75em;
    margin-bottom: 1.5em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.75em;
    line-height: 1.7;
}

.prose li::marker {
    color: var(--color-primary);
    font-weight: 600;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2em 0;
    background: rgba(225, 8, 3, 0.03);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--color-text);
}

.prose blockquote p {
    margin: 0;
    font-size: 1.1em;
}

.prose blockquote cite {
    display: block;
    margin-top: 1em;
    font-size: 0.9em;
    color: var(--color-text-light);
    font-style: normal;
}

.prose blockquote cite::before {
    content: '— ';
}

/* Strong & Emphasis */
.prose strong,
.prose b {
    font-weight: 700;
    color: var(--color-secondary);
}

.prose em,
.prose i {
    font-style: italic;
}

/* Code */
.prose code {
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: var(--color-primary);
    border: 1px solid #e5e5e5;
}

.prose pre {
    background: var(--color-secondary);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2em 0;
}

.prose pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
    font-size: 0.875em;
}

/* Images */
.prose img {
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    margin: 2em 0;
    max-width: 100%;
    height: auto;
}

.prose figure {
    margin: 2em 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.875em;
    color: var(--color-text-light);
    margin-top: 0.75em;
    font-style: italic;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.9em;
}

.prose thead {
    background: var(--color-primary);
    color: white;
}

.prose th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.prose tbody tr:hover {
    background: #f9f9f9;
}

/* Horizontal Rule */
.prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    margin: 3em 0;
}

/* Large Size Variant */
.prose-lg {
    font-size: 1.125rem;
}

.prose-lg p {
    line-height: 1.8;
}


/** Sections */
.section {
    padding: 5rem 0;
}

.section-bg-light {
    background-color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/** Pillar Cards */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pillar-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.pillar-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.pillar-card:hover::before {
    transform: scaleX(1);
}

.pillar-icon {
    width: 70px;
    height: 70px;
    background: rgba(225, 8, 3, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
    font-size: 1.75rem;
}

.pillar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/** News Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.post-image img,
.aspect-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.post-card:hover .post-image img,
.card:hover .aspect-video img {
    transform: scale(1.1);
}

/* Ensure aspect-video container behavior */
.aspect-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}


.post-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more-link {
    color: var(--color-primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.read-more-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/** Footer */
#site-footer {
    background: var(--color-secondary);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-logo img {
    height: 80px;
    margin-bottom: 1.5rem;
}

.footer-heading {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    list-style: none;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

/* Sidebar Styles & Mobile */
#site-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
}

#site-sidebar.open {
    pointer-events: auto;
}

#site-sidebar .modal {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#site-sidebar.open .modal {
    opacity: 1;
}

#sidebar-navigation {
    position: absolute;
    top: 0;
    right: -350px;
    /* Hidden by default */
    width: 320px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0rem;
    overflow-y: auto;
    pointer-events: auto;
    /* Ensure clickable */
}

#site-sidebar.open #sidebar-navigation {
    right: 0;
}

#sidebar-menu ul {
    list-style: none;
    padding: 0;
}

#sidebar-menu li {
    border-bottom: 1px solid var(--color-bg);
}

#sidebar-menu a {
    display: block;
    padding: 1rem 0;
    color: var(--color-secondary);
    font-weight: 500;
}

.wp-block-button>a,
.wp-block-file>a {
    background-color: var(--color-primary);
    text-decoration: none;
    color: white !important;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.wp-block-file {
    margin: 0 auto;
}

.wp-block-file>a {
    display: block;
    margin-bottom: .5rem;
}

.wp-block-button>a:hover,
.wp-block-file>a:hover {
    background-color: var(--color-primary-dark);
}

.wp-block-file>a:nth-child(2) {
    display: none;
}

/* Pagination Styles */
.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-numbers li {
    list-style: none;
}

.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-numbers a {
    background: #f3f4f6;
    color: #374151;
}

.page-numbers a:hover {
    background: var(--color-primary);
    color: white;
}

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

.page-numbers .prev,
.page-numbers .next {
    padding: 0 1rem;
}

.page-numbers .dots {
    background: transparent;
    color: #9ca3af;
}


@media (max-width: 1024px) {
    #site-navigation {
        display: none;
    }

    .menu-toggle {
        display: block !important;
    }
}