/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    font-family: 'Georgia', serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f8f8f8 url('resources/wedding-rings-with-natural-decoration.jpg') center/cover no-repeat;
}

/* Header styling */
header {
    position: fixed;
    top: 2px;
    align-self: center;
    width: 100%; /* Adjusted for mobile */
    z-index: 1000; /* Ensure it's above other content */
    margin-bottom: 20px;
}

header h1 {
    font-size: 2em; /* Adjusted for mobile */
    color: #333;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Media query for smaller screens */
@media only screen and (max-width: 480px) {
    header h1 {
        font-size: 1em; /* Adjust font size for smaller screens */
    }
}

/* Gallery container styling */
.gallery-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 90%;
    height: 80%;
    max-width: 1200px;
    max-height: 1000px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 10px;
    transition: width 0.3s ease, height 0.3s ease;
}

/* Gallery item styling */
.gallery-item {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image styling */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

.gallery-item img.active {
    opacity: 1;
}

/* Navigation button styling */
.nav-button {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.6);
}

.nav-button:focus {
    outline: none;
}

/* Positioning for buttons */
#prev {
    left: 10px;
}

#next {
    right: 10px;
}

/* Footer styling */
footer {
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    /* Ensure it's above other content */
}

footer p {
    font-size: 1em;
    color: #555;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* speech-styles.css */

/* Additional CSS for styling the imported text */
.speech-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    white-space: pre-line;
    overflow-y: auto;
    max-height: calc(100vh - 200px);

    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
}

.speech-content {
    margin: 20px auto;
    font-size: 1.2em;
    line-height: 1.5;
}

/* Customize scrollbar */
.speech-container::-webkit-scrollbar {
    width: 8px;
}

.speech-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.speech-container::-webkit-scrollbar-track {
    background: #f8f8f8;
}

/* Dropdown menu styling */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
    display: inline-block;
    /* Ensures the button and dropdown are treated as one unit */
    float: right;
    /* Aligns the dropdown to the right */
    margin-right: 20px;
    /* Adjust as needed */
}

.dropbtn {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    color: #333;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 1.2em;
    border-radius: 8px;
    /* Adding rounded corners */
    transition: background-color 0.3s;
    /* Smooth transition for background color */
}

.dropbtn:hover,
.dropbtn:focus {
    background-color: rgba(0, 0, 0, 0.1);
    /* Darken the button on hover or focus */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 8px;
    /* Adding rounded corners */
    transition: background-color 0.3s;
    /* Smooth transition for background color */
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    /* Adding rounded corners */
    transition: background-color 0.3s;
    /* Smooth transition for background color */
}

.dropdown-content a:hover {
    border-radius: 8px;
    /* Adding rounded corners */
    background-color: rgba(0, 0, 0, 0.1);
    /* Darken the menu item on hover */
}

.dropdown:hover .dropdown-content {
    display: block;
    border-radius: 8px;
    /* Adding rounded corners */
}

.dropdown:hover .dropbtn {
    background-color: rgba(0, 0, 0, 0.1);
    /* Darken the button when dropdown is hovered over */
    border-radius: 8px;
    /* Adding rounded corners */
}

.menu-container {
    position: relative;
    /* Change absolute to relative */
    top: auto;
    /* Remove top positioning */
    left: -70%;
    margin-top: 10px;
    /* Add margin top to create space below header */
}

/* Tile gallery container styling */
.tile-gallery-container {
    max-width: 100%;
    border-width: 2px;
    margin: 0 auto;
    padding: 0 20px;
    white-space: pre-line;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Tile image styling */
.tile-gallery-container img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s;
}

.tile-gallery-container img:hover {
    transform: scale(1.05);
}

/* Overlay styling */
.overlay {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 3em;
    font-weight: bold;
    cursor: pointer;
}