/* ===== CONTACT PAGE STYLES ===== */

/* ===== HERO SECTION ===== */
.contact-hero {
    min-height: 100vh;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.contact-hero .hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.contact-hero .hero-waves svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

.contact-hero .hero-title {
    font-family: 'Lustria', serif;
    font-size: 4rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.contact-hero .hero-subtitle {
    font-size: 1.3rem;
    color: var(--light-color);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-info h5 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--white);
    text-shadow: 0 0 10px rgba(171, 230, 255, 0.5);
}

.contact-info small {
    color: var(--light-color);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.25rem;
}

.contact-hero .hero-image-container {
    position: relative;
}

.contact-hero .hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    transition: var(--transition);
}

.contact-hero .hero-image:hover {
    transform: scale(1.05);
}

/* ===== CONTACT FORM SECTION ===== */
.contact-form-section {
    padding: 6rem 0;
    background: var(--white);
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.form-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-medium);
    border-top: 4px solid var(--primary-color);
}

.form-title {
    font-family: 'Lustria', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.form-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.6;
}

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

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

.form-label {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(38, 90, 112, 0.15);
    outline: none;
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.24-.24L4.49 4.54l1.95 1.95.24-.24L4.73 4.3l1.95-1.95-.24-.24L4.49 4.06 2.54 2.11l-.24.24L4.25 4.3z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

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

.form-check {
    margin-bottom: 1rem;
}

.form-check-input {
    border: 2px solid #dee2e6;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-dark);
    margin-left: 0.5rem;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.form-note {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== CONTACT SIDEBAR ===== */
.contact-sidebar {
    position: sticky;
    top: 120px;
}

.contact-info-card,
.contact-cta-card {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
}

.contact-cta-card {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.contact-info-card h4,
.contact-cta-card h4 {
    font-family: 'Lustria', serif;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.4rem;
}

.contact-cta-card h4 {
    color: var(--white);
}

.contact-cta-card p {
    color: var(--light-color);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

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

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-content p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ===== MAP SECTION ===== */
.map-section {
    position: relative;
}

.map-container {
    position: relative;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    filter: grayscale(30%);
    transition: var(--transition);
}

.map-container:hover iframe {
    filter: grayscale(0%);
}

.map-overlay {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    max-width: 300px;
    z-index: 10;
}

.map-info h4 {
    font-family: 'Lustria', serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.map-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 6rem 0;
    background: var(--light-color);
}

.accordion {
    box-shadow: var(--shadow-soft);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-item {
    border: none;
    border-bottom: 1px solid rgba(38, 90, 112, 0.1);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1.5rem 2rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: var(--transition);
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(38, 90, 112, 0.15);
    border: none;
}

.accordion-button::after {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(1074%) hue-rotate(181deg) brightness(95%) contrast(87%);
    transition: var(--transition);
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) saturate(100%) invert(100%);
}

.accordion-body {
    padding: 2rem;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.7;
    border-top: 1px solid rgba(38, 90, 112, 0.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .contact-hero .hero-title {
        font-size: 3rem;
    }
    
    .form-container {
        padding: 2rem;
    }
    
    .form-title {
        font-size: 2rem;
    }
    
    .contact-sidebar {
        position: static;
        margin-top: 3rem;
    }
    
    .map-overlay {
        position: static;
        margin: 2rem;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .contact-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .contact-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-contact-cards {
        margin-top: 2rem;
    }
    
    .contact-card {
        padding: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .contact-form-section {
        padding: 4rem 0;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .contact-info-card,
    .contact-cta-card {
        padding: 1.5rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .accordion-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .accordion-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .contact-hero .hero-title {
        font-size: 2rem;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-subtitle {
        font-size: 1rem;
    }
    
    .contact-info-card,
    .contact-cta-card {
        padding: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .map-overlay {
        margin: 1rem;
    }
    
    .accordion-button {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
}

/* ===== LOADING STATES ===== */
.form-loading .btn {
    position: relative;
    color: transparent;
}

.form-loading .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== SUCCESS STATES ===== */
.form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    display: none;
}

.form-success.show {
    display: block;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-success i {
    color: #28a745;
    margin-right: 0.5rem;
}

/* ===== ERROR STATES ===== */
.form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    display: none;
}

.form-error.show {
    display: block;
    animation: slideInDown 0.5s ease;
}

.form-error i {
    color: #dc3545;
    margin-right: 0.5rem;
}

/* ===== FLOATING LABELS ENHANCEMENT ===== */
.form-floating {
    position: relative;
}

.form-floating .form-control {
    padding: 1rem 0.75rem 0.25rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0.75rem;
    height: 100%;
    padding: 1rem 0;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* ===== CUSTOM SELECT STYLING ===== */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23265a70' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* ===== PROGRESS INDICATOR ===== */
.form-progress {
    background: var(--light-color);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active::after {
    background: var(--primary-color);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    position: relative;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: var(--white);
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 3px solid rgba(38, 90, 112, 0.25);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .contact-hero {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .contact-hero .hero-title {
        color: black !important;
        text-shadow: none !important;
    }
    
    .form-container,
    .contact-info-card,
    .contact-cta-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .map-section,
    .contact-cta-card .btn {
        display: none !important;
    }
    
    .accordion-button {
        background: white !important;
        color: black !important;
    }
    
    .accordion-body {
        border: none !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .form-control,
    .form-select {
        border-width: 3px;
    }
    
    .contact-card,
    .form-container,
    .contact-info-card {
        border: 2px solid var(--primary-color);
    }
    
    .accordion-item {
        border-bottom-width: 2px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .form-control,
    .accordion-button,
    .map-container iframe {
        transition: none !important;
    }
    
    .form-success,
    .form-error {
        animation: none !important;
    }
    
    .form-loading .btn::after {
        animation: none !important;
    }
}