/* 
   Biblioteca UPCH - Modern Library Website
   Custom CSS Styles
*/

/* ===== GENERAL STYLES ===== */
:root {
    --primary-color: #ba0c2f !important;
    --primary-dark: #8e0a24;
    --secondary-color: #274a84 !important;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark-navy: #001233;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.section-title {
    position: relative;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-divider {
    height: 4px;
    width: 70px;
    background: var(--primary-color);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* ===== HEADER STYLES ===== */
.top-bar {
    padding: 8px 0;
    font-size: 0.9rem;
    background-color: var(--secondary-color) !important;
    color: var(--text-light);
}

.top-bar .list-inline-item {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
}

.top-bar .list-inline-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.top-bar .contact-info li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    transition: color 0.3s ease;
}

.top-bar .row > div {
    display: flex;
    align-items: center;
    height: 100%;
}

.top-bar .contact-info, .top-bar .social-icons {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.top-bar .contact-info li:hover {
    color: var(--primary-color);
}

.top-bar .contact-info i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.top-bar .contact-info li:hover i {
    transform: scale(1.1);
}

.top-bar .social-icons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    width: 100%;
}

.top-bar .social-icons .list-inline-item {
    margin-left: 20px !important;
}

.top-bar .social-icons i {
    font-size: 1.2rem;
    margin-right: 0;
    width: auto;
    transition: transform 0.3s ease, color 0.3s ease;
}

.top-bar .social-icons a:hover i {
    transform: translateY(-3px);
    color: var(--primary-color);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-light) !important;
}

.navbar-brand .text-primary {
    color: var(--primary-color) !important;
}

.navbar {
    will-change: opacity, padding, height;
    background-color: var(--primary-color) !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Estilos para el logo/marca cuando se hace scroll */
.navbar.scrolled .navbar-brand {
    font-size: 1.5rem;
    transform: scale(0.9);
}

/* Estilos para los enlaces del menú cuando se hace scroll */
.navbar.scrolled .nav-link {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px;
    font-weight: 600;
}


.navbar .nav-link {
    font-weight: 500;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-light) !important;
}

.navbar-brand, .navbar .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transiciones mejoradas para la barra de navegación */
.navbar {
    transform-origin: top;
}

.navbar.scrolled {
    transform: translateY(0);
}

/* Espacio para compensar el navbar fijo */
body {
    padding-top: 75px; /* Ajustar según la altura del navbar */
}

/* Ajustes adicionales para el navbar */
.navbar .container {
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    position: relative;
}

.hero-section h1 {
    color: var(--dark-color);
}

.hero-section h2 {
    color: var(--primary-color);
}

.hero-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.hero-image-container img {
    transition: transform 0.5s ease;
}

.hero-image-container:hover img {
    transform: scale(1.03);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 5rem 0;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

/* ===== SERVICES SECTION ===== */
.services-section {
    padding: 5rem 0;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

/* Acordeón de servicios */
.accordion-services .accordion-item {
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.accordion-services .accordion-header {
    margin: 0;
}

.accordion-services .accordion-button {
    background: white;
    padding: 20px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    border: none;
    box-shadow: none;
}

.accordion-services .accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.accordion-services .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

.accordion-services .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.accordion-services .accordion-body {
    padding: 20px;
    background-color: white;
}

.service-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--secondary-color);
}

.accordion-services .accordion-button:not(.collapsed) .service-icon {
    color: var(--text-light);
}

.service-card .icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(186, 12, 47, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box i {
    font-size: 28px;
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* ===== DIGITAL LIBRARY SECTION ===== */
.digital-library-section {
    padding: 5rem 0;
}

.digital-resource-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.resource-list {
    list-style: none;
    padding-left: 0;
}

.resource-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.resource-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resource-list a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.resource-list a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.digital-card-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.digital-card-info p {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* ===== SCHEDULE SECTION ===== */
.schedule-section {
    padding: 5rem 0;
}

.schedule-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.schedule-day {
    padding: 2rem;
    text-align: center;
    border-right: 1px solid #eee;
}

.schedule-day:last-child {
    border-right: none;
}

.schedule-day h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.schedule-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.schedule-note {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 5rem 0;
}

.contact-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-info {
    list-style: none;
    padding-left: 0;
}

.contact-info li {
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--dark-color);
    color: #fff;
    transform: translateY(-3px);
}

/* ===== UPCH LEE SECTION ===== */
.upch-lee-section {
    padding: 5rem 0;
    background-color: #fff;
}

.quote-card {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 1rem;
    text-align: center;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--dark-color);
}

/* ===== FOOTER ===== */
.footer {
    padding: 5rem 0 3rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer .social-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.footer .social-link.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ===== HERO SECTION STYLES ===== */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(186, 12, 47, 0.03) 0%, rgba(29, 53, 94, 0.05) 100%);
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(186, 12, 47, 0.15), transparent 60%),
                radial-gradient(circle at bottom left, rgba(29, 53, 94, 0.15), transparent 60%);
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, #fff 0%, transparent 100%);
    z-index: -1;
}

.hero-section h1 {
    color: var(--secondary-color);
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-section h2 {
    color: var(--primary-color);
    font-weight: 600;
}

/* Slider de imágenes */
.hero-slider {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.hero-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

.slide {
    display: none;
    width: 100%;
}

.slide.active {
    display: block;
    animation: fadeIn 1s ease-in-out;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.5s ease;
}

.slide:hover img {
    transform: scale(1.02);
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .about-section, .services-section, .digital-library-section, 
    .schedule-section, .contact-section, .upch-lee-section {
        padding: 4rem 0;
    }
    
    .top-bar .list-inline-item {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .top-bar .list-inline-item.ms-3 {
        margin-left: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .about-section, .services-section, .digital-library-section, 
    .schedule-section, .contact-section, .upch-lee-section {
        padding: 3rem 0;
    }
    
    .schedule-day {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .schedule-day:last-child {
        border-bottom: none;
    }
    
    .top-bar {
        font-size: 0.85rem;
        padding: 0.6rem 0;
        letter-spacing: 0.2px;
    }
    
    .top-bar .col-md-4.text-md-end {
        text-align: right !important;
    }
    
    .top-bar .contact-info {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .top-bar .contact-info .list-inline-item {
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .top-bar .social-icons {
        justify-content: flex-end;
        height: 100%;
    }
    
    .top-bar .social-icons .list-inline-item {
        margin-left: 18px !important;
    }
}

/* ===== EXTRA SMALL DEVICES ===== */
@media (max-width: 575.98px) {
    .top-bar {
        padding: 0.6rem 0 !important;
    }
    
    .top-bar .row {
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
    }
    
    .top-bar .row {
        align-items: center;
    }
    
    .top-bar .col-md-8, .top-bar .col-md-4 {
        display: flex;
        align-items: center;
        height: auto;
    }
    
    .top-bar .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .top-bar .contact-info .list-inline-item {
        margin-bottom: 0.4rem;
        margin-right: 0;
    }
    
    .top-bar .contact-info .list-inline-item:last-child {
        margin-bottom: 0;
    }
    
    .top-bar .col-md-4, .top-bar .col-md-8 {
        width: 100%;
        text-align: center !important;
    }
    
    .top-bar .col-md-4 {
        margin-top: 0.8rem;
    }
    
    .top-bar .social-icons {
        justify-content: center;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .top-bar .social-icons .list-inline-item:first-child {
        margin-left: 0 !important;
    }
    
    .top-bar .social-icons .list-inline-item {
        margin-left: 15px !important;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}
