/*
Theme Name: GeneratePress Child - CICEC URJC
Theme URI: https://cicecurjc.es
Description: Child theme para CICEC URJC basado en GeneratePress. Incluye customización del header, menú multiidioma y estilos personalizados.
Author: CICEC URJC
Author URI: https://cicecurjc.es
Template: generatepress
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: generatepress-child
*/

/* Estilos personalizados del header URJC */
.header-tag_urjc {
    background-color: #cb0017 !important;
    padding: 1rem 0;
}

.header-container_urjc {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.header-svg-logo_urjc {
    height: 50px;
    width: auto;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-links a {
    color: #fff;
    text-decoration: none;
}

.menu-links > a:hover {
    text-decoration: underline;
}

.menu-item-has-children {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.menu-item-has-children::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.menu-parent-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    padding: 0;
}

.menu-links .menu-parent-btn:hover,
.menu-links .menu-parent-btn:focus,
.menu-links .menu-parent-btn:active {
    background: transparent !important;
    box-shadow: none !important;
}

.menu-parent-btn:hover {
    text-decoration: underline;
}

.menu-parent-arrow {
    font-size: 1rem;
    line-height: 1;
}

.menu-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
    padding: 8px 0;
    z-index: 1000;
}

.menu-submenu.active {
    display: flex;
    flex-direction: column;
}

.menu-submenu a {
    color: #333;
    padding: 10px 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.menu-submenu .menu-submenu-disabled {
    display: block;
    color: #8d8d8d;
    padding: 10px 14px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: not-allowed;
    pointer-events: none;
}

.menu-submenu a:hover {
    background: #f5f5f5;
}

@media screen and (min-width: 769px) {
    .menu-item-has-children::after {
        height: 26px;
    }

    .menu-item-has-children:hover > .menu-submenu,
    .menu-item-has-children:focus-within > .menu-submenu {
        display: flex;
        flex-direction: column;
    }

    .menu-submenu {
        top: calc(100% + 22px);
        min-width: 180px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
        padding: 8px 0;
    }

    .menu-submenu a {
        color: #222;
        padding: 10px 16px;
    }

    .menu-submenu .menu-submenu-disabled {
        color: #8d8d8d;
        padding: 10px 16px;
    }

    .menu-submenu a + a {
        margin-top: 0;
    }

    .menu-submenu a:hover {
        background: transparent;
        text-decoration: underline;
    }
}

.menu-separator {
    color: #fff;
}

/* Language Switcher Dropdown */
.language-switcher-wrapper {
    position: relative;
}

.language-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.language-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-switcher-btn img {
    display: block;
}

.language-switcher-btn .lang-arrow {
    color: #fff;
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.language-switcher-btn.active .lang-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-width: 70px;
    z-index: 1000;
}

.language-dropdown.active {
    display: block;
    animation: dropdown-fade-in 0.2s ease;
}

.language-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option:hover img {
    transform: scale(1.1);
}

.lang-option.current {
    background: rgba(203, 0, 23, 0.5);
    pointer-events: none;
}

.lang-option.current::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #cb0017;
}

.lang-option img {
    display: block;
    transition: transform 0.3s;
}

/* Menu hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Usuario logueado */
.urjc_header_user_wrapper {
    position: relative;
}

.urjc_header_user {
    cursor: pointer;
}

.user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #fff;
    color: #cb0017;
    font-weight: bold;
    transition: all 0.3s;
}

.user-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: -15px;
    background-color: #fff;
    color: #333;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
    animation: dropdown-fade-in 0.2s ease;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flecha del dropdown */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.user-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.user-dropdown-header strong {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 4px;
}

.user-dropdown-header .user-email {
    display: block;
    color: #666;
    font-size: 0.85rem;
}

.user-dropdown-links {
    padding: 8px 0;
}

.user-dropdown-links .dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown-links .dropdown-link:hover {
    background-color: #f5f5f5;
}

.user-dropdown-links .dropdown-link.logout {
    color: #cb0017;
    border-top: 1px solid #eee;
}

.user-dropdown-links .dropdown-link.logout:hover {
    background-color: #fff0f0;
}

.user-dropdown-links .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .menu-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: #cb0017;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 999;
        align-items: flex-start;
        gap: 2rem;
    }

    .menu-links.active {
        right: 0;
    }

    .menu-separator {
        display: none;
    }

    .menu-item-has-children {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .menu-item-has-children::after {
        display: none;
    }

    .menu-parent-btn {
        width: 100%;
        justify-content: space-between;
        padding: 8px 10px;
    }

    .menu-submenu {
        position: static;
        min-width: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        box-shadow: none;
        padding: 6px 0;
    }

    .menu-submenu a {
        color: #fff;
        padding: 8px 10px 8px 14px;
    }

    .menu-submenu .menu-submenu-disabled {
        color: rgba(255, 255, 255, 0.55);
        padding: 8px 10px 8px 14px;
    }

    .menu-submenu a:hover {
        background: rgba(255, 255, 255, 0.14);
    }

    .header-container_urjc {
        padding: 0 1rem;
    }
}

/* ========================================
   FOOTER PERSONALIZADO URJC
   ======================================== */

#page {
    flex: 1 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#content {
    flex: 1 0 auto;
}

.site-footer {
    margin-top: auto;
}

.urjc-custom-footer {
    background-color: #000;
    color: #fff;
    padding: 40px 20px;
}

.urjc-footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.urjc-footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.urjc-footer-col-legal {
    flex: 1 1 60%;
    text-align: right;
}

.urjc-copy {
    margin: 0;
    font-size: 0.9rem;
}

.urjc-footer-link {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.urjc-footer-link:hover {
    opacity: 0.8;
}

.footer-separator {
    margin: 0 5px;
}

.urjc-footer-col-images {
    flex: 0 0 auto;
    text-align: left;
}

.urjc-footer-logo {
    height: 64px;
    padding: 5px;
}

/* Footer responsive */
@media screen and (max-width: 768px) {
    .urjc-footer-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .urjc-footer-col-legal,
    .urjc-footer-col-images {
        flex: 1 0 100%;
        text-align: center !important;
    }

    .urjc-footer-logo {
        height: 50px;
    }
}

/* MOOC 2 landing */
.urjc-mooc2-coming-soon {
    width: min(980px, calc(100% - 32px));
    margin: 40px auto 28px;
    padding: 22px 20px;
    text-align: center;
    border: 1px solid #e6e6e6;
    background: #fafafa;
}

.urjc-mooc2-coming-soon__title {
    margin: 0;
    color: #cb0017;
    font-size: clamp(44px, 7vw, 74px);
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

@media screen and (max-width: 768px) {
    .urjc-mooc2-coming-soon {
        width: calc(100% - 24px);
        margin: 28px auto 20px;
        padding: 16px 12px;
    }

    .urjc-mooc2-coming-soon__title {
        font-size: clamp(30px, 10vw, 48px);
    }
}

