/* Enhanced Responsive Styles for Sensitivity Series */

/* Base styles and resets */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    /* Color variables for consistent theming */
    --primary-color: #0062a8;
    --primary-dark: #004e85;
    --accent-color: #ff5722;
    --light-bg: #f7f9fc;
    --card-bg: rgba(240, 248, 255, 0.8);
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;

    /* Spacing variables */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Transition speed */
    --transition-speed: 0.3s;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Main container */
.flyer {
    width: 100%;
    max-width: 100%; /* Ensure full width on all screens */
    background-color: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    margin-top: 70px !important; /* Adjusted for fixed header */
}

/* Enhanced Responsive Header */
.site-header {
    background-color: #0d3b66;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    height: auto;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex-wrap: nowrap;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 15px 40px;
    position: relative;
    flex-shrink: 0;
    min-width: 120px;
}

.center-section {
    flex-grow: 1;
    min-width: 80px;
    max-width: 50%;
    flex-shrink: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    width: 100%;
    height: 100%;
}

.logo-link:hover, .logo-link:focus {
    opacity: 0.9;
}

.logo-link:focus {
    outline: 2px solid rgba(13, 59, 102, 0.4);
    outline-offset: 4px;
    border-radius: 4px;
}

.logo-image {
    height: 70px;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    vertical-align: middle;
}

/* Main Content Container */
.main-content {
    padding: 30px 5%; /* Adjusted for better mobile spacing */
    position: relative;
    width: 100%;
}

.background-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.07;
    z-index: 1;
    background-size: cover;
    pointer-events: none;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Event Title */
.event-title {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: bold;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-color);
    width: 100%;
    word-wrap: break-word;
}

/* Event Details */
.event-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(0.9rem, 4vw, 2.5rem);
    margin: 1.5rem 0;
    width: 100%;
}

.detail-box {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 0; /* Allow flexbox to shrink beyond content size */
    flex: 1 1 250px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Ensure it doesn't overflow on small screens */
}

.detail-box h3 {
    color: var(--primary-color);
    margin: 0 0 0.625rem 0;
    font-size: 1.125rem;
}

.detail-box p {
    font-weight: bold;
    font-size: 1rem;
    margin: 0;
    color: var(--accent-color);
}

/* Speaker Section */
.speakers {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0;
    gap: 1.875rem;
    flex-wrap: wrap;
    width: 100%;
}

/* Circular Speaker Photo Fix */

/* Updated speaker photo container */
.speaker-photo {
    width: 100%;
    padding-top: 225px; /* Create a square aspect ratio container */
    /*background-color: #f5f5f5;*/
    position: relative;
    overflow: hidden;
}

/* Profile image container */
.speaker-photo .profile-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px; /* Fixed height and width ensure circle shape */
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #0062a8;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.speaker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-info {
    padding: 1.25rem;
    border-top: 1px solid var(--primary-color);
}

.speaker-name {
    font-size: clamp(1.125rem, 4vw, 1.375rem);
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0 0.3125rem 0;
}

.speaker-title {
    font-size: clamp(0.875rem, 3vw, 1rem);
    color: var(--text-light);
    font-style: italic;
    margin: 0 0 0.9375rem 0;
}

.speaker-bio {
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    line-height: 1.5;
    color: #444;
}

/* Quote Container */
.quote-container {
    margin: 2.5rem 0;
    width: 100%;
}

.quote {
    position: relative;
    padding: 1.25rem 1.5625rem;
    margin-bottom: 1.5625rem;
    background-color: rgba(240, 248, 255, 0.5);
    border-radius: 5px;
}

.quote.orange-border {
    border-left: 5px solid var(--accent-color);
}

.quote.blue-border {
    border-left: 5px solid var(--primary-color);
}

.quote p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

.quote p strong {
    color: var(--primary-color);
}

/* Description */
.description {
    padding: 0 clamp(0.625rem, 3vw, 1.25rem);
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.125rem);
    line-height: 1.5;
    color: #444;
    margin: 1.875rem 0;
    width: 100%;
}

/* Call to Action */
.call-to-action {
    text-align: center;
    margin: 2.5rem 0;
    padding: clamp(0.9375rem, 4vw, 1.5625rem);
    background-color: var(--card-bg);
    border-radius: 8px;
    width: 100%;
}

.call-to-action p {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    font-weight: bold;
    color: var(--text-color);
    margin: 0.625rem 0;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    padding: clamp(0.9375rem, 3vw, 1.25rem);
    text-align: center;
    width: 100%;
}

