/* Hero Section */
.jednosobni-hero {
    background-color: #EFEFEF;
    padding: 247px 0 60px 0;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--boxed-padding);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-family: 'Source Serif 4', serif;
    font-size: 40px;
    font-weight: 400;
    color: #AB844E;
    margin: 0 auto;
    line-height: 1.4;
    text-align: center;
    max-width: 800px;
}

/* Apartments Grid Section */
.apartments-grid-section {
    background-color: #EFEFEF;
    padding: 60px 0 100px 0;
}

.apartments-grid-container {
    max-width: 1152px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 368px);
    gap: 30px;
    justify-content: center;
}

/* Apartment Card */
.apartment-card {
    background-color: #fff;
    padding: 40px 30px;
    width: 368px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}

.apartment-card:hover {
    transform: translateY(-5px);
    background-color: #243646;
}

/* Large card (typ IV) - full width */
.apartment-card-large {
    grid-column: span 2;
    width: 766px;
    height: 480px;
    display: flex;
    flex-direction: row;
    padding: 0;
}

.apartment-card-large .card-left {
    flex: 0 0 45%;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.apartment-card-large .card-size {
    position: absolute;
    bottom: -40px;
    left: 60px;
}

.apartment-card-large .card-right {
    flex: 0 0 55%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apartment-card-large .card-image {
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.apartment-card-large .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Empty space placeholder */
.apartment-card-empty {
    width: 368px;
    height: 374px;
}

.card-divider {
    width: 30px;
    height: 2px;
    background-color: #AB844E;
    border: none;
    margin: 0 0 20px 0;
    align-self: center;
}

.apartment-card-large .card-divider {
    align-self: flex-start;
}

.card-title {
    font-family: 'Source Serif 4', serif;
    font-size: 35px;
    font-weight: 400;
    color: #AB844E;
    margin: 0 0 25px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.apartment-card:hover .card-title {
    color: white;
}

.apartment-card-large .card-title {
    font-size: 35px;
    margin-bottom: 30px;
}

.card-image {
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Reserved Overlay */
.reserved-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: rgba(230, 57, 70, 0.85);
    padding: 20px 80px;
    font-family: 'Source Serif 4', serif;
    font-size: 36px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    letter-spacing: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #000000;
}

.reserved-overlay2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: rgba(230, 57, 70, 0.85);
    padding: 20px 150px;
    font-family: 'Source Serif 4', serif;
    font-size: 36px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    letter-spacing: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #000000;
}

.apartment-card.reserved {
    position: relative;
}

.apartment-card.reserved::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(128, 128, 128, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.apartment-card.reserved:hover::after {
    background: rgba(128, 128, 128, 0.4);
}

.apartment-card.reserved:hover {
    opacity: 0.95;
}

.card-size {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 25px;
    font-weight: 400;
    color: #243646;
    margin: 0;
    transition: color 0.3s ease;
}

.apartment-card:hover .card-size {
    color: white;
}

.apartment-card-large .card-size {
    font-size: 25px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .apartments-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .apartment-card-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .jednosobni-hero {
        padding: 140px 0 60px 0;
    }

    .hero-title {
        font-size: 32px;
        padding: 0 20px;
    }

    .apartments-grid-section {
        padding: 40px 20px 80px 20px;
    }

    .apartments-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .apartment-card {
        width: 100%;
        padding: 30px 25px;
    }

    .apartment-card-large {
        grid-column: span 1;
        width: 100%;
        height: auto;
        flex-direction: column;
    }

    .apartment-card-large .card-left {
        padding: 30px 25px;
        width: 100%;
        box-sizing: border-box;
    }

    .apartment-card-large .card-right {
        width: 100%;
    }

    .apartment-card-large .card-size {
        position: static;
        margin-top: 20px;
    }

    .apartment-card-empty {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .card-title {
        font-size: 22px;
    }

    .apartment-card-large .card-title {
        font-size: 28px;
    }
}
