/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: url('/assets/images/corkboard.png') center/200% no-repeat;
    background-size: cover;
    color: #333333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navigation Bar */
.nav-logo {
    width: 40px;
    /* Adjust as per your needs */
    height: auto;
    margin-right: 20px;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 18px 20px;
    border-bottom: 2px solid #2a3b5f;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

header nav {
    display: flex;
    justify-content: center;
    /* Centers the menu options */
    align-items: center;
    width: 100%;
    overflow: visible;
    white-space: normal;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* Allows items to wrap if needed */
    width: 100%;
    overflow: visible;
}

nav ul li {
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

nav ul li a {
    text-decoration: none;
    color: #2a3b5f;
    font-weight: bold;
    font-size: 18px;
    padding: 8px 14px;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

nav ul li a:hover,
nav ul li a.active {
    color: #ffffff;
    background-color: #2a3b5f;
    border-radius: 5px;
}

/* Default for desktop */
.dropdown .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background-color: #fff;
    border: 1px solid #2a3b5f;
    border-radius: 5px;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

/* Mobile override */
@media (max-width: 768px) {
  .mobile-nav .dropdown .dropdown-content {
      position: fixed;
      top: 60px;
      left: 5%;
      right: 5%;
      display: none;
      background-color: #fff;
      border: 1px solid #2a3b5f;
      border-radius: 5px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
      z-index: 9999;
  }

  .mobile-nav .dropdown:hover .dropdown-content {
      display: block;
  }
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #2a3b5f;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #2a3b5f;
    color: #ffffff;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 50px 20px;
    background: #2a3b5f;
    color: #ffffff;
    margin-top: 60px;
    /* Ensure hero section starts below the fixed menu */
}

/* Reviews Section */
.board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Ensure 2 items per row */
    gap: 10px;
    /* Adjust space between reviews */
    justify-items: center;
    align-items: start;
    /* Start aligning reviews from the top */
    padding: 40px 0;
    /* Adjust top and bottom padding */
    min-height: 100vh;
    margin-top: 20px;
    box-shadow: inset 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: filter 0.3s ease;
    width: 100%;
}

/* Pinned Reviews */
.pinned-review {
    width: 100%;
    /* Full width within its grid cell */
    max-width: 280px;
    /* Ensures the reviews are not too wide */
    margin: 5px;
    /* Reduced margin between reviews */
    padding: 20px;
    background-color: #ffe599;
    border: 2px solid #f1c232;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    font-size: 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.pinned-review:hover {
    transform: translateY(-10px);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
}

.read-more {
    display: inline-block;
    background-color: #2a3b5f;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #1f2a4d;
}

/* Footer Styles */
footer {
    background-color: #2a3b5f;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    width: 100%;
}

/* Scroll Button Styles */
.scroll-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #2a3b5f;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.scroll-button:hover {
    background-color: #1f2a4d;
    transform: translateY(-2px);
}

.scroll-button svg {
    width: 24px;
    height: 24px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background-color: #ffe599;
    border: 2px solid #f1c232;
    border-radius: 10px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    z-index: 3000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.modal img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Modal Content Centering */
.modal-content {
    padding: 20px;
    text-align: center;
    /* This centers the text inside the modal */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    align-items: center;
    /* Center content horizontally */
    width: 100%;
    /* Ensure the content takes up the full width */
    box-sizing: border-box;
    /* Include padding in width calculation */
}

.modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pinned Review in the modal */
.modal .pinned-review {
    display: inline-block;
    width: 100%;
    margin: 0;
    padding: 10px;
    background-color: #ffe599;
    border: none;
    text-align: center;
    font-size: 16px;
    box-shadow: none;
    transform: none;
}

/* Blur Background for Pinned Reviews */
.pinned-review.blur-background {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Mobile and Tablet Styles */

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .contact-section {
        display: none;
    }

    /* Nav Wrapper */
    .nav-scroll-wrapper {
        display: block;
        overflow-x: auto;
        overflow-y: visible;
        position: relative;
        z-index: 1000;
        background-color: #fff;
        isolation: isolate;
    }

    .nav-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    header nav {
        display: flex;
        align-items: center;
        white-space: nowrap;
        width: max-content;
        overflow: visible;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20px;
        padding: 0 16px;
        margin: 0;
        list-style: none;
        overflow: visible;
        position: relative;
        z-index: 1001;
        white-space: nowrap;
    }

    nav ul li {
        flex-shrink: 0;
        scroll-snap-align: start;
        position: relative;
        overflow: visible;
    }

    nav ul li a {
        font-size: 14px;
        padding: 8px 12px;
        white-space: nowrap;
        text-decoration: none;
        font-weight: bold;
        color: #2a3b5f;
        display: inline-block;
    }

    nav ul li.dropdown {
        position: relative;
    }

    /* Mobile Dropdowns */
    .mobile-nav .dropdown .dropdown-content {
        position: fixed;
        top: 60px;
        /* adjust to match header height */
        left: 5%;
        right: 5%;
        display: none;
        background-color: #fff;
        border: 1px solid #2a3b5f;
        border-radius: 5px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        z-index: 9999;
    }

    .mobile-nav .dropdown:hover .dropdown-content {
        display: block;
    }

    .hero {
        margin-top: 100px;
        /* prevent header overlap */
    }

    .board {
        padding-top: 100px; /* space below fixed nav */
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 40px;
        grid-template-columns: 1fr; /* stack vertically on mobile */
        gap: 10px;
        box-sizing: border-box;
      }      

    .pinned-review {
        width: 100%;
        /* Full width on mobile for reviews */
        margin: 10px 0;
        /* Vertical margin for spacing */
        max-width: none;
        /* Remove max-width for full screen */
    }

    .modal {
        width: 90%;
        /* Modal width adjusted for smaller screens */
    }

    .read-more {
        font-size: 14px;
        /* Smaller font size for buttons */
        padding: 5px 10px;
        /* Reduced padding */
    }

    .scroll-button {
        width: 45px;
        /* Adjust scroll button size */
        height: 45px;
    }

    /* Additional mobile styling for text and layout adjustments */
    .modal-content {
        padding: 15px;
        text-align: center;
        /* Ensure the text remains centered */
    }
}