.footer p {
    color: white;
    margin: 0;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Utilities */
.highlight {
    font-weight: bold;
    color: var(--accent-color);
}

.divider {
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 100%);
    margin: 2.5rem 0;
    border-radius: 2px;
    width: 100%;
}

/* About Series Section */
.about-series {
    margin: 2.5rem 0;
    background-color: rgba(240, 248, 255, 0.6);
    padding: clamp(1.25rem, 4vw, 1.875rem);
    border-radius: 8px;
    width: 100%;
}

.about-series h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.9375rem;
    font-size: clamp(1.25rem, 4vw, 1.625rem);
}

.about-series h4 {
    color: var(--accent-color);
    text-align: center;
    font-style: italic;
    margin: 0 0 1.25rem 0;
    font-size: clamp(1rem, 3vw, 1.25rem);
}

.about-series p {
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 0.9375rem;
}

.why-sensitivity {
    background-color: white;
    padding: clamp(0.9375rem, 3vw, 1.25rem);
    margin: 1.25rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.why-sensitivity h5 {
    color: var(--primary-color);
    margin: 0 0 0.9375rem 0;
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.125rem);
}

.why-sensitivity ul {
    font-size: clamp(0.875rem, 2vw, 0.9375rem);
    line-height: 1.4;
    text-align: left;
    margin: 0;
    padding: 0 0 0 1.5625rem;
}

.why-sensitivity li {
    margin-bottom: 0.75rem;
}

.why-sensitivity strong {
    color: var(--primary-color);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 1.875rem;
    margin-top: 3.125rem;
    width: 100%;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: clamp(1.375rem, 4vw, 1.75rem);
    margin: 0;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--accent-color);
    position: absolute;
    bottom: -10px;
    left: 25%;
    border-radius: 2px;
}

.tab-label {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 0.9375rem;
    display: inline-block;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    font-size: clamp(0.875rem, 2vw, 1rem);
    position: relative;
    top: 1px;
}

/* Enhanced Form Styles */
.registration-section {
    margin: 3.125rem 0;
    width: 100%;
}

.registration-form {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5625rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #c8d6e5;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: var(--text-color);
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 98, 168, 0.25);
}

/* Improved Form Row Layout */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.9375rem;
    margin-right: -0.9375rem;
    width: calc(100% + 1.875rem);
}

.form-col {
    flex: 1 1 300px; /* Better breakpoint */
    padding: 0 0.9375rem;
    margin-bottom: 1.25rem;
    min-width: 0; /* Allow shrinking below content size */
}

/* Enhanced checkbox and radio styling */
.checkbox-group,
.radio-group {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    position: relative;
    min-width: 200px;
    flex: 1 1 200px;
}

/* Custom checkbox and radio styling */
.checkbox-item input,
.radio-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-item label,
.radio-item label {
    position: relative;
    padding-left: 2.1875rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    display: inline-block;
    color: var(--text-color);
    font-weight: 400;
    margin: 0;
}

.checkbox-item label:before,
.radio-item label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.125rem;
    width: 1.375rem;
    height: 1.375rem;
    border: 2px solid #c8d6e5;
    background-color: #fff;
    transition: all 0.2s ease;
}

.checkbox-item label:before {
    border-radius: 4px;
}

.radio-item label:before {
    border-radius: 50%;
}

/* Custom checkbox/radio checked states */
.checkbox-item input:checked + label:before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.radio-item input:checked + label:before {
    border-color: var(--primary-color);
    border-width: 2px;
}

.checkbox-item input:checked + label:after {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.25rem;
    width: 0.375rem;
    height: 0.75rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-item input:checked + label:after {
    content: '';
    position: absolute;
    left: 0.4375rem;
    top: 0.5625rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Focus states for checkboxes/radios */
.checkbox-item input:focus + label:before,
.radio-item input:focus + label:before {
    box-shadow: 0 0 0 3px rgba(0, 98, 168, 0.25);
}

/* Required field marker */
.required-field::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Improved textarea */
textarea.form-control {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

/* Enhanced submit button */
.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5625rem;
    min-width: 200px;
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 300px;
}

.submit-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 98, 168, 0.25);
}

.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 98, 168, 0.25);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Custom captcha styling */
.captcha {
    margin-top: 1.875rem;
    margin-bottom: 1.875rem;
    background-color: #f1f3f5;
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #c8d6e5;
    width: 100%;
}

/* High contrast input for captcha */
#captchaInput {
    max-width: 200px;
    margin: 0.9375rem auto 0;
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.125rem;
    padding: 0.875rem 1rem;
    font-weight: 600;
}

/* Consent text */
.consent-text {
    font-size: 0.9375rem;
    color: var(--text-color);
    line-height: 1.5;
}

