
/* Hero Section with Restaurant Image */
.homepage-hero-section {
    margin-bottom: -100px;
    width: 100%;
    padding: 0px !important;
    position: relative;
    overflow: hidden;
}

.homepage-hero-image {
    position: relative;
    width: 100%;
    padding-top: calc(100% * 5 / 16);
    background: #F7F7F7;
    overflow: hidden;
    color: white;
    border: none;
}

.homepage-hero-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.homepage-hero-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(28, 28, 28, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    border: none;
}



/* Action Buttons Grid */
.actions-section {
    position: relative;
    z-index: 10;
    background: transparent;
    padding-bottom: 0;
    padding-top: 2rem;
}

.actions-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto;
}

/* Desktop - Large displays (default) */
.action-card {
    background: white;
    border-radius: 16px;
    padding: 1rem 0.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--headings-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px;
    min-width: 200px;
}

.action-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transform: translateY(-2px);
    text-decoration: none;
    border-bottom: 2px solid var(--mb-colour);
}

.action-icon {
    background-color: #f5f5f5;
    border-radius: 50%;
    color: var(--headings-color);
    font-weight: 300;
    display: block;
    font-size: 24px;
    height: 60px;
    line-height: 65px;
    margin-bottom: 5px;
    text-align: center;
    width: 60px;
    -webkit-transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
    -ms-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    transition: all 0.4s ease;
}

.action-card:hover .action-icon {
    background-color: var(--mb-colour);
    color: white;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.action-card:hover .action-title {
    color: var(--mb-colour);
}

/* Desktop - When there is only 1 button, make it wider */
.actions-grid:has(.action-card:only-child) .action-card {
    width: 300px;
    max-width: 80%;
}

/* Desktop - When there are exactly 2 buttons, make them wider (max 40% ensures one row) */
.actions-grid:has(.action-card:nth-child(2)):not(:has(.action-card:nth-child(3))) .action-card {
    width: 280px;
    max-width: 40%;
}

/* Desktop - When there are exactly 3 buttons, make them wider (max 30% ensures one row) */
.actions-grid:has(.action-card:nth-child(3)):not(:has(.action-card:nth-child(4))) .action-card {
    width: 260px;
    max-width: 30%;
}

/* Desktop - 4 buttons stay at default size (220px) */


/* Location Section */
.homepage-working-hours-block {
    padding-left: 15px;
    border-left: 3px solid var(--mb-colour);
    text-align: start;
    margin-bottom: 0px;
}

.location-card {
    padding: 5px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-container {
    width: 100%;
    height: 300px;
    background: #fff;
}

/* Responsive Design */

/* Medium tablets (max 992px) - max width ~300px for 3 buttons */
@media (max-width: 992px) {
    .actions-section {
        padding-top: 60px;
    }
    .actions-grid {
        gap: 10px;
    }
    .action-card {
        width: 200px;
        min-width: 180px;
        min-height: 100px;
        padding: 12px 8px;
    }
    .action-icon {
        font-size: 22px;
        height: 55px;
        line-height: 55px;
        width: 55px;
        margin-bottom: 4px;
    }
    .action-title {
        font-size: 1rem;
    }

    /* When there are exactly 4 buttons, force 2x2 layout */
    .actions-grid:has(.action-card:nth-child(4)):not(:has(.action-card:nth-child(5))) .action-card {
        width: 42%;
        min-width: 180px;
    }

    .homepage-working-hours-block {
        padding-left: 0px;
        border-left: none;
        text-align: center;
        margin-bottom: 20px;
    }
}

/* Small tablets (max 768px) - max width ~240px for 3 buttons */
@media (max-width: 768px) {
    .homepage-hero-image {
        padding-top: 50%;
    }
    .actions-grid {
        gap: 8px;
    }
    .action-card {
        width: 160px;
        min-width: 140px;
        min-height: 85px;
        padding: 10px 6px;
    }
    .action-icon {
        font-size: 18px;
        height: 45px;
        line-height: 45px;
        width: 45px;
        margin-bottom: 3px;
    }
    .action-title {
        font-size: 14px;
        line-height: normal;
    }

    /* When there is only 1 button, make it wider */
    .actions-grid:has(.action-card:only-child) .action-card {
        width: 240px;
        min-width: 200px;
    }

    /* When there are exactly 2 buttons, make them wider */
    .actions-grid:has(.action-card:nth-child(2)):not(:has(.action-card:nth-child(3))) .action-card {
        width: 200px;
        min-width: 180px;
    }

    /* When there are exactly 4 buttons, force 2x2 layout */
    .actions-grid:has(.action-card:nth-child(4)):not(:has(.action-card:nth-child(5))) .action-card {
        width: 42%;
        min-width: 140px;
    }
}

/* Large phones (max 480px) - max width ~150px for 3 buttons */
@media (max-width: 480px) {
    .actions-container {
        padding: 0px !important;
    }
    .actions-grid {
        gap: 6px;
    }
    .action-card {
        width: 130px;
        min-width: 110px;
        min-height: 75px;
        height: 75px;
        padding: 8px 4px;
    }
    .action-icon {
        font-size: 16px;
        height: 38px;
        line-height: 38px;
        width: 38px;
        margin-bottom: 2px;
    }
    .action-title {
        font-size: 12px;
        line-height: normal;
    }

    /* When there is only 1 button, make it wider */
    .actions-grid:has(.action-card:only-child) .action-card {
        width: 200px;
        min-width: 180px;
    }

    /* When there are exactly 2 buttons, make them wider */
    .actions-grid:has(.action-card:nth-child(2)):not(:has(.action-card:nth-child(3))) .action-card {
        width: 180px;
        min-width: 160px;
    }

    /* When there are exactly 4 buttons, force 2x2 layout */
    .actions-grid:has(.action-card:nth-child(4)):not(:has(.action-card:nth-child(5))) .action-card {
        width: 44%;
        min-width: 110px;
    }
}

/* Small phones (max 380px) - max width ~120px for 3 buttons */
@media (max-width: 380px) {
    .actions-grid {
        gap: 4px;
    }
    .action-card {
        width: 115px;
        min-width: 100px;
        min-height: 68px;
        height: 68px;
        padding: 6px 3px;
    }
    .action-icon {
        font-size: 14px;
        height: 32px;
        line-height: 32px;
        width: 32px;
        margin-bottom: 2px;
    }
    .action-title {
        font-size: 11px;
    }

    /* When there is only 1 button, make it wider */
    .actions-grid:has(.action-card:only-child) .action-card {
        width: 180px;
        min-width: 160px;
    }

    /* When there are exactly 2 buttons, make them wider */
    .actions-grid:has(.action-card:nth-child(2)):not(:has(.action-card:nth-child(3))) .action-card {
        width: 150px;
        min-width: 130px;
    }

    /* When there are exactly 4 buttons, force 2x2 layout */
    .actions-grid:has(.action-card:nth-child(4)):not(:has(.action-card:nth-child(5))) .action-card {
        width: 45%;
        min-width: 95px;
    }
}
