﻿/*
Theme Name: UCR
Author: Mauricio
Version: 1.4
Description: Tema tradicional ligero, responsivo y fácil de personalizar.
*/

:root {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --primary-color: #1e3a8a;
    --accent-color: #0284c7;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    background-color: var(--header-bg-color, #ffffff);
    background-image: var(--header-bg-img, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 28px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 100px;
    width: auto;
}

.header-text {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-search-bar {
    background: var(--primary-color);
    padding: 10px 0 15px 0;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.nav-search-bar .container {
    max-width: 100% !important;
    width: 100%;
    padding: 0 16px;
}

.main-navigation {
    width: 100%;
    margin-bottom: 12px;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.main-navigation > div > ul > li {
    position: relative;
    flex-shrink: 0;
}

.main-navigation a {
    display: block;
    padding: 10px 16px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.main-navigation a:hover,
.main-navigation li:hover > a {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 8px 8px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    border: 1px solid var(--border-color);
}

.main-navigation ul ul a {
    color: var(--text-primary);
    padding: 10px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.main-navigation ul ul a:hover {
    background: #f8fafc;
    color: var(--accent-color);
}

.main-navigation li:hover > ul {
    display: flex;
}

.search-box-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.search-box-row form {
    display: flex;
    gap: 8px;
}

.search-box-row input[type="search"] {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    outline: none;
}

.search-box-row input[type="search"]::placeholder {
    color: #e2e8f0;
}

.search-box-row input[type="submit"] {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.slider-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.slider-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.slider-item img:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.mySwiperSingle {
    width: 100%;
    height: 350px;
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.mySwiperSingle .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #ffffff;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 14px !important;
    font-weight: bold;
    color: var(--primary-color);
}

.swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    opacity: 0.5;
    background: var(--text-secondary);
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent-color) !important;
    width: 18px !important;
    border-radius: 4px !important;
}

.main-post {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.main-post > a > img,
.main-post > img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-post h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.main-post h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.main-post h2 a:hover {
    color: var(--accent-color);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.post-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.post-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.post-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-card h3 a:hover {
    color: var(--accent-color);
}

.site-footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 28px 0;
    font-size: 0.9rem;
}

.entry-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 1.2rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    width: auto;
    border-radius: 6px;
}

.entry-content img.alignright,
.entry-content .alignright {
    float: right;
    margin: 0 0 15px 20px;
}

.entry-content img.alignleft,
.entry-content .alignleft {
    float: left;
    margin: 0 20px 15px 0;
}

.entry-content img.aligncenter,
.entry-content .aligncenter {
    display: block;
    margin: 0 auto 15px auto;
}

.entry-content::after {
    content: "";
    display: table;
    clear: both;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.2rem 2rem;
    padding-left: 1rem;
}

.entry-content li {
    margin-bottom: 0.4rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 1.5rem 0 0.8rem 0;
    color: var(--primary-color);
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-flex {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .site-logo img {
        max-height: 70px;
    }

    .main-navigation ul {
        flex-direction: column;
        width: 100%;
    }

    .main-navigation a {
        padding: 8px 12px;
        text-align: center;
    }

    .main-navigation ul ul {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.1);
    }

    .main-navigation ul ul a {
        color: #ffffff;
        padding-left: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .search-box-row {
        justify-content: center;
    }

    .search-box-row form {
        width: 100%;
    }

    .search-box-row input[type="search"] {
        flex: 1;
    }

    .slider-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 20px 0;
    }

    .slider-item img {
        height: 180px;
    }

    .mySwiperSingle {
        height: 220px;
        margin: 20px 0;
    }

    .main-post {
        padding: 16px;
        margin-bottom: 20px;
    }

    .main-post > a > img,
    .main-post > img {
        max-height: 260px;
    }

    .main-post h2 {
        font-size: 1.3rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }

    .entry-content img.alignright,
    .entry-content .alignright,
    .entry-content img.alignleft,
    .entry-content .alignleft {
        float: none;
        display: block;
        margin: 0 auto 15px auto;
    }
}

.header-right-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-custom-img img {
    max-height: 100px;
    width: auto;
}