/* Contact Section Main Styles */
body{
    background: linear-gradient(to top, #ce362e 0%, #26274f 100%)
}

.contact-container {
    display: grid;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-section {
    padding: 120px 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 60px); /* Account for footer */
    animation: fadeIn 0.8s ease-out;
    background: whitesmoke;
}

/* Section Headers */
.contact-section h1 {
    font-size: 2.8rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.contact-section h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(450px, 80%);
    height: 3px;
    background: var(--accent-color); /* Changed to accent color (red) */
}

/* Intro text styling */
.contact-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* Contact Options Grid */
.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Contact Option Cards */
.option {
    background: var(--light-text); /* Changed to white from palette */
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-normal), 
                box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color)); /* Changed to brand colors */
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    transform-origin: left;
}

.option:hover::before {
    transform: scaleX(1);
}

.option:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Option Headers */
.option h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Option content */
.option p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* Contact Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-color); /* Changed to accent color (red) */
    color: var(--light-text);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all var(--transition-normal);
    border: 2px solid var(--accent-color); /* Changed to accent color (red) */
}

.btn:hover {
    background: transparent;
    color: var(--accent-color); /* Changed to accent color (red) */
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(228, 42, 36, 0.3); /* Changed to accent color shadow */
}

/* Meet Us Section */
.meet-us {
    margin: 3rem 0;
}

/* Location details styling */
.location-details {
    margin: 1.5rem 0;
    font-style: normal;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Map Container */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--medium-gray); /* Added border with medium gray */
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

/* Map loading state */
.map-container::before {
    content: 'Loading map...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.map-container.loading::before {
    opacity: 1;
}

/* Response time section */
.response-time {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem;
    background: rgba(46, 45, 136, 0.1); /* Changed to primary color with opacity */
    border-radius: 8px;
    border: 1px solid rgba(46, 45, 136, 0.2); /* Added subtle border */
}

.response-time p {
    color: var(--text-color);
    font-size: 1rem;
}

/* Tabs Styling */
.tabs-container {
    margin: 1rem 0;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.7rem 1.5rem;
    background: var(--light-text);
    color: var(--text-color);
    border: 1px solid var(--medium-gray);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    background: rgba(46, 45, 136, 0.1);
}

/* Segmented Tabs Styling (like the second image) */
.segmented-tabs {
    display: flex;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    max-width: 500px;
    margin: 1.5rem auto;
    background: #f5f5f5;
}

.segmented-tabs .tab-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    background: transparent;
    color: var(--text-color);
    border: none;
    border-radius: 0;
    margin: 0;
    position: relative;
    transition: all var(--transition-normal);
}

.segmented-tabs .tab-btn:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: #e0e0e0;
}

.segmented-tabs .tab-btn.active {
    background: #1a237e; /* Dark blue color for active tab */
    color: white;
    font-weight: 500;
}

.segmented-tabs .tab-btn:hover:not(.active) {
    background: #e8eaf6; /* Light blue hover for inactive tabs */
}

