/* ==========================================================================
   UDH - DOCENCIA E INVESTIGACIÓN STYLES
   ========================================================================== */

/* Container and Layout Variables */
:root {
    --primary-color: #892217;
    --primary-light: #a82c1d;
    --primary-dark: #7b1d13;
    --secondary-color: #f5f5f5;
    --text-main: #333333;
    --text-light: #666666;
    --accent-color: #b8945f;
    --bg-light: #fafafa;
    --border-color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   1. SLIDER SECTION
   ========================================================================== */
.udh-slider-section {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
    overflow: hidden;
    background-color: #000;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 60vh; /* Responsive height */
    min-height: 400px;
    max-height: 600px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: none;
}

.slide.active {
    opacity: 1;
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7); /* Darken image to make text readable */
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: white;
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease 0.3s;
}

.slide.active .slide-caption {
    transform: translateY(0);
    opacity: 1;
}

.slide-caption h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-caption p {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Slider Controls */
.slider-prev, .slider-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    background-color: rgba(0,0,0,0.3);
    border: none;
    z-index: 10;
}

.slider-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.slider-prev:hover, .slider-next:hover {
    background-color: rgba(0,0,0,0.8);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.dot.active, .dot:hover {
    background-color: white;
    transform: scale(1.2);
}


/* ==========================================================================
   2. UDH CONTENT LAYOUT
   ========================================================================== */
.udh-content-section {
    padding: 40px 20px;
    margin-bottom: 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Merriweather', serif;
    color: var(--primary-dark);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.title-underline {
    height: 4px;
    width: 80px;
    background-color: var(--primary-light);
    margin: 0 auto;
    border-radius: 2px;
}

.mision-box {
    background-color: var(--bg-light);
    border-left: 5px solid var(--primary-color);
    padding: 25px 30px;
    margin-bottom: 40px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
    font-style: italic;
    margin: 0;
}

/* Grids and Cards */
.udh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.udh-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.udh-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 25px;
}

.card-header h3 {
    margin: 0;
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
}

.card-body {
    padding: 25px;
}

.content-block {
    margin-bottom: 25px;
}

.content-block h4 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.text-muted {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Contact Info Display */
.contact-group {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.contact-info {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1rem;
}

.contact-info:last-child {
    margin-bottom: 0;
}

.contact-info .icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Copy Feedback Styles */
.contact-info {
    position: relative;
}

.copy-feedback {
    position: absolute;
    bottom: -15px;
    left: 40px; /* Offset to not cover the icon too much */
    background-color: var(--primary-dark);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    animation: slideInUp 0.3s ease;
    z-index: 10;
}

.copy-feedback.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert Box */
.info-alert {
    background-color: #eef5ee;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-alert p {
    margin: 0;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

/* Lists */
.styled-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.styled-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-main);
}

.styled-list li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.two-col-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Badge and IAR */
.iar-box {
    background-color: #f1f8e9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c5e1a5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.badge {
    background-color: #7cb342;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.iar-box strong {
    color: #33691e;
    display: block;
    margin-bottom: 2px;
}

/* Buttons */
.uba-link-container {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary.uba-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(61, 90, 76, 0.2);
}

.btn-primary.uba-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 12px rgba(42, 61, 50, 0.3);
    transform: translateY(-2px);
}

/* Dark theme overrides for UDH */
body.dark-theme .udh-content-section {
    background: #0d121c;
}

body.dark-theme .section-title {
    color: #eef4ff;
}

body.dark-theme .title-underline {
    background-color: #b8945f;
}

body.dark-theme .mision-box {
    background-color: rgba(255,255,255,0.05);
    border-left-color: #b8945f;
    box-shadow: 0 18px 45px rgba(0,0,0,0.45);
}

body.dark-theme .lead-text {
    color: #dce4f3;
}

body.dark-theme .udh-card {
    background-color: #111827;
    box-shadow: 0 15px 40px rgba(0,0,0,0.45);
}

body.dark-theme .card-header {
    background: linear-gradient(135deg, #892217 0%, #a82c1d 100%);
}

body.dark-theme .card-body {
    color: #e6eef8;
}

body.dark-theme .content-block h4 {
    color: #f0f6ff;
    border-bottom-color: rgba(255,255,255,0.12);
}

body.dark-theme .text-muted {
    color: #9fb0cd;
}

body.dark-theme .contact-group {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .contact-info a {
    color: #e1c37f;
}

body.dark-theme .contact-info a:hover {
    color: #fff0b8;
}

body.dark-theme .info-alert {
    background-color: rgba(255,255,255,0.05);
    border-left-color: #b8945f;
}

body.dark-theme .info-alert p {
    color: #d6e0f2;
}

body.dark-theme .styled-list li {
    color: #e4ecf9;
}

body.dark-theme .styled-list li::before {
    color: #b8945f;
}

body.dark-theme .iar-box {
    background-color: rgba(184,148,95,0.12);
    border-color: rgba(184,148,95,0.25);
}

body.dark-theme .badge {
    background-color: #b8945f;
}

body.dark-theme .iar-box strong {
    color: #fbe8a6;
}

body.dark-theme .btn-primary.uba-btn {
    background-color: #b8945f;
    color: #111;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

body.dark-theme .btn-primary.uba-btn:hover {
    background-color: #dcc387;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slider-container {
        height: 40vh;
        min-height: 300px;
    }
    
    .slide-caption h2 {
        font-size: 1.8rem;
    }
    
    .slide-caption p {
        font-size: 1rem;
    }
    
    .two-col-list {
        grid-template-columns: 1fr;
    }
    
    .udh-grid {
        grid-template-columns: 1fr;
    }

    .mision-box {
        padding: 15px 20px;
    }

    .lead-text {
        font-size: 1rem;
    }
}

