/* Contact Page Modern Styles */

.contact-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.contact-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-illustration {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 8rem;
    opacity: 0.3;
    color: white;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.custom-breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    display: inline-flex;
}

.custom-breadcrumb .breadcrumb-item a {
    color: white;
    text-decoration: none;
}

.custom-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.8);
}

.contact-main-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.contact-info-cards {
    margin-top: -60px;
    position: relative;
    z-index: 3;
}

.contact-info-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.contact-info-card:hover .card-icon {
    transform: scale(1.1);
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.card-text {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #764ba2;
    text-decoration: none;
}

.contact-form-section {
    margin-top: 3rem;
}

.contact-form-container {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #666;
    font-size: 1rem;
}

.modern-contact-form .form-group {
    position: relative;
}

.modern-contact-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

/* Ensure labels are visible in all themes */
.modern-contact-form .form-label {
    color: #333 !important;
    text-shadow: none;
    background: transparent;
}

/* Override for dark backgrounds */
.contact-form-container .modern-contact-form .form-label {
    color: #333 !important;
}

/* High contrast mode for better accessibility */
@media (prefers-contrast: high) {
    .modern-contact-form .form-label {
        color: #000000 !important;
        font-weight: 700;
    }
}

/* Additional fallback for better contrast */
@media (max-width: 768px) {
    .modern-contact-form .form-label {
        font-size: 1rem;
        font-weight: 600;
    }
}

.required {
    color: #e74c3c;
}

.modern-contact-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.modern-contact-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
}

.modern-contact-form .form-control.is-invalid {
    border-color: #e74c3c;
}

.modern-contact-form .form-control.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.map-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.map-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.map-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.map-wrapper {
    height: 450px;
    position: relative;
}

.location-map {
    width: 100%;
    height: 100%;
    border: none;
}

.office-hours-section {
    margin-top: 4rem;
}

.office-hours-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.office-hours-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border: none;
}

.hours-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.office-hours-card .card-body {
    padding: 2rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.hours-item:last-child {
    margin-bottom: 0;
}

.day {
    font-weight: 600;
    color: #333;
}

.time {
    color: #667eea;
    font-weight: 500;
}

/* Enhanced office hours visibility */
.hours-item .day,
.hours-item .time {
    color: #333 !important;
}

.hours-item .time {
    color: #667eea !important;
}

/* Loading animation for form submission */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-icon {
        font-size: 4rem;
    }

    .contact-info-cards {
        margin-top: -40px;
    }

    .contact-info-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .map-wrapper {
        height: 300px;
    }

    .hours-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .contact-hero-section {
        padding: 60px 0 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .contact-main-section {
        padding: 60px 0;
    }

    .contact-info-cards {
        margin-top: -30px;
    }

    .btn-submit {
        width: 100%;
        padding: 1rem;
    }
}

/* Smooth scrolling */
.scroll-to {
    scroll-behavior: smooth;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .contact-main-section {
        background: #1a1a1a;
    }
    
    .contact-info-card, .contact-form-container, .office-hours-card {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .card-title, .form-title, .hours-title {
        color: #ffffff;
    }
    
    .card-text, .form-subtitle {
        color: #cccccc;
    }
    
    .modern-contact-form .form-label {
        color: #ffffff !important;
    }
    
    .modern-contact-form .form-control {
        background: #3d3d3d;
        border-color: #555;
        color: #ffffff;
    }
    
    .modern-contact-form .form-control:focus {
        background: #4d4d4d;
        border-color: #667eea;
    }
    
    .modern-contact-form .form-control::placeholder {
        color: #999999;
    }
    
    .day {
        color: #ffffff;
    }
    
    .time {
        color: #8bb6ff;
    }
    
    /* Enhanced dark mode support for office hours */
    .hours-item .day {
        color: #ffffff !important;
        font-weight: 600;
    }
    
    .hours-item .time {
        color: #8bb6ff !important;
        font-weight: 500;
    }
    
    .hours-item {
        background: #3d3d3d !important;
        border-left-color: #8bb6ff !important;
    }
    
    .office-hours-card .card-body {
        background: #2d2d2d !important;
        color: #ffffff;
    }
}

/* Class-based dark mode support */
.dark-mode .contact-main-section {
    background: #1a1a1a;
}

.dark-mode .contact-info-card, 
.dark-mode .contact-form-container, 
.dark-mode .office-hours-card {
    background: #2d2d2d;
    color: #ffffff;
}

.dark-mode .card-title, 
.dark-mode .form-title, 
.dark-mode .hours-title {
    color: #ffffff;
}

.dark-mode .card-text, 
.dark-mode .form-subtitle {
    color: #cccccc;
}

.dark-mode .modern-contact-form .form-label {
    color: #ffffff !important;
}

.dark-mode .modern-contact-form .form-control {
    background: #3d3d3d;
    border-color: #555;
    color: #ffffff;
}

.dark-mode .modern-contact-form .form-control:focus {
    background: #4d4d4d;
    border-color: #667eea;
}

.dark-mode .modern-contact-form .form-control::placeholder {
    color: #999999;
}

.dark-mode .day {
    color: #ffffff;
}

.dark-mode .time {
    color: #8bb6ff;
}

/* Enhanced dark mode support for office hours */
.dark-mode .hours-item .day,
body.dark-mode .hours-item .day {
    color: #ffffff !important;
    font-weight: 600;
}

.dark-mode .hours-item .time,
body.dark-mode .hours-item .time {
    color: #8bb6ff !important;
    font-weight: 500;
}

.dark-mode .hours-item,
body.dark-mode .hours-item {
    background: #3d3d3d !important;
    border-left-color: #8bb6ff !important;
}

.dark-mode .office-hours-card .card-body,
body.dark-mode .office-hours-card .card-body {
    background: #2d2d2d !important;
    color: #ffffff;
}

/* Animation delays for staggered loading */
.contact-info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.contact-info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-info-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Enhanced accessibility */
.contact-info-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn-submit:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.modern-contact-form .form-control:focus {
    outline: none;
}

/* Print styles */
@media print {
    .contact-hero-section {
        background: white;
        color: black;
        padding: 20px 0;
    }
    
    .hero-icon, .card-icon {
        display: none;
    }
    
    .btn-submit {
        display: none;
    }
    
    .map-container {
        border: 1px solid #ccc;
    }
    
    .location-map {
        display: none;
    }
    
    .map-wrapper::after {
        content: "Map view available online";
        display: flex;
        align-items: center;
        justify-content: center;
        height: 200px;
        background: #f8f9fa;
        border: 1px dashed #ccc;
    }
}