/* Adjustments for the "Visit Our Office" tabs */
.location-tabs .segmented-tabs {
    max-width: 600px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Adjustments for the tab content */
.location-tabs .location-details {
    margin-top: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .option,
    .btn,
    .contact-section,
    .tab-content.active {
        animation: none;
        transition: none;
    }
}

/* Responsive Design for Desktop (1280px-1920px) */
@media screen and (min-width: 1280px) and (max-width: 1920px) {
    .contact-section {
        padding: 120px 2rem 4rem;
    }
    
    .contact-section h1 {
        font-size: 2.8rem;
    }
    
    .contact-intro {
        font-size: 1.2rem;
        margin: 0 auto 3rem;
    }
    
    .contact-options {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .option {
        padding: 2rem;
    }
    
    .option h2 {
        font-size: 1.8rem;
    }
    
    .map-container iframe {
        height: 450px;
    }
    
    .location-details {
        font-size: 1.1rem;
    }
}

/* Responsive Design for Tablets (601px-1279px) */
@media screen and (min-width: 601px) and (max-width: 1279px) {
    .contact-section {
        padding: 110px 1.5rem 3rem;
    }
    
    .contact-section h1 {
        font-size: 2.5rem;
        margin-bottom: 1.2rem;
    }
    
    .contact-section h1::after {
        width: min(50px, 20%);
        bottom: -8px;
    }
    
    .contact-intro {
        font-size: 1.1rem;
        margin: 0 auto 2.5rem;
        max-width: 700px;
    }
    
    .contact-options {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.8rem;
        margin-bottom: 2.5rem;
    }
    
    .option {
        padding: 1.8rem;
    }
    
    .option h2 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .option p {
        margin-bottom: 1.2rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }
    
    .meet-us {
        margin: 2.5rem 0;
    }
    
    .location-details {
        margin: 1.2rem 0;
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .map-container iframe {
        height: 400px;
    }
    
    .response-time {
        margin-top: 2.5rem;
        padding: 0.9rem;
    }
    
    .tabs {
        gap: 0.4rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1.3rem;
        font-size: 0.95rem;
    }
    
    .segmented-tabs .tab-btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }
    
    /* For smaller tablets (601px-900px) */
    @media screen and (max-width: 900px) {
        .contact-section {
            padding: 100px 1.2rem 2.5rem;
        }
        
        .contact-section h1 {
            font-size: 2.3rem;
        }
        
        .contact-intro {
            font-size: 1rem;
            padding: 0 0.5rem;
        }
        
        .contact-options {
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 1.5rem;
        }
        
        .option {
            padding: 1.5rem;
        }
        
        .option h2 {
            font-size: 1.5rem;
        }
        
        .map-container iframe {
            height: 350px;
        }
        
        .tab-btn {
            padding: 0.5rem 1.2rem;
            font-size: 0.9rem;
        }
        
        .segmented-tabs .tab-btn {
            padding: 0.6rem 0.6rem;
            font-size: 0.9rem;
        }
    }
}

/* Responsive Design for Mobile (360px-600px) */
@media screen and (min-width: 240px) and (max-width: 600px) {
    .contact-section {
        padding: 90px 1rem 2rem;
        min-height: auto;
    }
    
    .contact-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .contact-section h1::after {
        width: min(45px, 20%);
        height: 2px;
        bottom: -7px;
    }
    
    .contact-intro {
        font-size: 0.95rem;
        margin: 0 auto 2rem;
        line-height: 1.5;
        padding: 0 0.5rem;
    }
    
    .contact-container {
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .contact-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .option {
        padding: 1.5rem;
    }
    
    .option::before {
        height: 3px;
    }
    
    .option:hover {
        transform: translateY(-5px);
    }
    
    .option h2 {
        font-size: 1.4rem;
        margin-bottom: 0.7rem;
    }
    
    .option p {
        margin-bottom: 1rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .btn {
        padding: 0.8rem 1.6rem;
        font-size: 0.9rem;
        border-width: 1px;
    }
    
    .meet-us {
        margin: 2rem 0;
    }
    
    .location-details {
        margin: 1rem 0;
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .map-container {
        border-radius: 10px;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .response-time {
        margin-top: 2rem;
        padding: 0.8rem;
        border-radius: 6px;
    }
    
    .response-time p {
        font-size: 0.9rem;
    }
    
    .tabs {
        gap: 0.3rem;
        margin-bottom: 1.2rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .segmented-tabs {
        max-width: 100%;
        margin: 1rem auto;
    }
    
    .segmented-tabs .tab-btn {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Responsive adjustments for segmented tabs */
    .segmented-tabs {
        flex-direction: row;
    }
}

/* Extra small devices */
@media screen and (max-width: 359px) {
    .contact-section {
        padding: 80px 0.8rem 1.5rem;
    }
    
    .contact-section h1 {
        font-size: 1.8rem;
    }
    
    .contact-intro {
        font-size: 0.9rem;
        margin: 0 auto 1.8rem;
    }
    
    .option {
        padding: 1.2rem;
    }
    
    .option h2 {
        font-size: 1.3rem;
    }
    
    .option p {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.7rem 1.4rem;
        font-size: 0.85rem;
    }
    
    .location-details {
        font-size: 0.9rem;
    }
    
    .map-container iframe {
        height: 250px;
    }
    
    .response-time {
        padding: 0.7rem;
    }
    
    .response-time p {
        font-size: 0.85rem;
    }
    
    /* Improved tab behavior for very small screens */
    .segmented-tabs {
        flex-direction: column;
    }
    
    .segmented-tabs .tab-btn:not(:last-child)::after {
        display: none;
    }
    
    .segmented-tabs .tab-btn:not(:last-child) {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .tab-btn {
        width: 100%;
        margin-bottom: 0.3rem;
    }
}

/* Print styles */
@media print {
    .btn,
    .navbar,
    .tabs {
        display: none;
    }
    
    .tab-content {
        display: block !important;
    }

    .location-details,
    .contact-section h1,
    .option h2 {
        color: #000;
    }

    .map-container {
        page-break-inside: avoid;
    }
}