/* Contact Enhanced Styling */

/* Disable old contact mobile navigation when new system is present */
.contact-mobile-hamburger,
.contact-mobile-toggle {
    display: none !important;
}

/* Fix hamburger menu z-index specifically for contact page */
.site-header .hamburger {
    z-index: 9999 !important;
    position: relative !important;
    pointer-events: all !important;
}

/* Ensure site header doesn't block hamburger */
.site-header {
    z-index: 1002 !important;
    position: sticky !important;
}

/* CSS-only mobile navigation for contact page */

/* Hide checkbox input */
.contact-mobile-toggle {
    display: none;
}

/* Desktop navigation - hide on mobile */
@media (max-width: 768px) {
    .contact-page .desktop-only {
        display: none !important;
    }
}

/* Mobile navigation styles */
@media (max-width: 768px) {
    /* Mobile hamburger button - exact match to standard hamburger styles */
    .contact-mobile-hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 12px;
        min-width: 44px;
        min-height: 44px;
        z-index: 1003;
        position: relative;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: background-color 0.3s ease;
        background: transparent;
        border: none;
    }
    
    .contact-mobile-hamburger:hover {
        background-color: rgba(31, 42, 54, 0.1);
    }
    
    .contact-mobile-hamburger:focus {
        outline: 2px solid var(--color-accent, #CC6B5C);
        outline-offset: 2px;
    }
    
    /* Hamburger lines - exact match to standard styles */
    .contact-mobile-hamburger span {
        width: 28px;
        height: 3px;
        background-color: var(--graphite-navy, #1F2A36);
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
        display: block;
    }
    
    /* Hamburger animation when active - exact match to standard animation */
    .contact-mobile-toggle:checked + .contact-mobile-hamburger span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .contact-mobile-toggle:checked + .contact-mobile-hamburger span:nth-child(2) {
        opacity: 0;
    }
    
    .contact-mobile-toggle:checked + .contact-mobile-hamburger span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Mobile navigation overlay - exact match to standard mobile menu */
    .contact-mobile-nav {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #1F2A36;
        transition: right 0.3s ease;
        z-index: 1010;
        align-items: center;
        justify-content: center;
    }
    
    /* Show navigation when checkbox is checked - exact match to .active behavior */
    .contact-mobile-toggle:checked ~ .contact-mobile-nav {
        display: flex;
        right: 0;
        visibility: visible;
        background-color: #1F2A36;
    }
    
    /* Navigation list styling - exact match to standard mobile menu */
    .contact-mobile-nav ul {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 2rem;
        width: 100%;
        list-style: none;
        margin: 0;
    }
    
    .contact-mobile-nav li {
        width: 100%;
    }
    
    .contact-mobile-nav a {
        font-size: 1.25rem;
        padding: 1.5rem 2rem;
        color: #FFFFFF;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 4px;
        transition: all 0.3s ease;
        text-decoration: none;
    }
    
    .contact-mobile-nav a:hover,
    .contact-mobile-nav a:active {
        color: #CC6B5C;
        text-shadow: 0 0 6px rgba(221, 221, 221, 0.4);
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .contact-mobile-nav a.active-page {
        color: #CC6B5C !important;
        font-weight: 600;
    }
    
    .contact-mobile-nav a.btn-mobile {
        display: inline-block;
        min-width: 200px;
        min-height: 44px;
        margin: 0.75rem 0;
        padding: 1rem 1.5rem;
        background: #D4806F;
        color: #FFFFFF;
        border: 2px solid #D4806F;
        border-radius: 4px;
        font-weight: 600;
        line-height: 1.2;
        font-size: 1.25rem;
        transition: all 0.3s ease;
        box-sizing: border-box;
    }
    
    .contact-mobile-nav a.btn-mobile:hover {
        background: #CC6B5C;
        color: #FFFFFF;
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(204, 107, 92, 0.4);
    }
    
    /* Outline button for second CTA - exact match to standard mobile menu */
    .contact-mobile-nav a.btn-mobile-outline {
        display: inline-block;
        min-width: 200px;
        min-height: 44px;
        margin: 0.75rem 0;
        padding: 1rem 1.5rem;
        background: transparent;
        color: #FFFFFF;
        border: 2px solid #CC6B5C;
        border-radius: 4px;
        font-weight: 600;
        line-height: 1.2;
        font-size: 1.25rem;
        transition: all 0.3s ease;
        box-sizing: border-box;
    }
    
    .contact-mobile-nav a.btn-mobile-outline:hover {
        background: #CC6B5C;
        color: #FFFFFF;
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(204, 107, 92, 0.4);
    }
}

/* Desktop styles - show desktop nav, hide mobile nav */
@media (min-width: 769px) {
    .contact-mobile-hamburger,
    .contact-mobile-nav {
        display: none !important;
    }
    
    .contact-page .desktop-only {
        display: flex !important;
    }
}

/* Fade-up animation for desktop only */
@media (min-width: 768px) {
    .fade-up-element {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .fade-up-element.fade-up-element--animated {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main contact section */
.contact-main-section {
    padding: 3rem 0;
    background: #fafafa;
}

/* Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Form Primary Section */
.form-primary {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Hover effects for desktop/tablet only */
@media (min-width: 768px) {
    .form-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }
    
    .form-primary:hover .form-header {
        border-bottom-color: #b85a4a;
    }
    
    .form-primary:hover .form-intro,
    .form-primary:hover .form-footer {
        border-left-color: #b85a4a;
    }
    
    .form-primary:hover .tally-form-wrapper {
        border-left-color: #b85a4a;
        border-right-color: #b85a4a;
    }
}

.form-header {
    padding: 2.5rem 2.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 3px solid #CC6B5C;
}

.form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--graphite-navy);
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Trust Signals */
.trust-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
}

.trust-item svg {
    flex-shrink: 0;
}

/* Branded Form Container */
.branded-form-container {
    padding: 0;
}

.form-intro {
    padding: 2rem 2.5rem 1.5rem;
    background: linear-gradient(135deg, #fff5f3 0%, #ffffff 100%);
    border-left: 4px solid #CC6B5C;
}

.form-intro h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--graphite-navy);
    margin-bottom: 0.5rem;
}

.form-intro p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Tally Form Wrapper */
.tally-form-wrapper {
    padding: 0 2.5rem;
    border-left: 4px solid #CC6B5C;
    border-right: 4px solid #CC6B5C;
    background: white;
}

.tally-form-wrapper iframe {
    border-radius: 8px;
    min-height: 600px;
}

/* Form Footer */
.form-footer {
    padding: 1.5rem 2.5rem 2.5rem;
    background: linear-gradient(135deg, #fff5f3 0%, #ffffff 100%);
    border-left: 4px solid #CC6B5C;
    border-top: 1px solid #f0f0f0;
}

.form-footer p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Contact Sidebar */
.contact-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 2rem;
    transition: all 0.3s ease;
}

/* Sidebar hover effects for desktop/tablet only */
@media (min-width: 768px) {
    .contact-sidebar:hover {
        transform: scale(1.02);
        background: linear-gradient(135deg, #fff9f8 0%, #ffffff 100%);
        box-shadow: 0 6px 25px rgba(221, 221, 221, 0.15);
    }
    
    .contact-sidebar:hover .sidebar-header {
        border-bottom-color: #CC6B5C;
    }
    
    .contact-sidebar:hover .sidebar-cta {
        border-top-color: #CC6B5C;
    }
    
    .contact-sidebar:hover .contact-icon {
        border-color: #b85a4a;
        background: linear-gradient(135deg, #fff0ed 0%, #f8f9fa 100%);
    }
}

.sidebar-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--graphite-navy);
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Contact Options */
.contact-options {
    padding: 1.5rem 2rem;
}

.contact-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.contact-option:last-child {
    border-bottom: none;
}

.contact-option:hover {
    background: #fff5f3;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 8px;
}

.contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fff5f3 0%, #f8f9fa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #CC6B5C;
}

.contact-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--graphite-navy);
    margin-bottom: 0.3rem;
}

