/* Base Styles */
/* Global center alignment for all paragraphs and headings */
p, h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

/* Set paragraph font size */
p {
    font-size: 1.1rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.small p {
    font-size: 0.9rem;
}

:root {
    --primary-color: #f8d7da;
    --secondary-color: #d4a5a5;
    --accent-color: #a26769;
    --text-color: #333;
    --light-text: #fff;
    --dark-overlay: rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Garamond', 'Baskerville', 'Caslon', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    text-align: center;
}

/* Updated code */
h1, h2 {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);*/
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1.25rem;
    text-transform: normal;
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Intro section */
.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0 2rem;
}

/* Move the main h2 heading higher */
.intro h2:first-of-type {
    margin-top: -70px;
}

/* SEO h1 styling (when not visually hidden) */
.intro h1 {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    color: var(--accent-color);
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.intro h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: var(--accent-color);
}

/* No special styling for h2 - using default h2 styling */

/* Header Styles */
header {
    background-color: var(--light-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: padding 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

header.unfixed {
    position: static;
    box-shadow: none !important;
}

.logo-container {
    text-align: center;
    padding: 1rem 0;
}

.logo {
    width: 350px;
    height: auto;
    transition: width 0.3s ease;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

/* Compact header when page is scrolled */
header.header-scrolled {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

header.header-scrolled .logo-container {
    padding: 0;
    text-align: left;
}

header.header-scrolled .logo {
    width: 175px; /* roughly half original size */
}

header.header-scrolled nav {
    justify-content: flex-end;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 1rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Active nav item */
.nav-menu a.active {
    font-weight: 700;
    text-decoration: underline;
}

/* Dropdown menu styles */
.nav-menu li.has-dropdown {
    position: relative;
}

.nav-menu li.has-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-menu li.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

/* Desktop only: show dropdown on hover */
@media (min-width: 769px) {
    .nav-menu li.has-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
    }
}

.nav-menu .dropdown-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu .dropdown-menu a {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

.nav-menu .dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.nav-menu .dropdown-menu a strong {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.nav-menu .dropdown-menu .event-date {
    font-size: 0.75rem;
    color: #666;
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 5px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: transform 0.3s ease-in-out, opacity 0.2s ease;
}

/* Hamburger to X animation */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.event-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.event-main {
    flex: 2;
    min-width: 260px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: 2rem;
    align-items: stretch;
}

.event-main h2 {
    margin-bottom: 1rem;
    grid-column: 1;
}

.event-main > *:not(.event-map) {
    grid-column: 1;
}

.event-map {
    margin-top: 1.5rem;
    grid-column: 2;
    justify-self: center;
    width: 100%;
    max-width: 450px;
}

.event-details {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Event page photo styling */
.event-photo {
    width: 40%;
    height: auto;
    border-radius: 4px;
}

.event-photo-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.event-photo-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

/* Event description section styling */
.event-description {
    margin: 2rem 0;
    clear: both;
}

.event-description p {
    text-align: left;
}

/* Centered event taglines */
.event-tagline {
    text-align: center !important;
    font-size: 1.2rem;
}

/* Ticket box text alignment */
.ticket-box p {
    text-align: center;
}

/* Mobile styles for event page */
@media (max-width: 768px) {
    .event-photo-left,
    .event-photo-right {
        float: none;
        display: block;
        margin: 0 auto 1.5rem;
        width: 100%;
    }

    .event-description p {
        text-align: justify;
    }
}

/* About page classic layout */
.about-classic {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1rem;
    text-align: justify;
}

.about-classic p {
    margin-bottom: 1rem;
    text-align: justify;
}

.about-classic h1, .about-classic h2, .about-classic h3, .about-classic h4, .about-classic h5, .about-classic h6 {
    text-align: left;
}

.about-photo {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 4px;
}

.about-photo-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.about-photo-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

/* Mobile styles for about page */
@media (max-width: 768px) {
    .about-photo-left,
    .about-photo-right {
        float: none;
        display: block;
        margin: 0 auto 1.5rem;
        max-width: 100%;
    }
    
    .about-classic {
        text-align: center;
    }
    
    .about-classic p {
        text-align: justify;
    }
    
    .about-classic h1,
    .about-classic h2,
    .about-classic h3,
    .about-classic h4,
    .about-classic h5,
    .about-classic h6 {
        text-align: center;
    }
}

/* Hero Section */
.event-hero {
    background: url('../img/C&T_beeses_bristol_rainy_day_wedding_rubywalkerphoto-308.jpg') no-repeat center top 60px/cover;
    background-attachment: fixed;
    height: 56vh;
    margin-top: 150px;
    position: relative;
    color: var(--light-text);
}

/* Remove darkening effect for event hero */
.event-hero::before {
    display: none;
}

/* Make event hero h1 larger and center content */
.event-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.event-hero .hero-content {
    text-align: center;
    margin: 0 auto;
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
}

.hero-tickets-text {
    color: #fff;
    font-size: 3.25rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.event-hero h1 {
    text-align: center;
}

.event-hero p {
    text-align: center;
}

/* Generic page hero (used on pages like Exhibitors) */
.page-hero {
    margin-top: 150px; /* Offset for fixed header so content is not hidden */
}

/* Sponsors page hero - add extra padding so H1 clears header */
.sponsors-hero {
    padding: 3rem 0 2rem;
}

.sponsors-hero .hero-content {
    margin: 50px auto 0; /* additional space above H1 and center block */
    text-align: center;
}

.sponsors-hero .hero-content p {
    text-align: center;
}

/* About page hero - ensure H1 & intro text are visible and centered */
.about-hero {
    padding: 3rem 0 2rem;
}

.about-hero .hero-content {
    margin: 50px auto 0; /* extra space above H1 and center block */
    text-align: center;
}

.about-hero .hero-content p {
    text-align: center;
}

/* Contact page hero - ensure H1 & intro text are visible and centered */
.contact-hero {
    padding: 3rem 0 2rem;
}

.contact-hero .hero-content {
    margin: 50px auto 0; /* extra space above H1 and center block */
    text-align: center;
}

.contact-hero .hero-content p {
    text-align: center;
}

.hero {
    height: 56vh; /* 30% less than original 80vh */
    background: url('https://picsum.photos/1600/900') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    position: relative;
    margin-top: 120px; /* Adjust based on header height */
}

/* Home page specific hero image */
.hero.home-hero {
    background: url('../img/home.jpg') no-repeat center bottom 85px/cover;
    background-attachment: fixed;
}

/* Remove darkening effect for home hero */
.hero.home-hero::before {
    display: none;
}

/* Exhibitors page hero using custom background */
.exhibitors-hero {
    background: url('../img/exhibitors.jpg') no-repeat center top 84px/cover;
    background-attachment: fixed;
    height: 56vh;
    margin-top: 150px;
    position: relative;
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.exhibitors-hero::before {
    display: none; /* Remove darkening effect */
}

/* Exhibitors hero h1 styling */
.exhibitors-hero h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.exhibitors-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-overlay);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    margin-bottom: 1.5rem;
}


.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    background-color: #333;
    color: var(--light-text);
    padding: 3rem 80px 1rem;
}

.footer-instagram {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .footer-instagram {
        padding: 0 20px;
        margin-bottom: 3rem;
    }
}

.footer-instagram h3 {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-instagram h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
}

.footer-instagram-handle a {
    color: #ccc;
}

.instagram-grid {
    margin: 1.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    justify-content: center;
}

/* Instagram grid on mobile */
@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
        padding: 0 15px;
    }
}

/* Instagram grid on very small screens */
@media (max-width: 480px) {
    /* Responsive styling for intro section on very small screens */
    .intro h1 {
        font-size: 1.7rem;
        padding-bottom: 0.3rem;
    }
    
    .intro h1::after {
        width: 50px;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Further adjustments for hero sections on small devices */
    .hero, .event-hero, .exhibitors-hero {
        height: 30vh !important; /* Even shorter on very small screens */
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    /* Adjust page-hero margin for small screens */
    .page-hero {
        margin-top: 120px;
    }
}

/* Sponsors logo grid */
.sponsors-logo-grid {
    margin-top: 2rem;
}

.sponsor-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: 1000px; /* 5 x 200px max, so at most 5 columns */
    margin: 0 auto;
    gap: 1.5rem;
}

/* Mobile sponsors grid - 2 images per row */
@media (max-width: 768px) {
    .sponsor-logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.sponsor-logo-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-logo-grid-item img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px solid #ccc;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-logo-grid-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.instagram-item {
    display: block;
    background-color: #444;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1; /* Ensure square aspect ratio */
}

.instagram-item img {
    display: block; /* remove baseline gap under inline images */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure images cover the entire area */
}

.instagram-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 112, 255, 0.6), rgba(252, 175, 69, 0.6));
    opacity: 0.4;
}

/* Newsletter Signup Form */
.footer-newsletter {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 2rem 15px;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
}

.footer-newsletter h3 {
    color: var(--light-text);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-newsletter h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
}

.footer-newsletter > p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

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

.newsletter-form-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.newsletter-field {
    flex: 1;
    max-width: 250px;
}

.newsletter-field-full {
    max-width: 100%;
    width: 100%;
}

.newsletter-field input,
.newsletter-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #444;
    color: var(--light-text);
    font-size: 0.95rem;
}

.newsletter-field input::placeholder {
    color: #999;
}

.newsletter-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.newsletter-field select option {
    background-color: #333;
    color: var(--light-text);
}

.newsletter-field input:focus,
.newsletter-field select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.newsletter-submit {
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.newsletter-submit:hover {
    background-color: #c9a227;
}

.newsletter-submit:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.newsletter-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.newsletter-message.success {
    color: #4caf50;
}

.newsletter-message.error {
    color: #f44336;
}

@media (max-width: 600px) {
    .newsletter-form-row {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-field {
        max-width: 100%;
        width: 100%;
    }
    
    .newsletter-other-row {
        width: 100%;
    }
}

.ticket-cta {
    text-align: center;
    margin-top: 1.5rem;
}

.ticket-cta-button {
    background-color: #000;
    color: #fff;
    padding: 0.85rem 2.5rem;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-weight: 600;
}

.ticket-cta-button:hover {
    background-color: #333;
}

/* Exhibitors page intro section */
.exhibitors-intro {
    /* Base styles for exhibitor intro sections are defined in other rules */
    display: block;
}

.exhibitors-intro h2,
.exhibitors-intro h3 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.exhibitors-intro p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Exhibitors page CTA section */
.exhibitors-intro .cta-section {
    text-align: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    background-color: #f9f9f9; /* match contact form card background */
    padding: 2rem;
    padding-bottom: 4rem; /* extra bottom padding so last checkbox isn't at scroll boundary */
    max-width: 600px;
    width: 90%;
    max-height: 90vh; /* keep entire form accessible */
    overflow-y: scroll; /* always show scrollbar to indicate more content */
    overflow-x: hidden; /* hide horizontal scrollbar */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Force scrollbar to always be visible on macOS/WebKit browsers */
.modal-content::-webkit-scrollbar {
    -webkit-appearance: scrollbar;
    width: 12px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 2px solid #f9f9f9;
}

.modal-content::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}

.modal-content > h2,
.modal-content > p {
    text-align: center;
}

/* Make Exhibitor Application modal wider than default */
#exhibitor-modal .modal-content {
    max-width: 700px;
}

.modal-close {
    position: sticky;
    top: 0;
    float: right;
    margin-right: -0.5rem;
    margin-top: -0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 2.25rem;
    cursor: pointer;
    color: #000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ticket-form .form-group {
    margin-bottom: 1rem;
}

.ticket-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.ticket-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

.ticket-form .ticket-button,
.ticket-form .btn-primary {
    display: block;
    margin: 1.5rem auto 0;
    background-color: #000;
    color: #fff;
    padding: 0.85rem 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    min-width: 220px;
}

/* Direct styling for the Continue to Payment button */
#show-paypal-button {
    display: block;
    margin: 1.5rem auto 0;
    background-color: #000;
    color: #fff;
    padding: 0.85rem 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    min-width: 220px;
}

/* PayPal button styling */
.paypal-button {
    margin: 1.5rem auto;
    text-align: center;
    max-width: 250px;
}

.ticket-options {
    margin-top: 1.5rem;
}

.payment-note {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 0.9rem;
}

.payment-note p {
    margin: 0.5rem 0;
}

/* Ticket type styling */
#ticket-type,
#direct-ticket-type {
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    font: inherit;
}

