/* Custom CSS for the index.html page - Replaces Tailwind and previous index.css */

/* Root variables for theme colors */
:root {
    --primary-color: #336600; /* Default primary color */
    --primary-color-rgb: 51, 102, 0; /* Default primary color RGB */
    --primary-hover-color: #2a5200; /* Default primary hover color */
    --secondary-color: #aac09e; /* Default secondary color */
    --secondary-color-rgb: 170, 192, 158; /* Default secondary color RGB */
    --background-light: #f8f9fa; /* Default light background */
    --section-title-color: #2c3e50; /* Default section title color */
}

/* Basic styles for loader and content visibility - kept for robustness */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
}

.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.content-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.content-wrapper.visible {
    opacity: 1;
}

.loading .content-wrapper {
    visibility: hidden;
}

.concentric-rings-spinner div {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Hero Section Styles */
.hero-section {
    background-size: cover; /* Cover the entire section */
    background-position: center center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Changed color to white for better visibility on image */
    color: var(--text-light);
    overflow: hidden;
    padding: 3rem 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Added a semi-transparent dark overlay for better text readability on light images */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-section .hero-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-left-text {
    flex: 1;
    min-width: 350px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-right-form {
    flex: 1;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin: 0 auto;
}

.form-title {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-light); /* Changed to light text for visibility against overlay */
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Stronger shadow for definition */
    text-align: center;
    width: 100%;
    letter-spacing: 0.05em;
}

.hero-section h1 {
    font-family: 'Lora', serif;
    font-size: 4.5rem; /* Slightly reduced font size for elegance */
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2; /* Slightly more relaxed line height */
    letter-spacing: -0.02em; /* Subtle negative letter spacing for a refined look */
    color: var(--text-light); /* Changed to light text for visibility */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8); /* Stronger shadow for readability */
    opacity: 0;
    animation: slideDownFadeInPageTitle 0.8s 0.3s ease-out forwards;
}

.hero-section p {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem; /* Slightly reduced font size */
    margin-bottom: 3rem;
    color: var(--text-light); /* Changed to light text for visibility */
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7); /* Stronger shadow for readability */
    opacity: 0;
    animation: fadeInUp 0.8s 0.5s ease-out forwards;
}

/* Search Bar specific styles within hero section */
.hero-section .search-bar-container {
    background-color: #ffffff; /* Explicitly white for contrast */
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    align-items: flex-end;
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 0.8s 0.7s ease-out forwards;
}

.hero-section .search-bar-input-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.hero-section .search-bar-input-group label {
    font-size: 0.9rem;
    color: #333333; /* Dark text for labels inside white form */
    margin-bottom: 0.6rem;
    font-weight: 700;
    text-align: left;
}

.hero-section .search-bar-input-group input[type="date"],
.hero-section .search-bar-input-group select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #D1D5DB;
    border-radius: 0.6rem;
    box-sizing: border-box;
    background-color: #F9FAFB;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    height: 58px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    color: #1A202C;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.hero-section .search-bar-input-group input[type="date"]:focus,
.hero-section .search-bar-input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.4);
    background-color: #fff;
}

.hero-section .search-bar-input-group select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234A5568%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 12px;
    padding-right: 3rem;
    cursor: pointer;
}

.hero-section .search-bar-input-group select option.select-placeholder {
    color: #A0AEC0;
}

.hero-section .search-bar-input-group select:has(option.select-placeholder:checked) {
    color: #A0AEC0;
}

.hero-section .search-bar-input-group input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.8;
    cursor: pointer;
}

.hero-section .search-bar-input-group input[type="date"] {
    color: #2D3748;
}

.hero-section .search-bar-input-group input[type="date"]:required:invalid {
    color: #A0AEC0;
}

.hero-section .search-bar-button-group {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.hero-section #search-availability-button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    width: 65px;
    height: 58px;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-section #search-availability-button:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-section #search-availability-button:active {
    transform: translateY(0px);
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.3);
}

.hero-section #search-availability-button i.fas.fa-arrow-right {
    font-size: 1.4rem;
    line-height: 1;
}