.contact-details p {
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.contact-details p a {
    color: #CC6B5C;
    text-decoration: none;
    font-weight: 600;
}

.contact-details p a:hover {
    text-decoration: underline;
}

.contact-details span {
    font-size: 0.9rem;
    color: #777;
}

/* Sidebar CTA */
.sidebar-cta {
    padding: 1.5rem 2rem 2rem;
    border-top: 2px solid #f0f0f0;
}

.sidebar-cta .btn {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1.5rem;
}

/* Section Separator */
.section-separator {
    height: 3px;
    background: linear-gradient(90deg, #CC6B5C 0%, #d4a59a 50%, #CC6B5C 100%);
    margin: 2rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* Reduced from 2rem */
    }
    
    .contact-main-section {
        padding: 1.5rem 0; /* Reduced from 2rem */
    }
    
    .form-header {
        padding: 1.5rem 1.5rem 1rem; /* Reduced top/bottom padding */
    }
    
    .form-header h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem; /* Reduced from default */
    }
    
    .form-header p {
        font-size: 1rem;
        line-height: 1.4; /* Tighter line height for mobile */
    }
    
    /* Compact horizontal trust signals with icons */
    .trust-signals {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.8rem !important;
        margin-top: 1rem !important;
        flex-direction: unset !important;
    }
    
    .trust-item {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.8rem !important;
        background: #fff9f8 !important;
        border-radius: 8px !important;
        border-left: 3px solid #CC6B5C !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
    }
    
    .trust-item::before {
        content: "✓" !important;
        color: #CC6B5C !important;
        font-weight: bold !important;
        font-size: 1rem !important;
        flex-shrink: 0 !important;
    }
    
    .form-intro,
    .form-footer {
        padding: 1.2rem 1.5rem; /* Reduced from 1.5rem */
    }
    
    .form-footer {
        background: #fff9f8;
        border-top: 2px solid #CC6B5C;
    }
    
    .form-footer h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        color: #CC6B5C;
    }
    
    .form-footer p {
        font-size: 0.9rem;
        margin: 0;
    }
    
    .tally-form-wrapper {
        padding: 0 1.5rem;
    }
    
    /* Enhanced visual separation between sections */
    .section-separator {
        height: 4px;
        margin: 1.5rem 0;
        background: linear-gradient(90deg, #CC6B5C 0%, #f0f0f0 50%, #CC6B5C 100%);
    }
    
    .sidebar-header,
    .contact-options,
    .sidebar-cta {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .sidebar-header {
        background: #f8f9fa;
        border-bottom: 2px solid #CC6B5C;
        padding-top: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .sidebar-header h3 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }
    
    .sidebar-header p {
        font-size: 0.9rem;
        margin: 0;
        color: #666;
    }
    
    .contact-sidebar {
        position: static;
        margin-top: 1rem;
        border: 2px solid #CC6B5C;
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* Remove hover effects on mobile and improve touch targets */
    .contact-option {
        padding: 1.5rem 1.5rem !important; /* Larger touch targets */
        border-bottom: 1px solid #f0f0f0 !important;
        transition: none !important; /* Remove transitions on mobile */
    }
    
    .contact-option:hover {
        background: transparent !important; /* Remove hover background */
        margin: 0 !important; /* Reset hover margins */
        padding: 1.5rem 1.5rem !important; /* Maintain consistent padding */
        border-radius: 0 !important; /* Reset border radius */
    }
    
    .contact-icon {
        width: 48px; /* Larger for better touch */
        height: 48px;
        border-width: 3px; /* Thicker border for mobile */
    }
    
    .contact-icon svg {
        width: 28px;
        height: 28px;
    }
    
    /* Enhanced mobile CTA */
    .sidebar-cta {
        background: linear-gradient(135deg, #CC6B5C 0%, #b85a4a 100%);
        padding: 2rem 1.5rem;
        text-align: center;
    }
    
    .sidebar-cta .btn {
        width: 100%;
        background: white;
        color: #CC6B5C;
        border: 3px solid white;
        font-size: 1.1rem;
        font-weight: 700;
        padding: 1rem 1.5rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-cta .btn:hover {
        background: #fff9f8;
        transform: none; /* Remove transform on mobile */
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    /* Single column trust signals on small phones */
    .trust-signals {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .trust-item {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
    
    .contact-option {
        gap: 0.8rem;
        padding: 1.2rem 1.5rem; /* Slightly reduced for small screens */
    }
    
    .contact-icon {
        width: 42px; /* Slightly smaller but still touch-friendly */
        height: 42px;
    }
    
    .contact-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .sidebar-cta .btn {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
    
    /* More compact spacing on very small screens */
    .form-header {
        padding: 1.2rem 1.5rem 0.8rem;
    }
    
    .form-intro,
    .form-footer {
        padding: 1rem 1.5rem;
    }
    
    .sidebar-cta {
        padding: 1.5rem 1.5rem;
    }
    
    /* Mobile-specific messaging */
    .desktop-copy {
        display: none !important;
    }
    
    .mobile-copy {
        display: block !important;
        font-weight: 600 !important;
        color: #CC6B5C !important;
    }
    
    /* Progressive disclosure toggle (mobile only) */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1rem;
        margin-top: 1rem;
        background: linear-gradient(135deg, #CC6B5C 0%, #b85a4a 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-toggle:hover {
        background: linear-gradient(135deg, #b85a4a 0%, #a64d3a 100%);
        transform: translateY(-1px);
    }
    
    .toggle-arrow {
        transition: transform 0.3s ease;
    }
    
    .mobile-toggle.expanded .toggle-arrow {
        transform: rotate(180deg);
    }
    
    .mobile-toggle.expanded span {
        content: "Hide Contact Options";
    }
    
    /* Initially hide contact options on mobile */
    .contact-options {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .contact-options.expanded {
        max-height: 500px;
        padding-top: 1rem;
        padding-bottom: 0;
    }
    
    /* Swipe indicator for horizontal scrolling */
    .swipe-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
        color: #999;
        font-size: 0.85rem;
        background: #f8f9fa;
        border-radius: 0 0 12px 12px;
        border-top: 1px solid #e0e0e0;
    }
    
    .swipe-indicator svg {
        opacity: 0.6;
    }
    
    .swipe-indicator.hidden {
        display: none;
    }
}

/* Desktop/tablet styles that should be hidden on mobile */
@media (min-width: 769px) {
    .mobile-copy {
        display: none;
    }
    
    .desktop-copy {
        display: block;
    }
    
    .mobile-toggle {
        display: none;
    }
    
    .contact-options {
        max-height: none;
        overflow: visible;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .swipe-indicator {
        display: none;
    }
}

/* Additional mobile overrides with higher specificity */
@media (max-width: 768px) {
    /* Force mobile trust signals layout - single column for better visual balance */
    .form-header .trust-signals {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
        margin-top: 1rem !important;
        flex-direction: unset !important;
        justify-content: unset !important;
        flex-wrap: unset !important;
        margin-bottom: 1rem !important;
    }
    
    .form-header .trust-item {
        display: flex !important;
        align-items: center !important;
        gap: 0.7rem !important;
        padding: 1rem 1.2rem !important;
        background: linear-gradient(135deg, #fff9f8 0%, #fff5f3 100%) !important;
        border-radius: 10px !important;
        border-left: 4px solid #CC6B5C !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: var(--graphite-navy) !important;
        box-shadow: 0 2px 8px rgba(221, 221, 221, 0.1) !important;
    }
    
    .form-header .trust-item::before {
        content: "✓" !important;
        color: #CC6B5C !important;
        font-weight: bold !important;
        font-size: 1.2rem !important;
        flex-shrink: 0 !important;
        width: 24px !important;
        height: 24px !important;
        background: #CC6B5C !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        font-size: 14px !important;
        font-weight: bold !important;
    }
    
    /* Force mobile messaging */
    .form-header .desktop-copy,
    .form-intro .desktop-copy,
    .form-footer .desktop-copy,
    .sidebar-header .desktop-copy {
        display: none !important;
    }
    
    .form-header .mobile-copy,
    .form-intro .mobile-copy,
    .form-footer .mobile-copy,
    .sidebar-header .mobile-copy {
        display: block !important;
        font-weight: 600 !important;
        color: #CC6B5C !important;
    }
    
    /* Show mobile toggle button */
    .mobile-toggle {
        display: flex !important;
    }
    
    /* Redesigned mobile contact sidebar for better visual appeal */
    .contact-sidebar {
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        overflow: hidden !important;
    }
    
    .sidebar-header {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
        border-bottom: 1px solid #e0e0e0 !important;
        padding: 1.5rem !important;
    }
    
    .sidebar-header h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        color: var(--graphite-navy) !important;
    }
    
    .sidebar-header p {
        font-size: 0.85rem !important;
        color: #666 !important;
        margin: 0 !important;
    }
    
    /* Redesigned mobile toggle button */
    .mobile-toggle {
        background: #CC6B5C !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 0.8rem 1.2rem !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-top: 1rem !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        cursor: pointer !important;
    }
    
    /* Simplified mobile CTA section */
    .sidebar-cta {
        background: #f8f9fa !important;
        padding: 1.5rem !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    
    .sidebar-cta .btn {
        background: #CC6B5C !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        padding: 0.9rem 1.5rem !important;
        width: 100% !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        box-shadow: 0 2px 8px rgba(221, 221, 221, 0.2) !important;
    }
    
    .sidebar-cta .btn:hover {
        background: #b85a4a !important;
        transform: none !important;
    }
}