/* ============================================
   Estilos para Responsabilidad Social Universitaria
   ============================================ */

/* Banner RSU */
.rsu-banner {
    background: linear-gradient(135deg, #2d8a3e 0%, #359444 100%);
    padding: 30px 20px;
    position: relative;
}

.rsu-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: #ff6b35;
    border-radius: 2px;
}

.rsu-banner .banner-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.rsu-banner h1 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rsu-banner .banner-contact {
    color: #ffffff;
    text-align: right;
}

.rsu-banner .banner-contact p {
    margin: 5px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Contenedor principal - Layout 3 columnas */
.rsu-main {
    background: #f0f0f0;
    padding: 30px 20px;
    min-height: 70vh;
}

.rsu-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 25px;
}

/* Sidebar izquierdo con tabs */
.rsu-sidebar {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
    overflow: hidden;
}

.tabs-menu {
    display: flex;
    flex-direction: column;
}

.tab-button {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.tab-button:last-child {
    border-bottom: none;
}

.tab-button:hover {
    background: #f8f8f8;
}

.tab-button.active {
    background: #ffffff;
    border-left: 4px solid #359444;
}

.tab-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-button.active .tab-text {
    color: #333;
    font-weight: 700;
}

.tab-icon {
    font-size: 16px;
    color: #999;
}

.tab-button.active .tab-icon {
    color: #359444;
}

/* Contenido central */
.rsu-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-in;
}

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

.rsu-content h2 {
    color: #359444;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-transform: uppercase;
}

.rsu-content h3 {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 15px 0;
}

.rsu-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    margin-bottom: 15px;
}

/* Lista de funciones */
.funciones-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.funciones-list li {
    padding: 10px 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    text-align: justify;
    position: relative;
}

.funciones-list li::before {
    content: '\2022';
    color: #359444;
    font-size: 18px;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 8px;
}

/* Sidebar derecho - Widgets */
.rsu-widgets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.widget-box h3 {
    color: #359444;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

.widget-box h4 {
    color: #359444;
    font-size: 15px;
    font-weight: 600;
    margin: 15px 0 0 0;
    text-align: center;
}

.no-events {
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 10px 0;
    margin: 0;
}

.widget-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.btn-add {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    padding: 8px 15px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-add:hover {
    border-color: #359444;
    color: #359444;
}

.btn-calendar {
    color: #359444;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-calendar:hover {
    text-decoration: underline;
}

/* Widget Gestión Ambiental */
.widget-ambiental {
    padding: 0;
    overflow: hidden;
}

.widget-image {
    position: relative;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.widget-link {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: #359444;
    color: #ffffff;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.widget-link:hover {
    background: #2d8a3e;
}

.widget-ambiental h4 {
    padding: 15px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .rsu-container {
        grid-template-columns: 220px 1fr 250px;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .rsu-container {
        grid-template-columns: 1fr;
    }

    .rsu-sidebar {
        position: static;
        order: 1;
    }

    .rsu-content {
        order: 2;
    }

    .rsu-widgets {
        order: 3;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .widget-box {
        flex: 1;
        min-width: 280px;
    }

    .tabs-menu {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        flex: 1;
        min-width: 130px;
        border-bottom: none;
        border-right: 1px solid #e8e8e8;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        padding: 15px 10px;
    }

    .tab-button:last-child {
        border-right: none;
    }

    .tab-button.active {
        border-left: none;
        border-bottom: 3px solid #359444;
    }

    .rsu-banner h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .rsu-banner .banner-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .rsu-banner .banner-contact {
        text-align: left;
    }

    .rsu-banner .banner-contact p {
        justify-content: flex-start;
    }

    .rsu-banner h1 {
        font-size: 1.5rem;
    }

    .rsu-content {
        padding: 20px;
    }

    .rsu-content h2 {
        font-size: 20px;
    }

    .widget-box {
        min-width: 100%;
    }

    .rsu-widgets {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .rsu-main {
        padding: 20px 10px;
    }

    .rsu-content {
        padding: 15px;
    }

    .rsu-banner h1 {
        font-size: 1.3rem;
    }

    .tab-button {
        min-width: 100px;
        padding: 12px 8px;
    }

    .tab-text {
        font-size: 12px;
    }

    .funciones-list li {
        font-size: 13px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