/* Direct ticket form on events page */
.direct-ticket-form {
    background-color: #FFE5E7;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem auto; /* Center the form with auto margins */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    width: 80%; /* 80% width on mobile */
    touch-action: manipulation; /* Prevents double-tap to zoom on iOS */
}

/* Make the form 50% width on desktop */
@media (min-width: 768px) {
    .direct-ticket-form {
        width: 50%;
    }
}

.direct-ticket-form .form-group {
    margin-bottom: 1rem;
}

.direct-ticket-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.direct-ticket-form input,
.direct-ticket-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    transition: border-color 0.2s;
}

/* Simple validation styles */
.direct-ticket-form select.invalid {
    border-color: #ff3860;
    background-color: rgba(255, 56, 96, 0.05);
}

/* Custom alert popup */
.custom-alert {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    z-index: 1050;
    text-align: center;
    max-width: 90%;
    width: 300px;
    animation: fadeIn 0.3s;
}

.custom-alert p {
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
}

.custom-alert button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.custom-alert button:hover {
    background-color: #333;
}

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    animation: fadeIn 0.3s;
}

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

/* Quantity selector styling - grid-based approach for perfect alignment */
.quantity-selector {
    margin-bottom: 1.5rem;
    touch-action: manipulation; /* Prevents double-tap to zoom on iOS */
}

