/*
Program: style.css
Author: Thiruwaran Kalvin
CoAuthor: Yaheya Ismail
CoAuthor: Osama Alnajar
Subsystem Team: Frontend
Team: 26
Module: COMP208
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Code
*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px;
}

.card {
    border: 2px solid #000000;
    padding: 15px;
    background-color: #f2f2f2;
}

.card h2 {
    margin-top: 0;
}

.card button {
    margin-top: 15px;
    padding: 10px;
    cursor: pointer;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-weight: bold;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #ffffff;
    border-bottom: 2px solid #000000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-toggle {
    display: none;
    width: 52px;
    height: 52px;
    margin-left: auto;
    padding: 0;
    border: 2px solid #000000;
    background-color: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #000000;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-link {
    text-decoration: none;
    color: #000000;
    font-weight: bold;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #000000;
}

.hero-section {
    background-color: #e6e6e6;
    padding: 100px 20px;
    text-align: center;
    border-bottom: 2px solid #000000;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 40px;
    color: #000000;
}

.search-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid #000000;
    padding: 5px 20px;
}

.search-icon {
    font-size: 1.2rem;
    color: #000000;
    margin-right: 10px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 0;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
}

.universities-section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #000000;
}

.uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.uni-card {
    background: #ffffff;
    border: 2px solid #000000;
    cursor: pointer;
}

.image-placeholder {
    background-color: #cccccc;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-weight: bold;
    border-bottom: 2px solid #000000;
}

.card-content {
    padding: 20px;
    text-align: center;
}

.card-content h3 {
    margin: 0;
    color: #000000;
}

.page-container {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header h1 {
    font-size: 2rem;
    color: #000000;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    padding: 8px 15px;
    font-weight: bold;
    cursor: pointer;
}

.filter-btn.active {
    background-color: #000000;
    color: #ffffff;
}

.accom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.accom-card {
    background: #ffffff;
    border: 2px solid #000000;
    display: flex;
    flex-direction: column;
}

.accom-card .image-placeholder {
    height: 180px;
    position: relative;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 0.9rem;
}

.accom-card .card-content {
    padding: 15px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.accom-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.location-text {
    margin: 0 0 20px 0;
    font-size: 0.9rem;
    color: #333333;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid #000000;
    padding-top: 15px;
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: bold;
}

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #555555;
}

.accom-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.photo-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    height: 350px;
}

.photo-main {
    height: 100%;
    border: 2px solid #000000;
}

.photo-grid-small {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
}

.photo-grid-small .image-placeholder {
    height: 100%;
    border: 2px solid #000000;
    font-size: 0.8rem;
    border-bottom: 2px solid #000000;
}

.accom-info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.price-box {
    font-size: 1.2rem;
    border: 2px solid #000000;
    padding: 20px;
    background: #f2f2f2;
}

.map-placeholder {
    margin-top: auto;
    min-height: 140px;
    background-color: #e6e6e6;
    border: 2px solid #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-align: center;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
}

.title-row h1 {
    margin: 0;
    font-size: 2.2rem;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-box {
    border: 2px solid #000000;
    padding: 10px 15px;
    font-size: 1.2rem;
    font-weight: bold;
    background: #f2f2f2;
}

.rating-text {
    font-size: 1rem;
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    border: 2px solid #000000;
    padding: 5px 10px;
    font-size: 0.85rem;
    font-weight: bold;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-box {
    border: 2px solid #000000;
    padding: 20px;
    margin-bottom: 20px;
    background: #ffffff;
}

.info-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #000000;
    padding-bottom: 5px;
}

.info-box p {
    line-height: 1.5;
}

.review-card {
    border: 2px solid #000000;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.verified-tag {
    background: #000000;
    color: #ffffff;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.unverified-tag {
    background: #ffffff;
    color: #000000;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.review-stars {
    font-weight: bold;
    margin-bottom: 10px;
}

.breakdown-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.breakdown-row span {
    font-weight: bold;
    min-width: 70px;
}

.bar-bg {
    flex-grow: 1;
    height: 15px;
    background-color: #e6e6e6;
    border: 2px solid #000000;
}

.bar-fill {
    height: 100%;
    background-color: #000000;
}

/* overlay of registration */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #4a5568;
}

.modal-subtitle {
    text-align: center;
    margin-bottom: 25px;
    color: #4a5568;
    font-size: 0.9rem;
}

.reg-flex-row {
    display: flex;
    gap: 15px;
}

.reg-flex-row>.reg-input-group {
    flex: 1;
}

