@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-gradient: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
    --text-dark: #212529;
    --text-light: #6c757d;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --border-color: #dee2e6;
}

/* Base & Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
}

/* (Your Marquee, Promo Banner, Header, Buttons, and Mobile Menu styles remain here, unchanged) */
.news-marquee {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-animation 100s linear infinite;
}

.marquee-content span {
    font-weight: 500;
    margin-right: 5rem;
}

@keyframes marquee-animation {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.news-marquee:hover .marquee-content {
    animation-play-state: paused;
}

h1,
h2,
h3 {
    font-weight: 600;
}

.promo-banner {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.promo-banner p {
    margin: 0;
}

.promo-banner i {
    margin-right: 0.75rem;
}

html.dark-mode .promo-banner {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-container i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.logo-container h1 {
    font-size: 1.4rem;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--text-dark);
}

.desktop-nav a.active {
    color: var(--text-dark);
    border-bottom-color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-icon {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.cta-button-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.5rem;
}

.cta-button-outline:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--card-bg);
    z-index: 2000;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-top h3 {
    font-size: 1.5rem;
}

.close-icon {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-menu a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu .cta-button {
    margin: 1.5rem;
    text-align: center;
}

.hero-section {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    gap: 2rem;
}

.hero-text {
    flex: 1;
}

.hero-subtitle {
    font-weight: 500;
    color: var(--secondary-color);
}

.hero-text h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin: 0.5rem 0 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* --- Sections & Cards --- */
.info-section,
.featured-rentals,
.security-section,
.rentals-hero,
.filter-section,
.about-page,
.all-rentals {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 50px;
}

.info-section h2,
.featured-rentals h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}


/* =================================== */
/* Item Grid & Card Styles
/* =================================== */
.item-grid {
    display: grid;
    /* This creates 2 columns on mobile by default */
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.item-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.item-card-img {
    width: 100%;
    height: 150px;
    /* Perfect for mobile 2-column view */
    object-fit: cover;
}

.item-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-location {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.item-location i {
    color: var(--secondary-color);
}

.item-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.item-price {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.item-price span {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.8rem;
}


/* --- THIS IS THE FIX FOR DESKTOP VIEW --- */
/* On screens larger than 768px (tablets and desktops)... */
@media (min-width: 768px) {
    .item-grid {
        /* Use auto-fit to create a responsive grid with larger cards */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    .item-card-img {
        height: 200px;
        width: 100%;
        object-fit: contain;
        align-self: center;
        padding-top: 30px;
        border-radius: 20px;
        /* Give the image more height on larger cards */
    }

    .item-card-body {
        padding: 0.7rem;
        /* Restore larger padding */
    }

    .item-title {
        font-size: 1.2rem;
        /* Restore larger font size */
    }

    .item-price {
        font-size: 1.2rem;
        /* Restore larger font size */
    }

    .item-location {
        font-size: 0.85rem;
        /* Restore larger font size */
    }
}


/* --- (Rest of your file continues below) --- */
.security-section {
    background: var(--background-gradient);
    text-align: center;
}

.security-content i {
    font-size: 3rem;
    color: var(--secondary-color);
}

.security-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.security-list li i {
    font-size: 1.2rem;
    color: #2ecc71;
    margin-right: 0.5rem;
}

.rentals-hero {
    padding: 2rem;
    text-align: center;
    background: var(--background-gradient);
}

.filter-section {
    padding-top: 0;
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.filter-btn {
    background: #e9ecef;
    color: var(--text-dark);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.how-to-list {
    list-style: none;
}

.how-to-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.how-to-list span {
    background: var(--secondary-color);
    color: white;
    min-width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    margin-right: 1rem;
}

.security-box {
    background: var(--background-gradient);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--secondary-color);
}

.accountability-statement {
    font-weight: 500;
    color: var(--text-dark);
}

.site-footer {
    background: var(--primary-color);
    color: #bdc3c7;
    padding: 3rem 2rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    text-decoration: none;
    color: #bdc3c7;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding: 1.5rem 0;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 992px) {

    .desktop-nav,
    .header-actions .cta-button {
        display: none;
    }

    .hamburger-icon {
        display: block;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        padding-left: 0;
    }
}

@media (max-width: 767px) {

    /* Changed from 768px to avoid conflict */
    .logo-container h1 {
        font-size: 1.2rem;
    }

    .main-header {
        padding: 1rem;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }
}

/* --- Animations --- */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-height: 300px;
    grid-column: 1 / -1;
}

.loader-box {
    width: 25px;
    height: 25px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    animation: tumble 1.8s infinite ease-in-out;
}

.loader-box:nth-of-type(2) {
    animation-delay: 0.15s;
}

.loader-box:nth-of-type(3) {
    animation-delay: 0.3s;
}

@keyframes tumble {

    0%,
    100% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-25px) rotate(180deg);
        opacity: 0.7;
        background-color: var(--primary-color);
    }
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.empty-state-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.empty-state-message h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.empty-state-message p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.empty-state-message .cta-button {
    font-size: 1.1rem;
}


/* =================================== */
/* Campus Selector Modal Styles
/* =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: none;
    /* Hidden by default, JS changes this to 'flex' */
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.modal-content select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-dark);
}



/* =================================== */
/* Floating Contact Support Button
/* =================================== */

.floating-support-btn {
    position: fixed;
    /* This makes it float */
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    /* Official WhatsApp Green */
    color: white;
    border-radius: 50%;
    /* Makes it a circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    /* Size of the icon */
    text-decoration: none;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    /* Ensures it's on top of other content */
    transition: transform 0.3s ease;
}

.floating-support-btn:hover {
    transform: scale(1.1);
    /* Slightly enlarges the button on hover */
}