.quantity-input-group {
    display: grid;
    grid-template-columns: 42px 60px 42px;
    gap: 8px;
    max-width: 180px;
    margin: 0 auto;
    height: 42px;
    align-items: center; /* Ensure vertical centering */
    position: relative; /* For absolute positioning of pseudo-elements */
}

.quantity-input-group input[type="number"] {
    width: 100%;
    height: 42px;
    text-align: center;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    touch-action: manipulation;
    line-height: 42px;
}

/* Hide number input arrows */
.quantity-input-group input[type="number"]::-webkit-outer-spin-button,
.quantity-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-btn {
    width: 100%;
    height: 42px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    position: relative; /* For the pseudo-element */
    z-index: 1; /* Ensure the button is above the pseudo-element */
}

/* Create a larger touch target using a pseudo-element */
.quantity-btn::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1; /* Behind the button */
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-btn:active {
    background-color: #d0d0d0;
}

/* Center the CONTINUE TO CHECKOUT button */
.direct-ticket-form button {
    display: block;
    margin: 0 auto;
    text-align: center;
}

/* Ticket summary in modal */
.ticket-summary {
    background-color: #f0f0f0;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    border-left: 3px solid #000;
}

.ticket-summary h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.ticket-summary p {
    margin: 0;
    font-weight: 500;
}

