/* Custom CSS for Deans of Admissions Website */

/* Scroll offset for sticky navbar — desktop only (h-24 = 6rem = 96px) */
@media (min-width: 768px) {
    #about {
        scroll-margin-top: 6rem;
    }
}

/* Custom Fonts */
@font-face {
    font-family: 'the-seasons';
    src: url('fonts/The%20Seasons%20Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'the-seasons';
    src: url('fonts/The%20Seasons%20Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'the-seasons';
    src: url('fonts/The%20Seasons%20Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Crimson Pro';
    src: url('fonts/Crimson_Pro/static/CrimsonPro-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Crimson Pro';
    src: url('fonts/Crimson_Pro/static/CrimsonPro-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Crimson Pro';
    src: url('fonts/Crimson_Pro/static/CrimsonPro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Smooth scrolling and animations */
html {
    scroll-behavior: smooth;
    overscroll-behavior-y: none;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Custom gradient background */
.gradient-bg {
    background: radial-gradient(circle at 0% 0%, #470910, #000000);
}

/* Navigation transitions */
.nav-transition {
    transition: transform 0.3s ease-in-out, background-color 0.4s ease-in-out;
}

/* Navbar text color transitions */
.navbar-text {
    transition: color 0.4s ease-in-out;
}

/* Typography */
.hero-logo {
    font-family: 'the-seasons', serif;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.section-heading {
    font-family: 'the-seasons', serif;
    font-weight: 300;
}

.body-text {
    font-family: 'EB Garamond', Garamond, serif;
    font-weight: 400;
}

.nav-link {
    font-family: 'the-seasons', serif;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Form styling */
.form-overlay {
    background-color: rgba(74, 7, 12, 0.95);
    backdrop-filter: blur(10px);
}

/* News cards */
.news-card {
    background-color: #4a070c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-card:hover {
    transform: translateY(-14px);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}

.news-card a {
    font-size: 1.25rem !important;
    text-decoration: underline !important;
    padding: 12px 16px !important;
    margin: -12px -16px !important;
    display: inline-block !important;
}

/* Classical building fade effect */
.classical-building-fade {
    mask-image: linear-gradient(to left, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* Classical building - only scale up on large monitors */
.classical-building-scale {
    transform: scale(1);
}

@media (min-width: 1536px) {
    .classical-building-scale {
        transform: scale(1.15);
    }
}

/* Smooth scrolling offset for sticky header */
section {
    scroll-margin-top: 80px;
}

/* Extend mission gradient above the section so no bare background shows
   after the hero is removed on mobile */
section#mission::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(circle at 0% 0%, #470910, #4a070c);
    z-index: -1;
}

/* Remove scroll offset for main content sections (navbar offset handled in JS) */
section#mission,
section#about,
section#news,
section#contact {
    scroll-margin-top: 0 !important;
}

/* Extend about section cream background up behind the navbar to prevent gap */
section#about::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    right: 0;
    height: 100px;
    background-color: #fdf7e5;
    z-index: -1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #4a070c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #470910;
}

/* Form input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Button hover effects - exclude transparent text-link buttons */
button:hover:not(#contact-back-btn):not(#schedule-consultation-btn):not(.hs-button) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Back button styles to ensure clickability */
#contact-back-btn,
#calendar-back-btn {
    position: relative;
    z-index: 50;
    pointer-events: auto;
    padding: 8px 16px;
}

/* Responsive typography */
@media (max-width: 640px) {
    .hero-logo {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .section-heading {
        font-size: 2rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-logo {
        font-size: 3.5rem;
        line-height: 1.1;
    }
    
    .section-heading {
        font-size: 2.5rem;
    }
}

@media (min-width: 769px) {
    .hero-logo {
        font-size: 4rem;
        line-height: 1.1;
    }

    .section-heading {
        font-size: 3rem;
    }
}

/* Mission section responsive adjustments */
@media (max-width: 480px) {
    #mission .body-text {
        font-size: 0.875rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #mission .body-text {
        font-size: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #mission .body-text {
        font-size: 1.125rem;
        max-width: 600px;
    }
}

/* Loading states and transitions */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #4a070c;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .fixed {
        position: static !important;
    }
    
    .gradient-bg {
        background: #000000 !important;
    }
    
    .form-overlay {
        background-color: #4a070c !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .news-card {
        border: 2px solid #ffffff;
    }
    
    .form-overlay {
        background-color: #4a070c;
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Additional utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Image placeholder styles */
.placeholder-image {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* HubSpot Form Styling - Match Original Design */
.form-holder {
    width: 100%;
}

.form-holder .hbspt-form {
    width: 100%;
}

.form-holder .hs-form {
    width: 100% !important;
    max-width: 100% !important;
    font-family: 'Crimson Pro', sans-serif !important;
}

.form-holder .hs-form fieldset {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.form-holder .hs-form .hs-form-field {
    width: 100%;
    margin-bottom: 1.5rem !important;
}

.form-holder .hs-form .hs-input {
    width: 100% !important;
}

/* Two-column layout for 2x2 grid - IMPROVED */
.form-holder .form-columns-2 {
    display: grid !important;
    grid-template-columns: 284px 284px !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin: 0 0 1.5rem 0 !important;
    justify-content: space-between !important;
}

.form-holder .form-columns-2 .hs-form-field {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.form-holder .form-columns-2 .hs-form-field label {
    text-align: left !important;
    width: 100% !important;
}

.form-holder .form-columns-2 .hs-form-field .hs-input,
.form-holder .form-columns-2 .hs-form-field input,
.form-holder .form-columns-2 .hs-form-field select,
.form-holder .form-columns-2 .hs-form-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Centered graduation year field - IMPROVED */
.form-holder .form-centered {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 284px !important;
    max-width: 284px !important;
    gap: 0.5rem !important;
    margin: 0 !important;
    top: calc(100% - 20px) !important;
}

.form-holder .form-centered label {
    text-align: center !important;
    display: block !important;
}

.form-holder .form-centered .hs-input,
.form-holder .form-centered input,
.form-holder .form-centered select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Target graduation year specifically by field class */
.form-holder .hs-high_school_graduation_year,
.form-holder .hs_high_school_graduation_year {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 284px !important;
    max-width: 284px !important;
    margin: 0 auto 1.5rem auto !important;
}

.form-holder .hs-high_school_graduation_year label,
.form-holder .hs_high_school_graduation_year label {
    text-align: center !important;
    width: 100% !important;
}

.form-holder .hs-high_school_graduation_year .hs-input,
.form-holder .hs-high_school_graduation_year select,
.form-holder .hs_high_school_graduation_year .hs-input,
.form-holder .hs_high_school_graduation_year select {
    width: 284px !important;
    max-width: 284px !important;
    min-width: 284px !important;
    padding: 0.75rem 1rem !important;
    background-color: #fdf7e5 !important;
    color: #4a070c !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: 'Crimson Pro', sans-serif !important;
    font-size: 14px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.form-holder .hs-high_school_graduation_year select,
.form-holder .hs_high_school_graduation_year select {
    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='%234a070c' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 12px !important;
    padding-right: 2.5rem !important;
}

/* Responsive adjustments - IMPROVED */
@media (max-width: 640px) {
    .form-holder .form-columns-2 {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
    }

    .form-holder .form-centered {
        max-width: 100% !important;
        width: 100% !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    /* Graduation year field responsive */
    .form-holder .hs-high_school_graduation_year,
    .form-holder .hs_high_school_graduation_year {
        width: 100% !important;
        max-width: 100% !important;
        align-items: flex-start !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .form-holder .hs-high_school_graduation_year label,
    .form-holder .hs_high_school_graduation_year label {
        text-align: left !important;
    }

    .form-holder .hs-high_school_graduation_year .hs-input,
    .form-holder .hs-high_school_graduation_year select,
    .form-holder .hs_high_school_graduation_year .hs-input,
    .form-holder .hs_high_school_graduation_year select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0.75rem 1rem !important;
        background-color: #fdf7e5 !important;
        color: #4a070c !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        font-family: 'Crimson Pro', sans-serif !important;
        font-size: 14px !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }

    .form-holder .hs-high_school_graduation_year select,
    .form-holder .hs_high_school_graduation_year select {
        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='%234a070c' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 1rem center !important;
        background-size: 12px !important;
        padding-right: 2.5rem !important;
    }
}

/* Message field spacing */
.form-holder .hs-form-field:not(.form-centered) {
    margin-bottom: 2rem !important;
}

/* Reserve space for error messages to prevent layout shift */
.form-holder .hs-form-field .input {
    margin-bottom: 20px !important;
    position: relative !important;
}

.form-holder .hs-form-field .hs-error-msgs {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.form-holder .hs-form-field .input {
    padding-bottom: 0 !important;
}

.form-holder .hs-error-msgs label {
    margin: 0 !important;
    font-size: 12px !important;
    color: #fdf7e5 !important;
}

/* Target individual error message */
.form-holder .hs-error-msg {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    color: #fdf7e5 !important;
    line-height: 1.2 !important;
}

/* Specific fix for 2x2 grid error messages */
.form-holder .form-columns-2 .hs-form-field .hs-error-msgs {
    position: absolute !important;
    top: calc(100% - 16px) !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.form-holder .form-columns-2 .hs-form-field .input {
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
}

/* Make field wrappers position relative for absolute error positioning */
.form-holder .hs-form-field {
    position: relative !important;
}

/* Labels */
#hubspot-form-container .hs-form label {
    display: block !important;
    color: #fdf7e5 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    font-family: 'Crimson Pro', sans-serif !important;
}

#hubspot-form-container .hs-form label .hs-form-required {
    color: #fdf7e5 !important;
}

/* Input fields */
#hubspot-form-container .hs-form .hs-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    background-color: #fdf7e5 !important;
    color: #4a070c !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: 'Crimson Pro', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

#hubspot-form-container .hs-form input[type="text"],
#hubspot-form-container .hs-form input[type="email"],
#hubspot-form-container .hs-form input[type="tel"],
#hubspot-form-container .hs-form select,
#hubspot-form-container .hs-form textarea {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    background-color: #fdf7e5 !important;
    color: #4a070c !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: 'Crimson Pro', sans-serif !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Specific styling for select/dropdown fields */
#hubspot-form-container .hs-form select {
    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='%234a070c' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 12px !important;
    padding-right: 2.5rem !important;
}

/* Focus states */
#hubspot-form-container .hs-form .hs-input:focus,
#hubspot-form-container .hs-form input[type="text"]:focus,
#hubspot-form-container .hs-form input[type="email"]:focus,
#hubspot-form-container .hs-form input[type="tel"]:focus,
#hubspot-form-container .hs-form select:focus,
#hubspot-form-container .hs-form textarea:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) !important;
    border: none !important;
}

/* Textarea specific */
#hubspot-form-container .hs-form textarea {
    resize: vertical !important;
    min-height: 144px !important;
}

/* Submit button container */
#hubspot-form-container .hs-form .hs-submit {
    text-align: center !important;
    margin-top: 1.5rem !important;
}

/* Submit button */
#hubspot-form-container .hs-form .hs-button {
    color: #fdf7e5 !important;
    background: transparent !important;
    border: none !important;
    font-size: 1.125rem !important;
    font-weight: 300 !important;
    text-decoration: underline !important;
    font-family: 'the-seasons', serif !important;
    padding: 0.5rem 1rem !important;
    cursor: pointer !important;
    transition: color 0.3s ease !important;
    box-shadow: none !important;
}

#hubspot-form-container .hs-form .hs-button:hover {
    color: #d1d1d1 !important;
    background: transparent !important;
}

/* Error messages - positioned absolutely to prevent layout shift */
#hubspot-form-container .hs-form .hs-error-msgs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
}

#hubspot-form-container .hs-form .hs-error-msg {
    color: #fdf7e5 !important;
    font-size: 12px !important;
    margin: 0 !important;
}

/* Ensure form fields have relative positioning for absolute error messages */
#hubspot-form-container .hs-form .hs-form-field {
    position: relative !important;
    margin-bottom: 1.5rem !important;
}

#hubspot-form-container .hs-form .hs-form-field .input {
    position: relative !important;
}

/* Remove HubSpot default field wrapper styling */
#hubspot-form-container .hs-form .hs-fieldtype-text,
#hubspot-form-container .hs-form .hs-fieldtype-textarea,
#hubspot-form-container .hs-form .hs-fieldtype-select {
    width: 100% !important;
}

/* Fix layout shifting */
#hubspot-form-container .hs-form .hs-input,
#hubspot-form-container .hs-form .input {
    height: auto !important;
    min-height: 48px !important;
}

/* Remove any HubSpot injected styles that might cause shifting */
#hubspot-form-container .hs-form .hs-form-field > div {
    width: 100% !important;
}

/* Hide HubSpot success message and loading states - we handle navigation ourselves */
#hubspot-form-container .hs-form .submitted-message,
#hubspot-form-container .submitted-message,
.hs-form-thankyou-text {
    display: none !important;
}

/* Keep form visible after submission during transition */
#hubspot-form-container .hs-form {
    display: block !important;
}

/* Navigation color states */
.nav-text {
    color: #8B2635; /* dark-red default */
    transition: color 0.3s ease;
}

.nav-text:hover {
    opacity: 0.7;
}

/* Mission and Contact sections - cream text */
.nav-cream .nav-text {
    color: #F5E6D3; /* cream */
}

/* About section - dark red text */
.nav-dark .nav-text {
    color: #8B2635; /* dark-red */
}

/* Mobile: use svh so hero matches the visible viewport, not the larger
   100vh that includes the URL bar area. Prevents scroll over-shoot. */
@media (max-width: 767px) {
    #home {
        min-height: 100svh;
    }
}

/* Hero logo initial state */
#home img {
    transform: scale(0.001);
    transition: transform 0.6s ease-out;
    opacity: 0;
}


