/* Base Styles */
:root {
    /* Cleaner Palette - Inspired by Apple HIG */
    --primary-color: #1d1d1f; /* Near Black */
    --accent-color: #007AFF; /* Apple Blue */
    --text-color: #1d1d1f;
    --secondary-text-color: #6e6e73; /* Medium Gray */
    --background-color: #f5f5f7; /* Off-white/Light Gray */
    --card-background: #ffffff;
    --light-gray: #f5f5f7;
    --medium-gray: #d2d2d7; /* Lighter Medium Gray */
    --border-color: rgba(0, 0, 0, 0.1); /* Subtle border */

    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: var(--font-main); /* Use same font, adjust weight */

    --max-width: 1100px; /* Slightly narrower max width */
    --border-radius: 12px; /* Slightly larger radius */
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
    --transition: all 0.25s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Adjust for new nav height */
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.65; /* Increased line height */
    padding-top: 60px; /* Adjust for fixed nav */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85); /* Lighter background */
    padding: 0.8rem 1rem; /* Adjusted padding */
    z-index: 900;
    backdrop-filter: blur(12px); /* Stronger blur */
    border-bottom: 1px solid var(--border-color); /* Subtle border */
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem; /* Increased gap */
    margin: 0; padding: 0;
}
nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600; /* Bolder nav links */
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
nav a:hover {
    color: var(--accent-color);
}
/* Active Navigation Link */
nav a.active {
    color: var(--accent-color); /* Highlight active link */
    font-weight: 700; /* Make it bolder */
}
/* Navigation Logo */
.nav-logo {
    height: 1.8rem; /* Adjust size to fit nav bar */
    width: auto; /* Maintain aspect ratio */
    margin-right: 0.5rem; /* Space between logo and link */
    vertical-align: middle; /* Align logo vertically with text */
    border-radius: 4px; /* Rounded corners */
}

/* Adjust list item containing logo */
nav ul li:first-child { /* Target the first list item specifically */
    display: flex;
    align-items: center;
}



/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600; /* Semi-bold headings */
    line-height: 1.3;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
}

h1 { font-size: 2.8rem; font-weight: 700; } /* Larger Hero H1 */
h2 { font-size: 2.2rem; margin-bottom: 2rem; text-align: center; } /* Centered Section Titles */
h3 { font-size: 1.4rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--secondary-text-color); /* Use secondary color for body text */
    max-width: 65ch; /* Improve readability */
}
section p { /* Center paragraph text in sections by default */
     margin-left: auto;
     margin-right: auto;
     text-align: center;
}
.container > h2 + p { /* Paragraph directly after section title */
    margin-bottom: 3rem; /* More space after intro paragraph */
}

/* Private Tours Section */
.private-tours-info { /* Now styled directly as it's inside #tours */
    background: rgba(245, 245, 247, 0.9); /* Apple-style subtle background */
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    max-width: 800px;
    margin: 4rem auto 0 auto; /* Added top margin, centered */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}


/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem; /* Slightly more padding */
}

section {
    padding: 5rem 0; /* More vertical spacing */
}

/* Page Section Visibility */
.page-section.hidden {
    display: none;
}

/* Hero Section */
.hero {
    height: calc(85vh - 60px); /* Adjust height */
    min-height: 450px;
    /* Use the specific NYC image */
    background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
                url('./hero-nyc-gallery.png') center/cover no-repeat; /* Updated to .png */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 1rem;
}

.hero-content {
    max-width: 750px;
}
.hero h1 {
    color: white;
    margin-bottom: 1rem;
}
.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Tour Cards */
.tour-grid {
    display: grid;
    /* Adjust columns for potentially wider cards */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem; /* Increased gap */
    margin-top: 2rem;
}

.tour-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow); /* Use softer shadow */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color); /* Subtle border */
}

.tour-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Slightly stronger hover shadow */
}

.tour-image-container {
    position: relative;
    padding-top: 65%; /* Adjust aspect ratio if needed */
    overflow: hidden;
}

.tour-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.tour-card:hover .tour-image-container img {
    transform: scale(1.03); /* Subtle zoom on hover */
}

.tour-info {
    padding: 1.8rem; /* More padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.tour-info h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.3rem; /* Slightly smaller card title */
}
.tour-info p { /* Main description */
    flex-grow: 1;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-align: left; /* Align card text left */
    color: var(--secondary-text-color);
}
.tour-info ul { /* Highlights list */
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}
.tour-info ul li {
    margin-bottom: 0.4rem;
    padding-left: 1.2em;
    position: relative;
}
.tour-info ul li::before { /* Custom bullet */
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}
.tour-info .price, .tour-info .duration {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: left;
}
.tour-info .price {
    font-weight: 600;
    color: var(--primary-color);
}

.tour-info .book-button {
    margin-top: auto; /* Align button to bottom */
    width: 100%; /* Make button full width */
}


