/*
Theme Name: Gobierno Abierto
Description: Tema moderno y dinámico para portales de gobierno abierto y transparencia
Author: Tu Nombre
Version: 2.0
License: GPL v2 or later
Text Domain: gobierno-abierto
*/

/* Variables CSS para diseño dinámico */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #3d65e9 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --dark-gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
    
    --shadow-light: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 25px rgba(0,0,0,0.15);
    --shadow-heavy: 0 15px 35px rgba(0,0,0,0.2);
    
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
}

/* Reset y estilos base modernos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animaciones globales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header moderno y dinámico */
.header {
    background: var(--bg-white);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: var(--transition);
}

.header:hover {
    box-shadow: var(--shadow-medium);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

/* Logo section con efectos */
.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    animation: fadeInUp 0.8s ease;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    animation: pulse 2s infinite;
}

.gobierno-info {
    display: flex;
    flex-direction: column;
}

.gobierno-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.estado-text {
    font-size: 24px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin: 2px 0;
}

.transparencia-text {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Navegación moderna */
.main-nav {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.main-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: var(--transition);
    z-index: -1;
}

.main-nav a:hover::before {
    left: 0;
}

.main-nav a:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Hero section espectacular */
.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1.5" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="90" r="2.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 4rem;
    margin-bottom: 30px;
    font-weight: 900;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
    letter-spacing: -2px;
}

.hero-section p {
    font-size: 1.4rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.3s both;
    font-weight: 300;
}

/* Contenedor principal */
.gobierno-abierto-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Secciones PAL rediseñadas */
.pal-section {
    background: var(--bg-white);
    margin-bottom: 60px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease;
    position: relative;
}

.pal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.pal-section:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.pal-section:nth-child(2) {
    animation-delay: 0.2s;
}

.pal-section:nth-child(3) {
    animation-delay: 0.4s;
}

.pal-section h2 {
    background: var(--primary-gradient);
    color: white;
    padding: 40px;
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 1px;
    position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.pal-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

/* Tablas modernas y dinámicas */
.documents-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    background: var(--bg-white);
}

.documents-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 30px 25px;
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 3px solid transparent;
    border-image: var(--primary-gradient) 1;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.documents-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.documents-table td {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.documents-table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.documents-table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transform: scale(1.02);
    box-shadow: var(--shadow-light);
    z-index: 10;
    position: relative;
}

/* Tipos de archivo con gradientes */
.file-type {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: none;
}

.file-type:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

.file-type.pdf {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.file-type.word {
    background: linear-gradient(135deg, #4834d4 0%, #341f97 100%);
    color: white;
}

.file-type.excel {
    background: linear-gradient(135deg, #00d2d3 0%, #01a3a4 100%);
    color: white;
}

/* Botones de descarga espectaculares */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--success-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.4rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-5px) scale(1.15);
    box-shadow: var(--shadow-heavy);
    color: white;
    text-decoration: none;
    animation: pulse 1s infinite;
}

.download-btn:active {
    transform: translateY(-2px) scale(1.1);
}

/* Footer moderno */
.footer {
    background: var(--dark-gradient);
    color: white;
    padding: 80px 0 40px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerPattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23footerPattern)"/></svg>');
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 2;
}

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-link.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
}

.social-link.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #42a5f5 100%);
    color: white;
}

.social-link.instagram {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.social-link.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #ff6b6b 100%);
    color: white;
}

.social-link.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #42a5f5 100%);
    color: white;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: #4facfe;
}

/* Botón back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-heavy);
}

/* Búsqueda de documentos */
.table-search-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.document-search-input {
    width: 400px;
    max-width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid transparent;
    border-radius: 30px;
    font-size: 1rem;
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    outline: none;
}

.document-search-input:focus {
    border-color: #667eea;
    box-shadow: var(--shadow-medium);
    transform: scale(1.02);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Compartir social - ELIMINADO */


/* Notificaciones */
.download-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: var(--success-gradient);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-heavy);
    z-index: 9999;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    animation: slideInRight 0.5s ease;
}

.download-notification i {
    font-size: 1.3rem;
}

/* Modo alto contraste */
.contrast-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--dark-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
}

.contrast-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.high-contrast .pal-section {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

.high-contrast .pal-section h2 {
    background: #fff !important;
    color: #000 !important;
}

.high-contrast .documents-table th {
    background: #fff !important;
    color: #000 !important;
}

.high-contrast .documents-table td {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

.high-contrast .download-btn {
    background: #fff !important;
    color: #000 !important;
}

/* Responsive Design Mejorado */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    .main-nav ul {
        gap: 20px;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
        padding: 15px 20px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-nav a {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .hero-section p {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .pal-section {
        margin-bottom: 40px;
        border-radius: 15px;
    }
    
    .pal-section h2 {
        font-size: 1.8rem;
        padding: 30px 20px;
    }
    
    .documents-table th,
    .documents-table td {
        padding: 20px 15px;
        font-size: 0.9rem;
    }
    
    .download-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .file-type {
        font-size: 0.7rem;
        padding: 8px 15px;
    }
    
    .document-search-input {
        width: 90%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gobierno-abierto-container {
        padding: 0 15px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .documents-table th,
    .documents-table td {
        padding: 15px 10px;
        font-size: 0.8rem;
    }
    
    .download-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .file-type {
        font-size: 0.65rem;
        padding: 6px 12px;
    }
    
    .pal-section h2 {
        font-size: 1.5rem;
        padding: 25px 15px;
    }
    
}

/* Header logo y gobierno info */
.header .container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.gobierno-info {
    display: flex;
    flex-direction: column;
}

.gobierno-text {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.estado-text {
    font-size: 18px;
    font-weight: bold;
    color: #2c5aa0;
    line-height: 1.2;
}

.transparencia-text {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* Navegación */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background-color: #f0f0f0;
    color: #2c5aa0;
}

.mas-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Contenido principal */
.main-content {
    padding: 40px 0;
}

.document-section {
    background: white;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.document-section h1 {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    padding: 25px 30px;
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
}

/* Tablas de documentos */
.documents-table {
    padding: 0;
}

.documents-table table {
    width: 100%;
    border-collapse: collapse;
}

.documents-table th {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    font-size: 16px;
}

.documents-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.documents-table tr:hover {
    background-color: #f8f9fa;
}

/* Tipos de archivo */
.file-type {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.file-type.pdf {
    background-color: #dc3545;
    color: white;
}

.file-type.word {
    background-color: #2b579a;
    color: white;
}

.file-type.excel {
    background-color: #217346;
    color: white;
}

/* Botones de descarga */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2652d7 0%, #052172 100%);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(111, 66, 193, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(111, 66, 193, 0.4);
    background: linear-gradient(135deg, #7952cc 0%, #6339a6 100%);
}

.download-btn:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    color: white;
    padding: 60px 0;
    margin-top: 60px;
}

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

.social-section h2 {
    font-size: 36px;
    margin-bottom: 30px;
    font-weight: bold;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 24px;
    transition: all 0.3s ease;
}

.social-link.facebook {
    background-color: #1877f2;
    color: white;
}

.social-link.twitter {
    background-color: #1da1f2;
    color: white;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-link.youtube {
    background-color: #ff0000;
    color: white;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-nav a {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .document-section h1 {
        font-size: 22px;
        padding: 20px;
    }
    
    .documents-table th,
    .documents-table td {
        padding: 15px 10px;
        font-size: 14px;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
    
    .social-section h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .documents-table th,
    .documents-table td {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .download-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .file-type {
        font-size: 10px;
        padding: 4px 8px;
    }
}