/* Prevent elements from showing before animations start */
[data-anime] {
    opacity: 0;
}

[data-anime].animate-fade-in {
    opacity: 1;
}

/* Multi-Step Wizard Styles */
.wizard-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wizard-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out, transform 0.8s ease-in-out;
    pointer-events: none;
}

.wizard-step.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Ensure both steps have the same structure and sizing */
.wizard-step .form-overlay {
    width: 100%;
}

/* Calendar holder styling - match the form dimensions */
.calendar-holder {
    width: 100%;
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.calendar-holder .meetings-iframe-container {
    width: 100% !important;
    min-height: 950px !important;
    overflow: hidden !important;
}

.calendar-holder .meetings-iframe-container iframe {
    width: 100% !important;
    min-height: 950px !important;
    border: none !important;
    background: transparent !important;
}

/* Hide any scrollbar on the calendar embed containers */
#calendar-container {
    overflow: hidden;
}

/* Form holder - remove excessive height */
.form-holder {
    width: 100%;
}

/* Ensure Step 2 takes up the same space as Step 1 */
#step-2 {
    min-height: 100%;
    overflow: hidden;
}


/* Contact Section Split Screen Layout */
.contact-split-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* When burgundy is expanded, container grows to fit content */
.contact-burgundy-side.expanded ~ .contact-split-container,
.contact-split-container:has(.contact-burgundy-side.expanded) {
    height: auto;
}

