/* General Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Top Contact/Hours Bar --- */
.top-bar {
    background-color: #f0f0f0; /* Light grey background from image */
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item i {
    color: #000; /* Assuming black icon */
    font-size: 1.2em;
}

/* --- Header and Navigation --- */
header {
    padding: 20px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-uap {
    font-size: 3em;
    font-weight: bold;
    color: #000;
    /* Adjust for the yellow '& P' from the image if needed, here just showing 'UA&P' */
}

.logo-text {
    font-size: 1.2em;
    font-weight: 100;
    margin-left: 10px;
    line-height: 1.1;
    max-width: 200px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: 100;
    padding: 0 15px;
    font-size: 0.9em;
}

nav ul li a:hover {
    color: #f7a600; /* Optional: A hover effect */
}

/* --- Hero/Search Section (Library Image) --- */
/* --- Hero/Search Section (Library Image) --- */
.hero-section {
    background-image: url('../images/library.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh; /* Full height for better centering */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55); /* Dark overlay for legibility */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.welcome-text {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

/* Centered search box */
.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 25px auto;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}

.search-box input {
    flex-grow: 1;
    padding: 14px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    border-radius: 50px 0 0 50px;
}

.search-box button {
    padding: 14px 25px;
    border: none;
    background-color: #ffc107;
    cursor: pointer;
    border-radius: 0 50px 50px 0;
    transition: background 0.3s;
}

.search-box button i {
    color: #000;
    font-size: 1.2em;
}

.search-box button:hover {
    background-color: #e0a800;
}

/* Login button styling */
.login-button {
    background-color: #ffc107;
    color: #000;
    border: none;
    padding: 12px 45px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-button:hover {
    background-color: #e0a800;
    color: #fff;
    transform: translateY(-2px);
}



/* --- News Section --- */
.news-section {
    padding: 50px 0;
    text-align: center;
}

.news-section h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
}

.news-grid {
    display: flex;
    gap: 30px;
    justify-content: space-between;
}

.news-card {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #ccc; /* Placeholder background */
}

.news-card:nth-child(1) .card-image {
    background-image: url('image_7547a8.jpg');
}
.news-card:nth-child(2) .card-image {
    background-image: url('image_7547a8.jpg');
}
.news-card:nth-child(3) .card-image {
    background-image: url('image_7547a8.jpg');
}


.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 5px;
}

.card-content .date {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.card-content p {
    margin-bottom: 15px;
    font-size: 0.95em;
    /* Limit lines for consistent height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.read-more {
    text-decoration: none;
    color: #000;
    border: 1px solid #000;
    padding: 8px 15px;
    display: inline-block;
    border-radius: 5px;
}

.read-more :hover {
    color: #f7a600;

}

/* --- Library Events Section --- */
.events-section {
    padding: 50px 0;
    background-color: #fff;
    text-align: center;
}

.events-section h2 {
    margin-bottom: 30px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.event-card {
    border: 1px solid #ddd;
    padding: 20px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 5px;
}

.event-card h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.event-details {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #555;
}

.detail-item i {
    margin-right: 5px;
}

/* --- FAQ Section --- */
/* --- FAQ Section --- */
.faq-section {
    padding: 50px 0;
    text-align: center;
}

.faq-section h2 {
    margin-bottom: 10px;
}

.faq-section h3 {
    font-size: 1.4em;
    margin-bottom: 30px;
}

.faq-item {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 10px;
    border-bottom: 1px solid #ddd;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1em;
}

/* Style for the icon */
.collapse-icon {
    transition: transform 0.3s ease;
}

/* Initial state for icons (pointing down when collapsed) */
.collapse-icon i {
    font-size: 0.8em;
    color: #000;
}

/* Icon rotation when the item is active (expanded) */
.faq-item.active .collapse-icon i {
    transform: rotate(180deg);
}

/* The Answer Content */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding-bottom 0.4s ease-in-out;
    padding: 0 0 0 0; /* Padding is zero when collapsed */
    text-align: left;
}

.faq-answer.show {
    max-height: 200px; /* Needs to be larger than the content height */
    padding-bottom: 20px; /* Padding added when expanded */
    border-bottom: 1px solid #ddd; /* Separator line for clarity */
}

.faq-answer p {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
}

.read-more-faq {
    background: none;
    color: #000;
    border: 1px solid #000;
    padding: 10px 30px;
    margin-top: 30px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
}

/* --- Footer --- */
footer {
    background-color: #f0f0f0;
    border-top: 1px solid #eee;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-logo {
    flex-basis: 30%;
}

.footer-logo .logo-uap {
    /* Style to match header logo */
    font-size: 3em;
    font-weight: bold;
    color: #000;
}

.footer-logo .logo-text {
    /* Style to match header logo text */
    font-size: 1.2em;
    font-weight: bold;
    margin-left: 10px;
    line-height: 1.1;
    max-width: 200px;
}

.copyright {
    margin-top: 15px;
    font-size: 0.8em;
    color: #777;
}

.footer-block {
    flex-basis: 20%;
}

.footer-block h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.footer-block p {
    font-size: 0.9em;
    margin-bottom: 8px;
}

.social-icon {
    font-size: 2em;
    color: #000; /* Facebook icon in black */
    display: inline-block;
}

/* Optional: Media Queries for Responsiveness */
@media (max-width: 768px) {
    .top-bar .container, .nav-container, .news-grid, .footer-content, .events-grid {
        flex-direction: column;
        text-align: center;
    }

    .top-bar .container {
        gap: 10px;
    }

    .nav-container {
        gap: 20px;
    }
    
    nav ul {
        padding-top: 10px;
    }

    nav ul li a {
        padding: 0 10px;
    }

    .news-grid {
        gap: 20px;
    }

    .footer-content {
        align-items: center;
        gap: 30px;
    }

    .footer-block {
        flex-basis: 100%;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {
    .welcome-text {
        font-size: 2rem;
    }
    .search-box {
        width: 90%;
    }
    .login-button {
        padding: 10px 35px;
        font-size: 1rem;
    }
}