/* Link to Rooms Page */
.explore-rooms-link {
    margin-top: 2rem; /* Space above the link */
    text-align: center; /* Center the link */
    width: 100%; /* Ensure it takes full width for centering */
    opacity: 0; /* For animation */
    animation: fadeInUp 0.8s 0.9s ease-out forwards; /* Animate after form */
}

.explore-rooms-link a {
    color: var(--text-light); /* Light text on primary background */
    text-decoration: none; /* No underline by default */
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem; /* Readable font size */
    font-weight: 600;
    padding: 0.8rem 1.5rem; /* Padding for click area */
    border: 2px solid var(--primary-color); /* Primary color border for contrast */
    border-radius: 30px; /* Pill shape */
    transition: all 0.3s ease; /* Smooth transitions */
    display: inline-block; /* Allows padding and border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Stronger subtle shadow */
    background-color: var(--primary-color); /* Default background color */
}

.explore-rooms-link a:hover {
    background-color: var(--text-light); /* Background becomes light on hover */
    color: var(--primary-color); /* Text becomes primary color on hover */
    transform: translateY(-2px); /* Lift effect */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
    border-color: var(--primary-color); /* Maintain border color */
}

.explore-rooms-link a i {
    margin-left: 0.8rem; /* Space between text and icon */
    transition: transform 0.3s ease; /* Smooth arrow movement */
    color: var(--text-light); /* Icon matches text color normally */
}

.explore-rooms-link a:hover i {
    transform: translateX(5px); /* Move arrow on hover */
    color: var(--primary-color); /* Icon matches text color on hover */
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light) !important; /* Ensured this is consistent */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.8s 1.5s ease-out forwards; /* Animate after hero content */
    transition: transform 0.3s ease, color 0.3s ease;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7); /* Stronger shadow for readability */
}

.scroll-down-indicator:hover {
    transform: translateX(-50%) translateY(-5px); /* Lift on hover */
    color: var(--primary-color);
}

.scroll-down-indicator i {
    font-size: 1.8rem; /* Larger icon */
    margin-top: 0.5rem;
    animation: bounce 1.5s infinite; /* Gentle bounce animation */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


/* Responsive adjustments for the hero section */
@media (max-width: 1024px) {
    .hero-section {
        min-height: 90vh; /* Increase height for stacked layout */
        padding: 4rem 0;
    }
    .hero-section .hero-content-wrapper {
        flex-direction: column; /* Stack columns on smaller screens */
        text-align: center;
        padding: 0 1.5rem;
        gap: 3rem; /* Adjust gap for stacked layout */
    }

    .hero-left-text,
    .hero-right-form {
        flex: none;
        width: 100%;
        min-width: unset;
        align-items: center; /* Center items when stacked */
        text-align: center; /* Center text when stacked */
    }

    .hero-section h1 {
        font-size: 3.5rem; /* Adjust font size for smaller screens */
        margin-bottom: 1rem;
    }
    .hero-section p {
        font-size: 1.2rem; /* Adjust font size for smaller screens */
        margin-bottom: 2rem;
    }
    .hero-section .search-bar-container {
        max-width: 600px; /* Allow wider search bar when stacked */
        padding: 2rem;
        gap: 1rem;
    }
    .hero-section .search-bar-input-group {
        flex-basis: auto;
        width: 100%;
    }
    .hero-section .search-bar-button-group {
        width: 100%;
        margin-top: 1rem;
    }
    .hero-section #search-availability-button {
        width: 100%;
        margin: 0 auto; /* Added for explicit horizontal centering */
    }
    .form-title {
        font-size: 1.8rem; /* Adjust for stacked layout */
        margin-bottom: 1rem;
    }
    .explore-rooms-link {
        margin-top: 1.5rem; /* Adjust margin for stacked layout */
    }
    .scroll-down-indicator {
        bottom: 1rem; /* Adjust position for stacked layout */
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh; /* Further adjust height for mobile */
        padding: 3rem 0;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .hero-section .search-bar-container {
        padding: 1.5rem;
        gap: 0.8rem;
    }
    .form-title {
        font-size: 1.5rem; /* Further adjust for smaller mobile screens */
        margin-bottom: 0.8rem;
    }
    .hero-section .search-bar-input-group input[type="date"],
    .hero-section .search-bar-input-group select,
    .hero-section #search-availability-button {
        height: 52px; /* Slightly smaller height for very small screens */
        padding: 0.75rem 1rem;
    }
    .hero-section #search-availability-button {
        width: 100%; /* Ensure it's 100% width on smaller screens */
        margin: 0 auto; /* Added for explicit horizontal centering */
    }
    .hero-section .search-bar-input-group select {
        background-position: right 0.8rem center;
        padding-right: 2.5rem;
    }
    .explore-rooms-link a {
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
    }
    .scroll-down-indicator {
        bottom: 0.5rem; /* Closer to the bottom on smaller mobiles */
        font-size: 0.8rem;
    }
    .scroll-down-indicator i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section p {
        font-size: 0.9rem;
    }
    .hero-section .search-bar-container {
        padding: 1rem;
        gap: 0.5rem;
    }
    .form-title {
        font-size: 1.3rem;
    }
    .hero-section .search-bar-input-group input[type="date"],
    .hero-section .search-bar-input-group select,
    .hero-section #search-availability-button {
        height: 48px; /* Final adjustment for smallest screens */
        font-size: 0.9rem;
    }
    .hero-section #search-availability-button {
        width: 100%; /* Ensure it's 100% width on smallest screens */
        margin: 0 auto; /* Added for explicit horizontal centering */
    }
    .explore-rooms-link a {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}