/* Allow section to show expanded content */
#contact:has(.contact-burgundy-side.expanded) {
    overflow: visible !important;
}

.contact-image-side {
    z-index: 1;
}

.contact-burgundy-side {
    z-index: 2;
    /* Use left position for the slide animation - starts at 50% (right half) */
    left: 50%;
    right: 0;
    width: auto;
    height: 100vh;
    min-height: 100vh;
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* When expanded - slide left edge from 50% to 0% and change to column layout */
.contact-burgundy-side.expanded {
    left: 0 !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    overflow: visible;
}

/* Initial content when expanded - move to top and fade out button */
.contact-burgundy-side.expanded .contact-initial-content {
    position: relative;
    padding-bottom: 40px;
    padding-top: 80px;
    max-width: 100%;
    width: 100%;
}

/* Fade out the button when expanded since user already clicked it */
.contact-burgundy-side.expanded .contact-initial-content button {
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

/* Form content in expanded state - become part of flow */
.contact-burgundy-side.expanded .contact-form-content {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    min-height: auto;
    flex-shrink: 0;
    padding-top: 0;
    padding-bottom: 20px;
}

/* Hide duplicate heading/text in form view since initial view has it */
.contact-burgundy-side.expanded .form-overlay h2,
.contact-burgundy-side.expanded .form-overlay .body-text {
    display: none;
}

/* Adjust form overlay padding since we removed the heading */
.contact-burgundy-side.expanded .form-overlay {
    padding-top: 0 !important;
}

/* Footer in expanded state - part of flow, not absolute */
.contact-burgundy-side.expanded .contact-footer-inside {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    flex-shrink: 0;
}

/* Initial content styling */
.contact-initial-content {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    position: relative;
    z-index: 10;
    padding-bottom: 280px;
}

/* Smooth text transitions for step changes */
#contact-text-step1,
#contact-text-step2 {
    transition: opacity 0.4s ease-out;
}

@media (min-width: 768px) {
    .contact-initial-content {
        padding-bottom: 220px;
    }
}

.contact-initial-content.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Form content styling - starts hidden, JS sets display:flex before animating */
.contact-form-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
    pointer-events: none;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
    padding-bottom: 40px;
}