/* Payment processing spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ticket-form {
    text-align: center;
}

/* Fix for date input on iOS */
.ticket-form input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    max-width: 100%;
    box-sizing: border-box;
    height: 41px; /* Match the height of other input fields */
    line-height: normal; /* Fix vertical alignment */
    min-height: 41px; /* Ensure minimum height even when empty */
    padding-top: 0; /* Reset padding to ensure consistent height */
    padding-bottom: 0; /* Reset padding to ensure consistent height */
}

.booking-form {
    max-width: 600px;
    margin: 0 auto;
}

.booking-form .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.booking-form .form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.booking-form .form-group input,
.booking-form .form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

.booking-form .form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

.booking-form .form-group small {
    margin-top: 0.25rem;
    display: block;
}

/* Checkbox row spans input column neatly */
.booking-form .checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Center exhibitor form submit button */
.booking-form .form-submit {
    text-align: center;
    margin-top: 1rem;
}

/* Instagram handle field layout */
.booking-form .input-with-icon {
    display: flex;
    align-items: center;
    width: 100%;
}

.booking-form .input-with-icon span {
    margin-right: 0.35rem;
}

/* Instagram handle field layout */
.instagram-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instagram-group label {
    margin-bottom: 0;
}

.instagram-group .input-with-icon {
    display: flex;
    align-items: center;
    flex: 1;
}