/* Error states */
.form-control.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.3125rem;
    display: block;
}

/* Enhanced Top Menu Styles */
.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    transition: all 0.3s ease;
}

.top-menu.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(1rem, 5vw, 2.5rem);
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.menu-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.menu-logo a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu-logo a:hover {
    color: var(--primary-dark);
}

.menu-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-items li {
    margin-left: 1.875rem;
}

.menu-items li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.menu-items li a:hover {
    color: var(--primary-color);
}

.menu-items li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.menu-items li a:hover::after {
    width: 100%;
}

.menu-cta {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 5px;
    transition: background-color 0.3s ease !important;
}

.menu-cta:hover {
    background-color: var(--primary-dark);
}

.menu-cta::after {
    display: none !important;
}

/* Enhanced Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Go-to-Top Button Styles */
.go-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.go-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.go-to-top:hover {
    background-color: var(--primary-dark);
}

/* Enhanced Media Queries for Better Responsiveness */

/* Large tablets and desktop */
@media (min-width: 1025px) {
    .content-wrapper {
        padding: 0 1.5rem;
    }

    .registration-form {
        padding: 2.5rem;
    }

    .speaker {
        max-width: calc(50% - 1.875rem); /* Better width distribution */
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .logo-section {
        padding: 15px 25px;
    }

    .menu-items li {
        margin-left: 1.25rem;
    }

    .speaker-bio {
        font-size: 0.875rem;
    }
}

/* Small tablets */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .menu-items {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1.25rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    .menu-items.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .menu-items li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .menu-items li a {
        display: block;
        padding: 0.9375rem;
        font-size: 1.125rem;
    }

    .menu-cta {
        margin: 0.625rem 1.25rem !important;
        display: inline-block;
    }

    .logo-section {
        padding: 12px 15px;
    }

    .logo-image {
        height: 55px;
    }

    .form-col {
        flex: 1 1 100%;
    }

    .checkbox-group,
    .radio-group {
        flex-direction: column;
        gap: 0;
    }

    .checkbox-item,
    .radio-item {
        width: 100%;
        min-width: 0;
        margin-bottom: 0.5rem; /* Reduced space between items on mobile */
    }

    .checkbox-item label,
    .radio-item label {
        font-size: 0.9375rem; /* Slightly smaller font on mobile */
        line-height: 1.4;
    }

    .submit-btn {
        width: 100%;
        max-width: none;
    }
}

/* Large phones */
@media (max-width: 580px) {
    .flyer {
        margin-top: 60px !important;
    }

    .menu-container {
        height: 60px;
    }

    .menu-items {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .menu-logo {
        font-size: 1.125rem;
    }

    .logo-section {
        padding: 10px 12px;
    }

    .logo-image {
        height: 45px;
    }

    .go-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .detail-box {
        flex: 1 1 100%;
    }

    .quote {
        padding: 1rem 1.25rem 1rem 1rem;
        border-left-width: 4px;
    }
}

/* Phones */
@media (max-width: 480px) {
    .menu-container {
        padding: 0 1rem;
        height: 55px;
    }

    .flyer {
        margin-top: 55px !important;
    }

    .logo-section {
        padding: 10px;
    }

    .logo-image {
        height: 40px;
    }

    .main-content {
        padding: 15px 4%;
    }

    .speaker-photo {
        height: 180px;
    }

    .divider {
        margin: 30px 0;
    }

    .about-series {
        padding: 1rem;
    }

    .why-sensitivity ul {
        padding-left: 1.25rem;
    }

    .checkbox-item label:before,
    .radio-item label:before {
        width: 1.25rem;
        height: 1.25rem;
    }

    .checkbox-item input:checked + label:after {
        left: 0.45rem;
        top: 0.2rem;
        width: 0.3rem;
        height: 0.65rem;
    }

    .radio-item input:checked + label:after {
        left: 0.375rem;
        top: 0.5rem;
        width: 0.65rem;
        height: 0.65rem;
    }

    .captcha {
        padding: 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .detail-box {
        padding: 0.875rem 1.25rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
        margin-top: 2.5rem;
    }

    .section-header h2 {
        font-size: clamp(1.25rem, 4vw, 1.625rem);
    }
}

/* Very small phones */
@media (max-width: 375px) {
    .menu-container {
        height: 50px;
        padding: 0 0.75rem;
    }

    .flyer {
        margin-top: 50px !important;
    }

    .menu-logo {
        font-size: 1rem;
    }

    .logo-section {
        padding: 8px;
        min-width: 90px;
    }

    .logo-image {
        height: 35px;
    }

    .menu-toggle {
        width: 24px;
        height: 18px;
    }

    .menu-items {
        top: 50px;
        height: calc(100vh - 50px);
    }

    .event-title {
        margin: 1.5rem 0;
    }

    .detail-box h3 {
        font-size: 1rem;
    }

    .detail-box p {
        font-size: 0.875rem;
    }

    .speaker-photo {
        height: 160px;
    }

    .quote p {
        font-size: 0.9375rem;
    }

    .go-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .captcha {
        padding: 0.875rem;
    }

    #captchaBox {
        font-size: 16px !important;
        padding: 8px !important;
    }

    #captchaInput {
        max-width: 170px;
    }

    .checkbox-item label,
    .radio-item label {
        padding-left: 1.875rem;
        font-size: 0.875rem;
    }

    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Ensure minimum width support for very small devices */
@media (max-width: 320px) {
    .header-container {
        min-width: 320px;
        overflow-x: auto;
    }

    .logo-section {
        padding: 5px;
        min-width: 70px;
    }

    .logo-image {
        height: 30px;
    }

    .menu-logo {
        font-size: 0.9375rem;
    }

    .menu-toggle {
        width: 22px;
        height: 16px;
    }

    .tab-label {
        padding: 6px 10px;
        font-size: 0.875rem;
    }

    .speaker-name {
        font-size: 1.125rem;
    }

    .speaker-title {
        font-size: 0.875rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
    }

    .form-group label {
        font-size: 0.9375rem;
    }

    .checkbox-item,
    .radio-item {
        margin-bottom: 0.4375rem;
    }

    .submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        margin-top: 1.25rem;
    }
}

/* Animation for mobile menu toggle */
@media (max-width: 768px) {
    .menu-items.active + .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-items.active + .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-items.active + .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Print styles - optimize for printed output */
@media print {
    .top-menu,
    .go-to-top,
    .submit-btn,
    .menu-toggle,
    .captcha,
    .registration-form {
        display: none !important;
    }

    .flyer {
        margin-top: 0 !important;
        box-shadow: none;
    }

    body {
        background-color: white;
        color: black;
        font-size: 12pt;
    }

    .site-header {
        background-color: white !important;
        box-shadow: none;
    }

    .divider {
        border-top: 1px solid #ddd;
        background: none;
        height: 1px;
    }

    a {
        text-decoration: none;
        color: black;
    }

    .speaker,
    .about-series,
    .call-to-action,
    .detail-box {
        break-inside: avoid;
        page-break-inside: avoid;
        background-color: white !important;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .quote {
        border-left: 3px solid #999;
        background: none;
    }

    .footer {
        background-color: white;
        color: black;
        border-top: 1px solid #ddd;
    }
}

/* Error message styling */
.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.3125rem;
    display: block;
    transition: all 0.3s ease;
}

/* Success message styling for form submission */
.success-message {
    text-align: center;
    padding: 2rem;
    background-color: #f0f9ff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.success-message h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-message p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.success-message svg {
    margin-bottom: 1.25rem;
}

/* Mobile-specific styles for checkbox and radio items */
@media (max-width: 768px) {
    /* Reset checkbox and radio groups to vertical layout */
    .checkbox-group,
    .radio-group {
        flex-direction: column;
        gap: 0;
        margin-top: 0.5rem;
    }

    /* Reduce spacing between items */
    .checkbox-item,
    .radio-item {
        width: 100%;
        min-width: 0;
        margin-bottom: 0.375rem !important; /* Force smaller margin */
        padding-bottom: 0.375rem !important;
    }

    /* Smaller text for better fit */
    .checkbox-item label,
    .radio-item label {
        font-size: 0.9375rem;
        line-height: 1.4;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Make sure the checkboxes aren't too far from text */
    .checkbox-item label:before,
    .radio-item label:before {
        top: 0;
    }

    /* Ensure parent container doesn't add extra spacing */
    .form-group .checkbox-group,
    .form-group .radio-group {
        margin-bottom: 0;
    }

    /* Remove any potential flex growth/shrink issues */
    .checkbox-item,
    .radio-item {
        flex: 0 0 auto;
    }
}

/* Responsive sizing for different screens */
@media (max-width: 480px) {
    .speaker-photo .profile-circle {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 375px) {
    .speaker-photo .profile-circle {
        width: 150px;
        height: 150px;
    }
}

/* Image styling */
.speaker-photo .profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Use cover for most photos */
}

/* For specific images that need contain */
.speaker-photo .profile-circle.contain-image img {
    object-fit: contain;
}