/* ========================================
   CONTACT PAGE ENHANCEMENTS - OPTIMIZED
   Responsive map and improved contact cards
   ======================================== */

/* Hero Section Optimization */
.contact-hero {
    transition: min-height 0.3s ease;
}

/* Contact Information Cards Enhancement */
.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem !important;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.contact-card .card-icon {
    transition: transform 0.3s ease;
}

.contact-card:hover .card-icon {
    transform: scale(1.05);
}

/* Responsive Google Maps */
.google-maps-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.google-maps-container iframe {
    border: none;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* Map Loading State */
.google-maps-container.loading {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0),
                linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { background-position: 0 0, 10px 10px; }
    100% { background-position: 20px 20px, 30px 30px; }
}

/* Contact Form Enhancement */
.contact-form .form-control {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background: #ffffff;
}

.contact-form .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    transform: translateY(-1px);
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 6px;
}

/* Social Links Enhancement */
.social-links .social-link {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-links .social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.social-links .social-link:hover::before {
    left: 100%;
}

.social-links .social-link:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Office Hours Enhancement */
.office-hours {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.office-hours .time-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.office-hours .time-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.office-hours .time-item i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

/* Map Unavailable Container */
.map-unavailable-container {
    transition: all 0.3s ease;
    position: relative;
}

.map-unavailable-container:hover {
    border-color: #adb5bd;
    background: linear-gradient(135deg, #f1f3f5 0%, #dee2e6 100%);
}

.map-unavailable-container .text-center {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout Optimization - Tighter Spacing */
.section-premium {
    padding: 3rem 0 !important;
}

.container-premium {
    padding: 0 15px;
}

/* Mobile Reordering - Form First, Map Second */
@media (max-width: 991px) {
    .contact-form-container {
        order: 1;
    }
    
    .contact-map-container {
        order: 2;
    }
}

/* Mobile-First Responsive Design */
@media (max-width: 992px) {
    .section-premium {
        padding: 2.5rem 0 !important;
    }
    
    .contact-hero {
        min-height: 35vh !important;
    }
    
    .google-maps-container iframe {
        min-height: 250px;
    }
    
    .contact-card {
        margin-bottom: 0.8rem !important;
    }
    
    .contact-form {
        margin-bottom: 2rem;
    }
    
    /* Adjust for 4-column layout on tablets */
    .contact-card:nth-child(n+3) {
        margin-top: 0.8rem;
    }
}

@media (max-width: 768px) {
    .section-premium {
        padding: 2rem 0 !important;
    }
    
    .contact-hero {
        min-height: 30vh !important;
    }
    
    .google-maps-container iframe {
        min-height: 200px;
    }
    
    .contact-card h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .contact-card p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .contact-card {
        padding: 1.2rem 1rem !important;
        margin-bottom: 0.6rem !important;
    }
    
    .office-hours {
        padding: 12px;
    }
    
    .office-hours .time-item {
        font-size: 0.9rem;
        margin-bottom: 8px;
        padding: 4px 0;
    }
    
    .social-links .social-link {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    /* 2-column layout on tablets */
    .contact-card:nth-child(3),
    .contact-card:nth-child(4) {
        margin-top: 0.6rem;
    }
    
    /* Form spacing */
    .contact-form .mb-4 {
        margin-bottom: 1.2rem !important;
    }
    
    .contact-form .form-control {
        padding: 10px 12px;
    }
}

@media (max-width: 576px) {
    .section-premium {
        padding: 1.5rem 0 !important;
    }
    
    .contact-hero {
        min-height: 25vh !important;
    }
    
    /* Stack all cards in single column on small screens */
    .contact-card {
        margin-bottom: 0.5rem !important;
        padding: 1rem 0.8rem !important;
    }
    
    .contact-card:nth-child(n+2) {
        margin-top: 0.5rem;
    }
    
    /* Reorder: Form first, then map */
    .contact-form-container {
        order: 1;
    }
    
    .contact-map-container {
        order: 2;
    }
    
    /* Compact form */
    .contact-form .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .contact-form .form-control {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .contact-form .form-label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    /* Compact office hours */
    .office-hours {
        padding: 10px;
        margin-bottom: 1.5rem;
    }
    
    .office-hours .time-item {
        font-size: 0.85rem;
        margin-bottom: 6px;
        padding: 3px 0;
    }
    
    /* Compact map */
    .google-maps-container iframe {
        min-height: 180px;
    }
    
    .map-unavailable-container {
        height: 180px !important;
    }
    
    /* Compact social links */
    .social-links {
        gap: 8px;
    }
    
    .social-links .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .section-premium {
        padding: 1.2rem 0 !important;
    }
    
    .contact-hero {
        min-height: 20vh !important;
    }
    
    .google-maps-container iframe {
        min-height: 160px;
    }
    
    .map-unavailable-container {
        height: 160px !important;
    }
    
    .contact-card {
        padding: 0.8rem 0.6rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .contact-card h4 {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    .contact-card p {
        font-size: 0.85rem;
    }
    
    .contact-card .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .contact-form .form-control {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .contact-form .form-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .contact-form .mb-4 {
        margin-bottom: 0.8rem !important;
    }
    
    .office-hours {
        padding: 8px;
        margin-bottom: 1.2rem;
    }
    
    .office-hours .time-item {
        font-size: 0.8rem;
        margin-bottom: 5px;
        padding: 2px 0;
    }
    
    .social-links .social-link {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* Extra Small Screens */
@media (max-width: 360px) {
    .section-premium {
        padding: 1rem 0 !important;
    }
    
    .contact-hero {
        min-height: 18vh !important;
    }
    
    .google-maps-container iframe {
        min-height: 140px;
    }
    
    .map-unavailable-container {
        height: 140px !important;
    }
    
    .contact-card {
        padding: 0.6rem 0.4rem !important;
    }
    
    .contact-card h4 {
        font-size: 0.9rem;
    }
    
    .contact-card p {
        font-size: 0.8rem;
    }
    
    .contact-card .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .google-maps-container {
        display: none;
    }
    
    .contact-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .contact-form {
        display: none;
    }
    
    .social-links {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .contact-card {
        border: 2px solid #000;
    }
    
    .contact-form .form-control {
        border: 2px solid #000;
    }
    
    .google-maps-container {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .contact-card .card-icon,
    .contact-form .form-control,
    .social-links .social-link {
        transition: none;
    }
    
    .google-maps-container.loading {
        animation: none;
    }
    
    .social-links .social-link::before {
        transition: none;
    }
}