.contact-form-content.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Override form-overlay background when in split view */
.contact-burgundy-side .form-overlay {
    background-color: transparent;
    backdrop-filter: none;
}

/* Footer inside burgundy side - positioned at bottom */
.contact-footer-inside {
    z-index: 20;
    pointer-events: auto;
    transition: all 0.4s ease-in-out;
}

/* Footer section - static at bottom */
.contact-footer-section {
    width: 100%;
}

/* Mobile responsive - stack vertically on small screens */
@media (max-width: 768px) {
    .contact-split-container {
        min-height: auto !important;
    }

    .contact-image-side {
        display: none !important;
    }

    .contact-burgundy-side {
        position: relative !important;
        left: 0 !important;
        height: auto !important;
        min-height: auto !important;
        padding: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    #contact {
        background-color: #4a070c;
    }

    .contact-initial-content {
        padding: 40px 20px 20px !important;
        text-align: center !important;
    }

    .contact-initial-content .section-heading,
    .contact-initial-content .body-text {
        text-align: center !important;
    }

    /* Footer flows after content on mobile instead of absolute bottom */
    .contact-footer-inside {
        position: relative !important;
        bottom: auto !important;
        padding-top: 3rem !important;
        padding-bottom: 1.5rem !important;
    }

    .contact-form-content {
        padding-top: 40px;
    }

    /* Mobile: Left-justify text in About/News sections (Mission stays centered, Contact stays centered) */
    #about .section-heading,
    #about .body-text,
    #about .text-center,
    #news .section-heading,
    #news .body-text,
    #news .text-center {
        text-align: left !important;
    }

    /* Mobile: Center the library image */
    .library-image-container {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Mobile: Remove extra padding on Our Clients text so it aligns with other section text */
    #about .body-text.px-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Mobile: Footer spacing */
    .contact-footer-inside {
        padding-top: 2.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    #hubspot-form-container .hs-form .hs-submit {
        margin-bottom: 2rem !important;
    }
}


