/*
Theme Name: Corpouraba
Theme URI: https://corpouraba.gov.co
Author: Corpouraba
Author URI: https://corpouraba.gov.co
Description: Tema personalizado para la Corporación para el Desarrollo Sostenible del Urabá. Diseño moderno y accesible con integración completa con WordPress.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: corpouraba
Tags: custom-colors, custom-menu, featured-images, translation-ready, accessibility-ready

Este tema está diseñado específicamente para la Corporación para el Desarrollo Sostenible del Urabá.
Incluye todas las funcionalidades del diseño original integradas con WordPress.
*/

/* ==========================================================================
   IMPORTAR FUENTES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ==========================================================================
   VARIABLES CSS
   ========================================================================== */
:root {
    --primary: #0B5345;
    --secondary: #27AE60;
    --accent: #F39C12;
    --light: #EAECEE;
    --dark: #1B2631;
    --gov-blue: #004F9E;
    --white: #FFFFFF;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* ==========================================================================
   ESTILOS BASE
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    padding-top: 100px;
    background-color: #fff;
    line-height: 1.6;
}

/* ==========================================================================
   TIPOGRAFÍA
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

/* ==========================================================================
   COMPONENTES ESPECÍFICOS DEL TEMA
   ========================================================================== */

/* Barra GOV.CO */
.gov-bar {
    background-color: var(--gov-blue);
    color: white;
    padding: 4px 0;
    font-size: 13px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    height: 28px;
}

/* Barra superior */
.top-bar {
    background-color: var(--primary);
    color: white;
    padding: 4px 0;
    font-size: 13px;
    position: fixed;
    top: 28px;
    width: 100%;
    z-index: 1029;
    height: 30px;
}

.top-bar a {
    color: white;
    text-decoration: none;
    font-size: 13px;
}

.top-bar a:hover {
    color: var(--light);
}

/* Encabezado */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
    position: fixed;
    top: 58px;
    width: 100%;
    z-index: 1028;
}

.navbar {
    padding: 0;
}

.navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s;
    font-size: 15px;
}

.navbar-nav .nav-link:hover {
    color: var(--primary);
}

.navbar-nav .nav-item.active .nav-link {
    color: var(--primary);
    font-weight: 600;
}

/* Menús desplegables */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.dropdown-item {
    padding: 8px 15px;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: var(--light);
}

.dropdown-toggle::after {
    margin-left: 5px;
}

/* Menús multinivel */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

/* Botón de búsqueda */
.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
}

.search-btn:hover {
    background: var(--secondary);
}

/* Slider */
.slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 20px;
}

.slider-item {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Títulos de sección */
.section-title {
    position: relative;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--primary);
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary);
    margin-top: 10px;
}

/* Tarjetas de noticias */
.news-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
    margin: 10px;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.news-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.news-date {
    color: var(--secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Sección de enlaces rápidos */
.quick-links {
    background-color: var(--light);
    padding: 40px 0;
}

.quick-link-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
}

.quick-link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.quick-link-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Boletín */
.boletin-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s;
}

.boletin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.boletin-title {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.territorial-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.territorial-item:last-child {
    border-bottom: none;
}

/* Pestañas */
.nav-tabs .nav-link {
    color: var(--dark);
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 3px solid var(--primary);
}

/* Contenedores de desplazamiento */
.news-scroll-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
}

.news-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.news-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 8px;
}

/* Sección de redes sociales */
.social-section {
    padding: 40px 0;
}

.social-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
    margin-bottom: 20px;
    min-width: 300px;
    margin-right: 15px;
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.social-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.social-content {
    padding: 15px;
}

.social-icon {
    font-size: 24px;
    margin-right: 10px;
}

.social-facebook {
    color: #3b5998;
}

.social-instagram {
    color: #e4405f;
}

.social-twitter {
    color: #1da1f2;
}

.social-tiktok {
    color: #000000;
}

.social-scroll-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
}

.social-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.social-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 8px;
}

/* Pie de página */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-title {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-title:after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--secondary);
    margin-top: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    background-color: rgba(0,0,0,0.2);
    padding: 15px 0;
    margin-top: 30px;
    font-size: 14px;
}

.footer-contact {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    margin-right: 10px;
    margin-top: 5px;
}

.footer-policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.footer-policy-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
}

.footer-policy-links a:hover {
    color: white;
}

/* Modales */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    background-color: var(--primary);
    color: white;
    border-radius: 12px 12px 0 0;
}

.btn-close {
    filter: invert(1);
}

.maintenance-modal .modal-content {
    border: 2px solid var(--primary);
}

.maintenance-modal .modal-header {
    background-color: var(--secondary);
}

/* Botón de accesibilidad */
.accessibility-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.accessibility-button:hover {
    background-color: var(--secondary);
    transform: scale(1.1);
}

/* Modal de búsqueda */
.search-modal .modal-content {
    border-radius: 12px;
}

.search-modal .modal-header {
    background-color: var(--primary);
    color: white;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item h6 {
    margin-bottom: 5px;
    color: var(--primary);
}

.search-result-item p {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* ==========================================================================
   ESTILOS PARA ACCESIBILIDAD
   ========================================================================== */
.high-contrast {
    filter: contrast(150%);
}

/* Navegación con teclado */
.keyboard-navigation .nav-link:focus,
.keyboard-navigation .dropdown-item:focus,
.keyboard-navigation .btn:focus,
.keyboard-navigation a:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   ESTILOS RESPONSIVOS
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 160px;
    }
    
    .header {
        top: 88px;
    }
    
    .slider-item {
        height: 400px;
    }
    
    .footer-policy-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .dropdown-menu {
        margin-left: 15px;
        width: 90%;
    }
    
    .dropdown-submenu > .dropdown-menu {
        position: static;
        margin-left: 15px;
        width: 90%;
    }
    
    .accessibility-button {
        bottom: 70px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

@media (max-width: 576px) {
    .gov-bar,
    .top-bar {
        font-size: 12px;
    }
    
    .top-bar .col-md-6 {
        text-align: center !important;
        margin-bottom: 5px;
    }
    
    .slider-item {
        height: 300px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ==========================================================================
   ESTILOS PARA FORMULARIOS DE WORDPRESS
   ========================================================================== */
/* Comentarios */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--gray-100);
    border-radius: 8px;
}

.comment-meta {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Formulario de búsqueda */
.search-form {
    display: flex;
}

.search-form label {
    margin-right: 0.5rem;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px 0 0 4px;
}

.search-form input[type="submit"] {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-form input[type="submit"]:hover {
    background-color: var(--secondary);
}

/* ==========================================================================
   ESTILOS PARA WIDGETS
   ========================================================================== */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.widget li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   ESTILOS PARA PAGINACIÓN
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    color: var(--dark);
}

.page-numbers.current {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-numbers:hover {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* ==========================================================================
   ESTILOS PARA ESTADOS DE POST
   ========================================================================== */
.sticky {
    background-color: var(--light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.bypostauthor {
    background-color: var(--light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 3rem; }