/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: black;
    background: linear-gradient(to bottom, #f0f0f0, #ffffff);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background-color: #003B95;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.desktop-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.featured {
    padding: 2rem 0;
}

.mobile-nav {
    display: none;
}

/* Main content styles */
main {
    padding-top: 60px;
    flex: 1 0 auto;
    transition: padding-top 0.3s ease;
}

main.hero-hidden {
    padding-top: 120px;
}

/* Restaurants hero section styles */
.restaurants-hero {
    background-color: #003B95;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.restaurants-hero.hidden {
    display: none;
}

.restaurants-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.restaurants-hero p {
    font-size: 1.2rem;
}

/* Search bar styles */
.search-bar {
    display: flex;
    max-width: 600px;
    margin: 2rem auto 0;
    -webkit-appearance: none;
    appearance: none;
}

.search-bar input {
    flex-grow: 1;
    padding: 0.75rem;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    -webkit-appearance: none;
    appearance: none;
}

.search-button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
}

.search-button:hover {
    background-color: #003d82;
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.restaurant-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.restaurant-card:hover {
    transform: translateY(-5px);
}

.restaurant-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-content {
    color: black;
    padding: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.star-icon {
    color: #FFD700;
    fill: #FFD700;
}

.view-all-button {
    display: block;
    width: 200px;
    margin: 2rem auto 0;
    padding: 0.75rem;
    background-color: #003B95;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.view-all-button:hover {
    background-color: #0056b3;
}

.recommendation-special {
    padding: 1rem 0;
    background-color: #f8f8f8;
}

.container-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.recommendation-container, .randomizer-container {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recommendation-title {
    color: #333;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.recommendation-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.recommendation-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: "\25BC";
    position: absolute;
    top: 40%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8em;
    color: #666;
}

.form-select {
    width: 100%;
    padding: 0.75rem 2rem 0.75rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    margin-bottom: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.recommendation-button {
    background-color: #003B95;
    color: white;
    border: none;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 1rem;
}

.recommendation-button:hover {
    background-color: #0056b3;
}

.recommendation-result {
    margin-top: 2rem;
}

.recommendation-result.hidden {
    display: none;
}

.randomizer-card {
    margin-top: 1rem;
}

.randomizer-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.randomizer-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.randomizer-content {
    margin-top: 1rem;
}

.randomizer-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.randomizer-content p {
    color: #666;
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #003B95;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    text-align: center;
}

.view-restaurant-button {
    margin-right: 0.5rem;
}

.randomize-button {
    margin-left: 0.5rem;
}

.button:hover {
    background-color: #0056b3;
}

.button i {
    margin-right: 0.5rem;
}

.view-restaurant-button,
.randomize-button {
    display: flex;
    align-items: center;
    background-color: #003B95;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}

.view-restaurant-button:hover,
.randomize-button:hover {
    background-color: #0056b3;
}

.randomize-button {
    background-color: #003B95;
}

.randomize-button:hover {
    background-color: #003d82;
}

/* Footer styles */
footer {
    background-color: black;
    color: white;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style-type: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
}

.copyright {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #ddd;
}

/* No results message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 19px;
    left: 10px;
    z-index: 1002;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #003B95;
    z-index: 1001;
    transition: left 0.3s ease-in-out;
    padding: 60px 20px 20px;
    box-sizing: border-box;
}

.side-menu a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
}

.close-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Cookie Consent Styles */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9998;
}

.cookie-consent {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 24px;
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 9999;
}

.cookie-content {
    text-align: left;
}

.cookie-content h2 {
    color: #fff;
    font-size: 24px;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.cookie-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
}

.cookie-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-button.reject {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cookie-button.reject:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.cookie-button.accept {
    background-color: #003B95;
    color: #ffffff;
}

.cookie-button.accept:hover {
    background-color: #003d82;
}

.cookie-policy-link {
    color: #003B95;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .container-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .container {
        padding: 0 10px;
    }

    header .container {
        justify-content: center;
        padding: 0 15px;
    }

    h2.recommendation-title {
        font-size: 1.5rem;
    }

    strong {
        font-weight: bold;
    }

    .logo {
        font-size: 1.2rem;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #003B95;
        justify-content: space-around;
        padding: 5px 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .mobile-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 5px;
        color: white;
        text-decoration: none;
        font-size: 0.7rem;
    }

    .mobile-nav .nav-link i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .restaurants-hero {
        padding: 2rem 0;
    }

    .restaurants-hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .restaurants-hero p {
        font-size: 0.9rem;
    }

    .search-bar {
        flex-direction: row;
        max-width: 100%;
        margin: 1rem auto 0;
    }

    .search-bar input,
    .search-button {
        font-size: 16px;
        padding: 0.5rem;
        height: 44px;
    }

    .search-bar input {
        flex-grow: 1;
        border-radius: 4px 0 0 4px;
    }

    .search-button {
        width: auto;
        border-radius: 0 4px 4px 0;
    }

    .restaurants-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .restaurants-header h2 {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    .sort-container {
        display: flex;
        align-items: center;
        font-size: 0.8rem;
        width: auto;
    }

    .sort-container label {
        margin-right: 0.5rem;
        white-space: nowrap;
    }

    .sort-container select {
        padding: 0.3rem;
        font-size: 0.8rem;
        width: auto;
    }

    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .restaurant-card {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .restaurant-card img {
        height: 100px;
        object-fit: cover;
        width: 100%;
    }

    .card-content {
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .card-content h3 {
        font-size: 1.0rem;
        margin-bottom: 0.2rem;
    }

    .card-content p {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    .rating {
        font-size: 0.75rem;
        margin-top: auto;
        padding-bottom: 0.3rem;
    }

    .card-footer {
        padding: 0.4rem;
        font-size: 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        background-color: #f4f4f4;
        margin-top: auto;
    }

    .location {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
    }

    .view-details {
        padding: 0.4rem 0.8rem;
        font-size: 12px;
        min-width: 60px;
        white-space: nowrap;
    }

    .randomizer-card {
        margin-top: 1rem;
    }
    
    .randomizer-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 4px;
    }
    
    .randomizer-subtitle {
        color: #666;
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .randomizer-content {
        margin-top: 1rem;
    }
    
    .randomizer-content h3 {
        margin-bottom: 0.5rem;
        font-size: 1.25rem;
    }
    
    .randomizer-content p {
        color: #666;
        margin-bottom: 1rem;
    }

    .view-restaurant-button,
    .randomize-button {
        padding: 0.75rem 0.75rem;
        font-size: 0.75rem;
    }

    .pagination {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
        margin-bottom: 5rem;
    }

    .pagination-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    #page-info {
        font-size: 0.8rem;
    }

    footer {
        display: none;
    }

    .recommendation-button {
        background-color: #003B95;
        color: white;
        border: none;
        padding: 0.875rem;
        font-size: 1rem;
        font-weight: 500;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s;
        width: 100%;
        margin-top: 1rem;
        margin-bottom: 80px;
    }

    .form-select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 0.5rem 2rem 0.5rem 0.5rem;
        width: 100%;
        font-size: 16px;
    }

    .select-wrapper::after {
        font-size: 0.8rem;
        right: 10px;
    }

    .randomizer-card img {
        max-height: none;
    }

    .button {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .button i {
        margin-right: 0.3rem;
    }

    .cookie-consent {
        padding: 15px;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-button {
        width: 100%;
        margin-bottom: 10px;
    }

    .cookie-settings {
        width: 95%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .restaurant-card img {
        height: 90px;
    }

    .card-content h3 {
        font-size: 0.8rem;
    }

    .card-content p {
        font-size: 0.7rem;
    }

    .rating {
        font-size: 0.7rem;
    }

    .card-footer {
        padding: 0.3rem;
    }

    .location {
        font-size: 0.65rem;
        max-width: 55%;
    }

    .view-details {
        padding: 0.3rem 0.6rem;
        font-size: 11px;
        min-width: 50px;
    }

    .form-select {
        padding: 0.4rem 1.5rem 0.4rem 0.4rem;
    }

    .button {
        font-size: 0.7rem;
        padding: 0.5rem 0.6rem;
    }

    .button i {
        margin-right: 0.2rem;
    }

    .cookie-content h2 {
        font-size: 20px;
    }

    .cookie-content p {
        font-size: 13px;
    }

    .cookie-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@supports (padding: max(0px)) {
    .mobile-nav {
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }

    body {
        padding-bottom: calc(60px + max(10px, env(safe-area-inset-bottom)));
    }

    .recommendation-button {
        margin-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 350px) {
    body {
        font-size: 12px;
    }

    .restaurants-hero h1 {
        font-size: 1.3rem;
    }

    .restaurants-hero p {
        font-size: 0.8rem;
    }

    .search-bar input,
    .search-button {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    .restaurant-grid {
        gap: 6px;
    }

    .restaurant-card img {
        height: 80px;
    }

    .card-content h3 {
        font-size: 0.75rem;
    }

    .card-content p {
        font-size: 0.65rem;
    }

    .rating {
        font-size: 0.65rem;
    }

    .card-footer {
        padding: 0.25rem;
    }

    .location {
        font-size: 0.6rem;
        max-width: 50%;
    }

    .view-details {
        padding: 0.25rem 0.5rem;
        font-size: 10px;
        min-width: 40px;
    }

    .recommendation-button {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .form-select {
        font-size: 14px;
        padding: 0.3rem 1.5rem 0.3rem 0.3rem;
    }

    .select-wrapper::after {
        right: 8px;
        font-size: 0.7rem;
    }

    .cookie-content h2 {
        font-size: 18px;
    }

    .cookie-content p {
        font-size: 12px;
    }

    .cookie-button {
        font-size: 13px;
        padding: 8px 16px;
    }
}

@supports (-webkit-touch-callout: none) {
    .form-select {
        background-color: #fff;
    }
}

@supports (-moz-appearance: none) {
    .form-select {
        text-indent: 0.01px;
        text-overflow: '';
    }
}

@media (hover: none) and (pointer: coarse) {
    .search-button,
    .view-restaurant-button,
    .randomize-button,
    .recommendation-button,
    .nav-link,
    .cookie-button {
        min-height: 44px;
        min-width: 44px;
    }
}

@supports (-webkit-touch-callout: none) {
    .search-bar input,
    .search-button,
    .form-select {
        font-size: 16px;
    }

    .search-bar {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}