/* Buttons */
button, .button {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.8rem 1.8rem; /* Adjusted padding */
    border: none;
    border-radius: calc(var(--border-radius) / 1.5); /* Slightly less rounded */
    font-size: 1rem;
    font-weight: 500; /* Medium weight */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    text-align: center;
}

button:hover, .button:hover {
    background: #0056b3; /* Darker blue on hover */
    transform: translateY(-1px);
}
button:active, .button:active {
    transform: translateY(0);
}
button:disabled {
    background-color: var(--medium-gray);
    color: var(--secondary-text-color);
    cursor: not-allowed;
    transform: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Slightly darker overlay */
    z-index: 1000;
    /* overflow-y: auto; Removed */
    padding: 1rem; /* Reduced padding for smaller margins */
    /* display: flex;  <- REMOVED: This should only apply when modal is active */
    align-items: center; /* Keep these for when display is flex */
    justify-content: center; /* Keep these for when display is flex */
}

.modal-content {
    background: var(--card-background);
    padding: 1.5rem;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    max-height: 900px;
    border-radius: var(--border-radius);
    -webkit-border-radius: var(--border-radius); /* Add vendor prefix */
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensure overflow is hidden */
    isolation: isolate; /* Create stacking context */
}
.modal-content h2 { text-align: left; margin-bottom: 1rem; } /* Adjust spacing */
.modal-content p { text-align: left; margin-bottom: 1rem; } /* Adjust spacing */


.close {
    position: absolute;
    top: 0.75rem; /* Adjust position slightly with padding change */
    right: 0.75rem; /* Adjust position slightly with padding change */
    font-size: 2rem; /* Slightly larger */
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: var(--secondary-text-color); /* Use slightly darker gray */
    transition: color 0.2s ease;
    padding: 0.75rem; /* Increase padding for easier tapping */
    z-index: 1001; /* Ensure the close button is always visible */
}
.close:hover {
    color: var(--primary-color);
}

/* Style for the booking iframe container and iframe itself */
#booking-embed { /* Reusing this ID for the embed container */
    width: 100%; /* Use 100% width */
    flex-grow: 1; /* Allow container to fill available vertical space */
    display: flex; /* Use flex to manage iframe */
    overflow-y: auto; /* Allow vertical scrolling if needed */
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari clipping fix */
}
#booking-embed iframe {
    display: block; /* Remove extra space below iframe */
    width: 100%;
    height: 100%; /* Fill the container height */
    border: none !important; /* Ensure no border, override any defaults */
    background: transparent; /* Ensure iframe background is transparent */
    /* Removed redundant border-radius: calc(var(--border-radius) / 1.0); */
}

/* Custom Scrollbar for Embed Container (WebKit/Blink) */
#booking-embed::-webkit-scrollbar {
    width: 8px;
}

#booking-embed::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 10px;
}

#booking-embed::-webkit-scrollbar-thumb {
    background-color: var(--medium-gray);
    border-radius: 10px;
    border: 2px solid var(--light-gray); /* Padding around thumb */
}

#booking-embed::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-text-color);
}

/* Custom Scrollbar for Embed Container (Firefox) */
#booking-embed {
    scrollbar-width: thin;
    scrollbar-color: var(--medium-gray) var(--light-gray);
}


/* Form Styles */
.contact-form {
    max-width: 600px;
    margin: 2rem auto 0 auto; /* Add margin top */
}