.star-rating-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 256, 255, 0.3);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.accom-hero {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 40px;
    width: 100%;
}

.photo-gallery {
    flex: 1.5;
    display: flex;
    gap: 10px;
    height: 450px;
}

.photo-main {
    flex: 2;
    height: 100%;
    overflow: hidden;
    border: 2px solid #000;
    border-radius: 12px;
    position: relative;
}

#street-view-container {
    flex: 2;
    height: 100%;
    min-height: 400px;
    background-color: #f0f0f0;
    border-radius: 12px;
    border: 2px solid #000;
    position: relative;
}

#main-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.photo-grid-small {
    flex: 0.5;
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    height: 100%;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border: 2px solid #000000;
    border-radius: 12px;
    background: #ffffff;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-img.is-active {
    outline: 3px solid #000000;
    outline-offset: -3px;
}

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

.accom-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #000;
    min-width: 350px;
    box-sizing: border-box;
}

#googleMap {
    width: 100%;
    height: 250px;
    min-height: 250px;
    border: 2px solid #000;
    border-radius: 12px;
    margin-top: auto;
    background-color: #f0f0f0;
    display: block !important;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

#googleMap img {
    max-width: none !important;
    height: auto !important;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 2.5rem;
}

.star-rating input { display: none; }

.star-rating label {
    color: #ccc;
    cursor: pointer;
    -webkit-text-stroke: 1.5px #000;
    margin: 0 2px;
}

.star-rating label:before {
    content: "\2605";
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #FFD700 !important;
}

.qa-item {
    border: 2px solid #000000;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.qa-question {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.qa-answer {
    margin-left: 20px;
    padding: 10px;
    border-left: 3px solid #000000;
    background: #ffffff;
    margin-bottom: 10px;
}

.vote-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-weight: bold;
}

.vote-btn {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 1rem;
}

.vote-btn:hover {
    background-color: #e6e6e6;
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-container > * {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
    text-decoration: none;
}

@media (max-width: 950px) {
    .desktop-only { display: none; }
}

.navbar {
    gap: 20px;
    flex-wrap: wrap;
}

/*This is for mobile devices and the CSS changes when it detects it..*/
@media (max-width: 768px) {

    .details-grid, .accom-grid, .uni-grid, .card-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 15px 5%;
    }

    .logo {
        max-width: calc(100% - 68px);
        font-size: 1.35rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-actions {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        margin-left: 0;
        padding-top: 15px;
        border-top: 2px solid #000000;
        align-items: stretch;
        gap: 12px;
    }

    .navbar.nav-open .nav-actions {
        display: flex;
    }

    .nav-actions .btn-primary, .nav-actions .nav-link {
        width: 100%;
        text-align: center;
        margin-bottom: 0;
        padding: 14px 16px;
        border: 2px solid #000000;
        background-color: #ffffff;
    }

    .nav-actions .btn-primary {
        background-color: #000000;
        color: #ffffff;
    }

    .accom-hero {
        flex-direction: column;
    }
    .photo-gallery {
        flex-direction: column;
        height: auto;
    }
    .photo-main, #street-view-container {
        height: 300px;
        min-height: 250px;
        width: 100%;
    }
    .photo-grid-small {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        height: auto;
        padding-bottom: 8px;
        margin-top: 12px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .photo-grid-small .photo-item {
        flex: 0 0 88px;
        width: 88px;
        height: 88px;
        scroll-snap-align: start;
    }
    .photo-grid-small .gallery-img {
        border-radius: 10px;
    }
    .photo-grid-small .photo-overlay {
        font-size: 0.8rem !important;
        text-align: center;
        padding: 8px;
    }

    .reg-flex-row {
        flex-direction: column;
    }


    .modal-content {
        max-width: 95vw;
        padding: 15px;
    }
    .qa-answer {
        margin-left: 0;
        border-left: none;
        border-top: 2px solid #000;
        padding-top: 10px;
    }
}

.site-footer {
    background-color: #f8f9fa;
    padding: 35px 20px 20px;
    text-align: center;
    border-top: 2px solid #000000;
    margin-top: 50px;
    width: 100%;
}

.footer-brand {
    margin-bottom: 15px;
}

.footer-brand h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
    color: #000000;
    letter-spacing: -1px;
}

.team-badge {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    color: #000000;
    padding: 6px 15px;
    border-radius: 0;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: bold;
    margin-top: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #000000;
    font-size: 1rem;
    font-weight: bold;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-legal {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: #6b7280;
    text-decoration: none;
}

.footer-legal a:hover {
    color: #000000;
}