.instagram-group .input-with-icon span {
    margin-right: 0.35rem;
}

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

.social-links a {
    color: var(--light-text);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

.footer-left p {
    color: #ccc;
}

.footer-left a {
    color: #ccc;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-center p {
    color: #ccc;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-right a {
    color: #ccc;
}

.footer-right .separator {
    color: #666;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        width: 100%;
        justify-content: center;
    }
    
    .footer-left {
        order: 1;
    }
    
    .footer-center {
        order: 3;
    }
    
    .footer-right {
        order: 2;
    }
}

@media (max-width: 768px) {
    /* Responsive styling for intro section */
    .intro h1 {
        font-size: 2rem;
        padding-bottom: 0.4rem;
    }
    
    .intro h1::after {
        width: 60px;
    }
    
    /* Make logo 30% smaller on mobile */
    .logo {
        width: 245px; /* 30% smaller than original 350px */
    }
    
    .hamburger {
        display: block;
        position: absolute;
        right: 2rem;
        top: 2rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        z-index: 1000; /* Ensure hamburger stays above the menu */
    }

    .footer-right {
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        top: -100vh; /* Start from above the viewport */
        flex-direction: column;
        background-color: var(--light-text);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        z-index: 999;
        opacity: 0;
        transform: scale(0.9);
    }

    .nav-menu.active {
        top: 0; /* Position at the top of the viewport */
        padding-top: 80px; /* Reduced space at top */
        opacity: 1;
        transform: scale(1);
    }
    
    /* Enhanced mobile menu styling */
    .nav-menu {
        padding-bottom: 2rem; /* Add some padding at the bottom */
    }
    
    .nav-menu li a {
        padding: 0.75rem 0;
        display: inline-block;
        transition: all 0.2s ease;
    }
    
    .nav-menu li a:hover {
        transform: translateY(-2px);
    }
    
    /* Mobile dropdown styles */
    .nav-menu li.has-dropdown {
        position: relative;
    }
    
    .nav-menu li.has-dropdown > a {
        display: inline-flex;
        justify-content: center;
    }
    
    .nav-menu .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: transparent;
        min-width: auto;
        max-height: 0;
        overflow: hidden;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu li.has-dropdown.dropdown-open .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .nav-menu .dropdown-menu li {
        display: block;
    }
    
    .nav-menu .dropdown-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .nav-menu .dropdown-menu a strong {
        font-size: 0.85rem;
        display: block;
        margin-bottom: 0.15rem;
    }
    
    .nav-menu .dropdown-menu .event-date {
        font-size: 0.7rem;
        color: #888;
        display: block;
    }
    
    .dropdown-arrow {
        transition: transform 0.3s ease;
    }
    
    .nav-menu li.has-dropdown.dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
/* Mobile-only navigation items - always hidden on desktop */
.mobile-only,
.mobile-only-divider {
    display: none !important; /* Force hidden on desktop with !important */
}

/* Mobile hero image fixes */
@media (max-width: 768px) {
    /* Fix for hero images on mobile - disable fixed attachment and adjust positioning */
    .hero, .event-hero, .exhibitors-hero, .page-hero {
        background-attachment: scroll !important; /* Disable fixed attachment on mobile */
        background-position: center center !important; /* Center the background image */
        background-size: cover !important;
    }
    
    /* Specific adjustments for each hero image */
    .hero.home-hero {
        background-position: center center !important;
    }
    
    .exhibitors-hero {
        background-position: center center !important;
    }
    
    .event-hero {
        background-position: center center !important;
    }
    
    /* Reduce hero height on mobile for better proportions */
    .hero, .event-hero, .exhibitors-hero {
        height: 40vh !important;
    }
    
    /* Improve hero content positioning on mobile */
    .hero-content {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Adjust text size for better readability on mobile */
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Keep mobile-only items hidden even on mobile unless menu is active */
    .mobile-only,
    .mobile-only-divider {
        display: none !important;
    }
    /* Show mobile-only items when menu is active */
    .nav-menu.active .mobile-only {
        display: block !important;
    }
    
    /* Divider for mobile menu sections */
    .mobile-only-divider {
        display: block !important;
        height: 1px;
        background-color: rgba(0,0,0,0.05);
        margin: 1.5rem 0;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Instagram icon styling */
    .mobile-only.social-icon {
        margin: 1rem 0;
    }
    
    .mobile-only.social-icon a {
        font-size: 1.25rem; /* 30% smaller than original 1.8rem */
        width: 35px; /* 30% smaller than original 50px */
        height: 35px; /* 30% smaller than original 50px */
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        background: #222; /* Black background */
        border-radius: 8px;
        color: white;
    }
    
    .mobile-only.social-icon a:hover {
        transform: scale(1.1);
        background: #444; /* Slightly lighter on hover */
    }
    
    /* Less noticeable Terms/Privacy links */
    .mobile-only.secondary-nav {
        margin-top: 1rem;
        font-size: 0.75rem;
        opacity: 0.6;
    }
    
    .mobile-only.secondary-nav a {
        color: #888;
    }
    
    .mobile-only.secondary-nav .separator {
        margin: 0 0.5rem;
        color: #ccc;
    }
}

/* Adjust menu position when header is minimized */
header.header-scrolled .nav-menu.active {
    padding-top: 60px; /* Even less padding for minimized header */
}

.hero h1 {
    font-size: 2.5rem;
}

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

.footer-content {
    flex-direction: column;
}
    
/* Honeypot field for spam prevention - hide completely */
.website-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    overflow: hidden;
    visibility: hidden;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Contact page form layout */
.contact-form-only {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.contact-form-only h2,
.contact-form-only > p {
    text-align: center;
    margin-bottom: 1rem;
}

/* Card-style form container */
.contact-form {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form .form-submit {
    text-align: center;
    margin-top: 1.5rem;
}

/* General button styles */
.btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

/* Primary button - black with white text */
.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-primary:hover {
    background-color: #333;
}

/* Contact form submit button */
.contact-form-only .btn-primary {
    display: inline-block;
    padding: 0.85rem 2.5rem;
}

/* General button styles */
.btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

/* Primary button - black with white text */
.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-primary:hover {
    background-color: #333;
}

/* Contact form submit button */
.contact-form-only .btn-primary {
    display: inline-block;
    padding: 0.85rem 2.5rem;
}

/* Update exhibitors intro section */
.exhibitors-intro h2,
.exhibitors-intro h3 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.exhibitors-intro p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* Fix checkbox alignment in forms */
.checkbox-group, .radio-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    margin-right: 0.5rem;
}

.checkbox-group label,
.radio-group label {
    margin-bottom: 0;
    display: inline;
}

/* Fix for form layout */
.booking-form h3 {
    margin-top: 1.5rem;
}

.booking-form .form-group {
    margin-bottom: 1.5rem;
}

/* More specific fix for checkbox alignment */
.checkbox-group, .radio-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
    text-align: left !important;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    margin-right: 0.5rem !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.checkbox-group label,
.radio-group label {
    margin-bottom: 0 !important;
    display: inline !important;
    text-align: left !important;
    width: auto !important;
}

/* Override any conflicting styles */
.booking-form .form-group label {
    display: block;
    margin-bottom: 0.35rem;
}

.booking-form .checkbox-group label,
.booking-form .radio-group label {
    display: inline !important;
    margin-bottom: 0 !important;
}
}

/* Mobile touch target fix for checkboxes/radios inside modals */
#exhibitor-modal input[type="checkbox"],
#exhibitor-modal input[type="radio"] {
    min-width: 20px;
    min-height: 20px;
    touch-action: manipulation; /* prevent double-tap zoom, reduce tap delay */
    cursor: pointer;
}

#exhibitor-modal label {
    touch-action: manipulation;
    cursor: pointer;
}

/* Increase tap target for checkbox rows on mobile */
@media (max-width: 768px) {
    #exhibitor-modal div[style*="display: flex"][style*="margin-bottom: 10px"] {
        min-height: 44px;
        align-items: center;
    }

    #exhibitor-modal input[type="checkbox"],
    #exhibitor-modal input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
        margin: 0;
    }

    #exhibitor-modal div[style*="width: 30px"] {
        min-width: 44px !important;
        width: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Add scroll padding to fix anchor links with fixed header */