.contact-form input,
.contact-form textarea,
#payment-form-element {
    width: 100%;
    padding: 0.9rem 1rem; /* More padding */
    margin-bottom: 1.2rem;
    border: 1px solid var(--medium-gray);
    border-radius: calc(var(--border-radius) / 1.5);
    font-family: var(--font-main);
    font-size: 1rem;
    background-color: #fff; /* Ensure white background */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#payment-form-element {
    padding: 0; /* Keep no padding for Stripe element container */
    border: none; /* Remove border from container */
}
/* Style the Stripe Element itself via JS */

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2); /* Focus ring */
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input.invalid,
.contact-form textarea.invalid {
    border-color: #dc3545; /* Bootstrap danger color */
}
.contact-form input.invalid:focus,
.contact-form textarea.invalid:focus {
     box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* Form Feedback Messages */
.form-success, .form-error, .payment-error {
    padding: 0.8rem 1rem;
    margin-bottom: 1.2rem;
    border-radius: calc(var(--border-radius) / 1.5);
    display: none;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.form-success {
    background-color: #e6f7ec; /* Lighter green */
    color: #096e31;
    border-color: #b7ebc9;
}
.form-error, .payment-error {
    background-color: #fdecea; /* Lighter red */
    color: #b31d2b;
    border-color: #f9c6cb;
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    background: #e8e8ed; /* Slightly different light gray */
    margin-top: 5rem;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Advisory Section Specific Styles */
.advisory-content {
    /* Container for the info box */
    margin-bottom: 3rem; /* Space before contact form */
}

.advisory-info-box {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem; /* Adjust padding as needed */
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    display: flex; /* Use flexbox for layout */
    align-items: flex-start; /* Align items to the top */
    gap: 1.5rem; /* Space between image and text */
    max-width: 900px; /* Limit width */
    margin: 0 auto; /* Center the box */
}

.advisory-info-box img {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 100%; /* Make image responsive within its container */
    max-width: 250px; /* Limit image max width */
    height: auto; /* Maintain aspect ratio */
    border-radius: calc(var(--border-radius) / 1.5); /* Slightly rounded corners for image */
    display: block; /* Remove extra space below image */
}

.advisory-info-box p {
    text-align: left; /* Align text to the left */
    margin: 0; /* Remove default paragraph margin */
    flex-grow: 1; /* Allow text to take remaining space */
    max-width: none; /* Override general max-width for p */
}

/* Contact Form Headers (Common Styling for both sections) */
#tours .contact h3,
#tours .contact p,
#advisory .contact h3,
#advisory .contact p {
    text-align: left; /* Align left */
    margin-left: 0;
    margin-right: 0;
    max-width: 600px; /* Match form width */
    margin-left: auto; /* Center the text block */
    margin-right: auto; /* Center the text block */
}
/* Adjust spacing for contact forms */
#tours .contact,
#advisory .contact {
    margin-top: 3rem; /* Space above contact form area */
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 4rem 0; }
    .advisory-info-box {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    html { scroll-padding-top: 55px; }
    body { padding-top: 56px; }
    nav { padding: 0.6rem 1rem; }
    nav ul { gap: 1.5rem; }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.2rem; }

    section { padding: 3rem 0; }
    .container { padding: 0 1rem; }
    .modal-content { margin: 1rem; padding: 2rem; }
    .tour-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }

    /* Stack advisory box content on smaller screens */
    .advisory-info-box {
        flex-direction: column;
        align-items: center; /* Center items when stacked */
        text-align: center;
    }
    .advisory-info-box img {
        max-width: 70%; /* Adjust image size */
        margin-bottom: 1rem;
    }
    .advisory-info-box p {
        text-align: center; /* Center text when stacked */
    }

    /* Center contact headers on smaller screens */
    #tours .contact h3,
    #tours .contact p,
    #advisory .contact h3,
    #advisory .contact p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tour-grid { grid-template-columns: 1fr; } /* Single column on small screens */
    nav ul { justify-content: space-around; gap: 1rem; }
    nav a { font-size: 0.9rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    .hero { height: calc(75vh - 56px); min-height: 350px; }
    .hero p { font-size: 1rem; }
    button, .button { padding: 0.7rem 1.5rem; font-size: 0.95rem; }
    .modal-content { padding: 1.5rem; }
    .advisory-info-box {
        padding: 1rem;
    }
    .advisory-info-box img {
        max-width: 80%;
    }
}

/* Corporate Booking Option */
.corporate-booking-option {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1.5rem;
background-color: #e8e8ed; /* Match private tours info or similar */
padding: 1.5rem 2rem;
border-radius: var(--border-radius);
margin-top: 3rem; /* Space above */
margin-bottom: 3rem; /* Space below */
border: 1px solid var(--border-color);
box-shadow: var(--card-shadow);
}

.corporate-info {
flex-grow: 1; /* Allow text content to take available space */
}

.corporate-info h3 {
margin-bottom: 0.5rem;
font-size: 1.2rem; /* Slightly smaller heading */
text-align: left;
}

.corporate-info p {
margin-bottom: 0.75rem;
font-size: 0.95rem;
text-align: left;
max-width: none; /* Override default centered paragraph */
color: var(--secondary-text-color);
}

.corporate-info .price {
display: block; /* Ensure price is on its own line if needed */
font-size: 0.9rem;
font-weight: 600;
color: var(--primary-color);
text-align: left;
}

.corporate-booking-option .book-button {
flex-shrink: 0; /* Prevent button from shrinking */
/* Button styling is inherited */
}

/* Responsive adjustments for corporate booking */
@media (max-width: 768px) {
.corporate-booking-option {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.corporate-booking-option .book-button {
    margin-top: 1rem;
    width: 100%;
}
.corporate-info h3,
.corporate-info p,
.corporate-info .price {
    text-align: left;
}
}

/* Language Toggle Button */
.language-toggle-button {
    background-color: transparent;
    border: 1px solid var(--primary-color); /* Thin border using primary text color */
    color: var(--primary-color);
    padding: 0.25rem 0.6rem; /* Small padding */
    border-radius: 15px; /* Rounded corners */
    cursor: pointer;
    font-size: 0.85rem; /* Smaller font size */
    font-weight: 600;
    margin-left: 0.5rem; /* Add some space from the previous nav item */
    vertical-align: middle; /* Align with nav text */
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1; /* Ensure text aligns well vertically */
}

.language-toggle-button:hover {
    background-color: var(--primary-color);
    color: var(--background-color); /* Invert colors on hover */
}

/* Adjust nav alignment if needed */
nav ul {
    align-items: center; /* Vertically align items in the nav */
}