/* Motel Intro Section */
.motel-intro-section {
    padding: 6rem 1rem; /* Increased vertical padding for more spacious feel */
    background-color: #F8F5EF; /* Soft, warm off-white background */
    text-align: center;
}

.motel-intro-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Lora', serif;
    font-size: 3.2rem; /* Increased font size for prominence */
    color: #333333; /* Rich dark gray for elegance */
    margin-bottom: 1.2rem; /* More space below title */
    position: relative;
    display: inline-block;
    padding-bottom: 0.85rem; /* More space for underline */
    opacity: 0;
    animation: slideDownFadeInPageTitle 0.8s ease-out forwards;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle text shadow */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90px; /* Wider underline */
    height: 5px; /* Thicker underline */
    background-color: var(--primary-color); /* Primary color for consistency */
    border-radius: 2px;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem; /* Increased font size */
    color: #555555; /* Slightly lighter dark gray */
    margin-bottom: 3rem; /* More margin below subtitle */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.8s 0.2s ease-out forwards;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Very subtle text shadow */
}

/* Auto-Scrolling Gallery Styles */
.scrolling-gallery-wrapper {
    overflow: hidden;
    width: 100%;
    margin: 3rem auto; /* More margin */
    border-radius: 15px; /* More rounded corners */
    min-height: 580px; /* Adjusted for larger images/shadows */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); /* More prominent shadow for luxury */
    background-color: #ffffff; /* White background for gallery */
    padding: 1.5rem; /* Increased inner padding */
}

.scrolling-gallery-track {
    display: flex;
    width: max-content;
    gap: 2.5rem; /* Increased gap between images */
    animation-name: scrollLeftAnimation;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    padding-block: 10px;
}

.scrolling-gallery-item {
    opacity: 0;
    animation: fadeInItem 0.8s ease-out forwards;
    flex-shrink: 0;
}

.scrolling-gallery-item img {
    width: 500px;
    height: 500px;
    object-fit: cover;
    display: block;
    border-radius: 10px; /* Slightly more rounded image corners */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); /* Stronger image shadow */
    background-color: #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scrolling-gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2); /* Even stronger shadow on hover */
}

@keyframes scrollLeftAnimation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframes for other animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDownFadeInPageTitle {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation applications for other page elements */
body:not(.loading) #motel-intro-section.animate-on-load {
    animation: fadeIn 0.5s 0.8s ease-out forwards;
}

body:not(.loading) #motel-intro-section #motel-intro-title.animate-on-load {
    animation: slideDownFadeInPageTitle 0.8s 1s ease-out forwards;
}

body:not(.loading) #motel-intro-section #motel-intro-welcome-message.animate-on-load {
    animation: fadeInUp 0.8s 1.2s ease-out forwards;
}

/* Style for the booking error message */
#booking-error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 5px;
    display: none;
    font-weight: bold;
    text-align: center;
}
