﻿/* 🎨 Styling for Grid Page */
h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.dark-mode h1 {
    color: #f8f9fa;
}

a {
    text-decoration: none;
    color: #007bff;
    display: inline-block;
    margin-bottom: 15px;
    transition: color 0.3s ease-in-out;
}

    a:hover {
        color: #0056b3;
    }

/* 🎭 Dark Mode - Lenker */
.dark-mode a {
    color: #00bfff;
}

    .dark-mode a:hover {
        color: #008cff;
    }

/* 🌟 Grid Container */
.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

/* 🏠 Styling for House Cards */
.col {
    width: calc(33.33% - 20px); /* Justerer bredden for større skjermer */
    max-width: 300px;
    margin-bottom: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

    .col:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

/* 🎭 Dark Mode - Kort */
.dark-mode .col {
    background: #222;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* 🖼️ Bildestil */
.card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* 🏷️ Tekststil for kort */
.d-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
}

.dark-mode .d-flex {
    background-color: #333;
}

/* 📌 Adresse og Pris-stil */
.text-start {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.dark-mode .text-start {
    color: #fff;
}

.text-nowrap {
    font-size: 18px;
    color: #ac7878;
    font-weight: 500;
}

/* 📱 Responsivt design for mobile enheter */
@media (max-width: 1024px) {
    .col {
        width: calc(50% - 20px); /* To kolonner for nettbrett */
        max-width: none;
    }
}

@media (max-width: 768px) {
    .col {
        width: 100%; /* En kolonne for mobil */
    }

        .col:hover {
            transform: none; /* Fjerner hover-effekt for mobil */
        }

    h1 {
        font-size: 28px;
    }
}