html {
    scroll-padding-top: 180px; /* Adjust based on your header height */
    scroll-behavior: smooth;
}

/* Colored background section */
.colored-section {
    background-color: #D3d3d3;
    padding: 2rem 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 1.5rem;
    margin-bottom: 0;
    display: block;
}

/* Remove margin between adjacent colored sections */
.colored-section + .colored-section {
    margin-top: -25px; /* Negative margin to ensure no gap */
    border-top: none;
}

.colored-section .container {
    padding-top: 0;
    padding-bottom: 0;
}

/* Remove bottom margin when colored-section is last before footer/scripts */
.colored-section:last-of-type {
    margin-bottom: 0;
}

/* Ticket box styling */
.ticket-box {
    padding-top: 0;
    margin-top: 0;
}

/* Previous Application Retrieval Section */
.previous-application-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.retrieval-toggle-btn {
    width: 100%;
    background: #000;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.retrieval-toggle-btn:hover {
    background-color: #333;
    color: #fff;
}

.retrieval-toggle-btn.active {
    background-color: #333;
    color: #fff;
}

.retrieval-toggle-btn.success {
    background-color: #28a745;
    color: #fff;
}

.retrieval-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.retrieval-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

.retrieval-step {
    text-align: center;
}

.retrieval-step .form-group {
    max-width: 350px;
    margin: 0 auto 15px;
    text-align: left;
}

