@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,100..900;1,100..900&family=Baskervville:ital@0;1&family=Bebas+Neue&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=DM+Serif+Display:ital@0;1&family=Handjet:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    padding: 0.5em;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    margin-left: 20px;
}

header nav {
    font-size: 12pt;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

header nav a {
    margin: 0 10px;
    text-decoration: none;
    color: black;
}

header nav a:hover {
    text-decoration: underline;
}

header .profile-icon {
    margin-right:20px;
}

.hero {
    width: 100%;
    text-align: center;
    padding: 2em;
    background-image: url('village.png');
    background-size: cover;
    color: #7b7b7b;
    height: 700px;
}

.hero h1 {
    margin-bottom: 0.5em;
    color: white;
    font-size: 30pt;
    font-weight: bold;
    margin-top: 13%;
}

.hero input {
    font-weight: 300;
    padding: 0.5em;
    width: 848px;
    height: 55px;
    border-radius: 10px;
    border: none;
    background-color: #ECF0F1;
    padding: 20px;
    font-size: 10pt;
}
.top-rated, .other-colleges {
    width: 80%;
    margin: 22px 0;
    text-align: center;
    position: relative;
}

.carousel-container {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.college-carousel {
    display: flex;
    overflow: hidden;
    width: 100%;
    scroll-behavior: smooth;
    gap: 1em;
}

.college-card {
    min-width: calc(20% - 10px);
    padding: 1em;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}

.dorm-carousel {
    display: flex;
    width: 100%;
    scroll-behavior: smooth;
}

.top-rated p, .other-colleges h2{
    margin-top: 20px;
}
.top-rated h2, .other-colleges h2{
    font-size: 25pt;
    font-weight: bold;
}

.dorm-card{
    min-width: calc(33.33% - 11px);
    margin: 0.5em;
    padding: 1em;
    background-color: #FFFFFF;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}


.dorm-card img, .college-card img{
    width: 100%;
    border-radius: 8px;
}

.carousel-arrow {
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.left-arrow {
    left: -20px;
}

.right-arrow {
    right: -20px;
}

footer {
    width: 100%;
    background-color: #f1f1f1;
    padding: 22px;
    display: flex;
    justify-content: space-around;
    font-size: 0.9em;
}

footer p, footer a {
    color: #666;
}

footer .footer-links, .footer-help, .footer-newsletter {
    display: flex;
    flex-direction: column;
}

footer a {
    text-decoration: none;
    color: #333;
    margin-top: 0.5em;
}

.top-image{
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0px;
}

#result-top{
    background-image: url(resulttop.png);
}

.top-label{
    font-weight: bold;
    text-align: center;
    margin: auto;
    color:white;
    width: 100%;

}

#result-bar{
    background-color: #2C3E50;
    color: white;
    width: 100%;
    padding: 20px;
    margin-bottom: 10px;
}

#bar-items{
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-left: 20%;
    margin-right: 20%;

}

.return-link{
    text-align: center;
    width: 100%;
    margin: auto;
    margin-bottom: 20px;
}

.return-link a{
    color: black;
}

.dorm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 80px;
    width: 80%;
    margin: 2em auto;
}

.dorm-grid a{
    text-decoration: none;
}

.dorm-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    position: relative;
    padding-bottom: 1em;
    height: 600px;
}

.dorm-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-bottom: 2px solid #ddd;
}

.dorm-card h3 {
    margin: 0.5em 0;
    font-size: 1.2em;
    color: #333;
}

.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 0.5em;
}

.stars {
    font-size: 1em;
    color: #ffd700; /* Gold color for stars */
}

.reviews {
    font-size: 0.9em;
    color: #666;
}

.info-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: none;
}

.dorm-card:hover .info-btn {
    display: block;
}

.dorm-card:hover img {
    opacity: 0.8;
}
.search-page {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.search-logo {
    text-align: center;
}

.search-logo img {
    margin-top: 20px;
    margin-bottom: 10px;
}

.search-page h1 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 1em;
    text-align: center;
    font-weight: bold;
}

.search-form {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5em;
    align-items: center;

}

#search-top{
    background-image: url(searchtop.png);
}

.search-form label {
    font-weight: 500;
    color: #333;
    text-align: left;
}

.search-form select {
    padding: 10px;
    border: 2px solid #dcdcdc;
    border-radius: 5px;
    font-size: 1em;
    color: #555;
    width: 100%;
    appearance: none;
    background: white;
    position: relative;
}

.search-form select:focus {
    border-color: #333;
    outline: none;
}

/* Add a custom dropdown arrow */
.search-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.search-button {
    grid-column: 1 / -1;
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    color: white;
    background-color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 40px;
    width: 200px;
    justify-self: center;
}

.search-button:hover {
    background-color: #555;
}

/* Make it responsive for smaller screens */
@media (max-width: 600px) {
    .search-form {
        grid-template-columns: 1fr;
        gap: 0.5em;
    }

    .search-form label {
        margin-top: 1em;
    }

    .search-button {
        width: 100%;
    }
}