/* ========================================================================
   PLANIFICACIÓN ESTRATÉGICA - CSS MODERNO SIMPLIFICADO
   ======================================================================== */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #f093fb;
    --secondary-dark: #f5576c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f5f7fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

/* ========================================================================
   MAIN CONTAINER
   ======================================================================== */

.plan-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9f0f5 100%);
    padding: 0;
}

/* ========================================================================
   HERO SECTION - HEADER PRINCIPAL
   ======================================================================== */

.plan-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 50px 40px;
    color: white;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.plan-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: -100px;
    width: 400px;
    height: 400px;
    opacity: 0.1;
    z-index: 0;
}

.decoration-shape {
    position: absolute;
    border-radius: 50%;
    background: white;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    animation: float1 8s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 100px;
    right: 100px;
    animation: float2 10s ease-in-out infinite;
}

.shape-3 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: 200px;
    animation: float3 9s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-25px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: slideDown 0.8s ease-out;
    line-height: 1.2;
}

.hero-title i {
    font-size: 2.6rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.95;
    margin: 0 0 30px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats {
    display: flex;
    gap: 50px;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================
   FILTERS SECTION - SIMPLIFICADO
   ======================================================================== */

.filters-section {
    max-width: 1200px;
    margin: -30px auto 40px;
    padding: 30px;
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.filters-header {
    margin-bottom: 20px;
    text-align: center;
}

.filters-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
}

.filters-title i {
    color: var(--primary);
}

/* Filters Grid Simple */
.filters-wrapper-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filter-item-simple {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label-simple {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label-simple i {
    color: var(--primary);
}

.filter-select-simple {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: white;
    font-family: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select-simple:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select-simple:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* Filter Actions */
.filter-actions-simple {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-clear {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Active Filters Display */
.active-filters-simple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed var(--border-color);
}

.filter-badge-simple {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5e6ff 100%);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.badge-close {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-left: 4px;
}

.badge-close:hover {
    opacity: 1;
}

/* ========================================================================
   RESULTS SECTION
   ======================================================================== */

.results-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

.results-header {
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.results-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.results-count i {
    color: var(--primary);
}

/* ========================================================================
   YEAR SECTION
   ======================================================================== */

.year-section {
    margin-bottom: 50px;
}

.year-header-simple {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.year-title-simple {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-title-simple i {
    color: var(--primary);
}

.year-count-simple {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================================================
   DOCUMENTS GRID
   ======================================================================== */

.documents-grid-simple {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* ========================================================================
   DOCUMENT CARD
   ======================================================================== */

.document-card-simple {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid transparent;
}

.document-card-simple:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Card Header */
.card-header-simple {
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9f0f5 100%);
    border-bottom: 2px solid var(--border-color);
}

.type-badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.badge-pedis-simple {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.badge-poas-simple {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

/* Card Content */
.card-content-simple {
    padding: 20px;
    flex-grow: 1;
}

.card-title-simple {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.card-year-simple {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 8px 0 0 0;
    font-weight: 500;
}

/* Card Actions */
.card-actions-simple {
    padding: 15px;
    background: #fafbfc;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: center;
}

.action-link-simple {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.action-view-simple {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.action-view-simple:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-download-simple {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
}

.action-download-simple:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.action-unavailable-simple {
    background: #d4d8e0;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* ========================================================================
   EMPTY STATE
   ======================================================================== */

.empty-state-simple {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.empty-icon-simple {
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 25px;
}

.empty-title-simple {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.empty-message-simple {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 25px;
}

.btn-retry-simple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-retry-simple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================================================
   RESPONSIVE DESIGN
   ======================================================================== */

@media (max-width: 1400px) {
    .documents-grid-simple {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .plan-hero {
        padding: 40px 30px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 30px;
    }

    .filters-section {
        margin: -25px auto 30px;
        padding: 25px;
    }

    .documents-grid-simple {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .plan-hero {
        padding: 35px 20px;
    }

    .hero-title {
        font-size: 1.8rem;
        gap: 12px;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .filters-section {
        margin: -20px 20px 25px;
        padding: 20px;
        border-radius: 10px;
    }

    .filters-title {
        font-size: 1.2rem;
    }

    .filters-wrapper-simple {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .filter-actions-simple {
        grid-column: 1 / -1;
    }

    .results-section {
        padding: 0 20px 50px;
    }

    .year-title-simple {
        font-size: 1.3rem;
    }

    .documents-grid-simple {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .plan-hero {
        padding: 30px 15px;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .hero-title i {
        font-size: 1.6rem;
    }

    .hero-stats {
        gap: 15px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .filters-section {
        margin: -15px 15px 20px;
        padding: 15px;
    }

    .filters-title {
        font-size: 1rem;
    }

    .filters-wrapper-simple {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .filter-actions-simple {
        grid-column: 1;
    }

    .results-section {
        padding: 0 15px 40px;
    }

    .year-title-simple {
        font-size: 1.1rem;
    }

    .documents-grid-simple {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-header-simple {
        padding: 12px;
    }

    .card-content-simple {
        padding: 15px;
    }

    .card-title-simple {
        font-size: 0.95rem;
    }

    .card-actions-simple {
        padding: 12px;
        gap: 10px;
    }

    .action-link-simple {
        width: 40px;
        height: 40px;
    }

    .empty-state-simple {
        padding: 60px 20px;
    }

    .empty-icon-simple {
        font-size: 3rem;
    }
}

/* ========================================================================
   ANIMATIONS
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