.retrieval-step .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.retrieval-step .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#verification-code {
    font-size: 1.5rem;
    letter-spacing: 8px;
    text-align: center;
    font-family: monospace;
}

.retrieval-btn {
    background-color: #333;
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retrieval-btn:hover {
    background-color: #555;
}

.retrieval-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.retrieval-btn-secondary {
    background-color: transparent;
    color: #666;
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retrieval-btn-secondary:hover {
    border-color: #333;
    color: #333;
}

.retrieval-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.retrieval-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

.retrieval-status:empty {
    display: none;
}

.retrieval-status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.retrieval-status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.code-sent-message {
    font-size: 0.9rem;
    color: #155724;
    background-color: #d4edda;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.retrieval-success {
    text-align: center;
    padding: 15px;
    background-color: #d4edda;
    border-radius: 4px;
    color: #155724;
}

.retrieval-success p {
    margin: 0;
    font-size: 0.95rem;
}

.already-applied-badge {
    display: inline;
    font-weight: normal;
}

/* Mobile adjustments for retrieval section */
@media (max-width: 480px) {
    .previous-application-section {
        padding: 12px;
    }

    .retrieval-toggle-btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

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

    .retrieval-btn,
    .retrieval-btn-secondary {
        width: 100%;
    }

    #verification-code {
        font-size: 1.25rem;
        letter-spacing: 6px;
    }
}
