/* === Enhanced Contact Page Styles === */

/* Contact Info Section */
.contact-info-section {
    position: relative;
    z-index: 1;
    padding: 4rem 0 2rem;
}

/* Contact Cards Grid */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Individual Contact Card */
.contact-card {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: var(--link-color);
}


.contact-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--link-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.contact-card h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.contact-card-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
}

.contact-card-text a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card-text a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Contact Form Section */
.contact-form-section {
    position: relative;
    z-index: 1;
    padding: 3rem 0 4rem;
}

/* Contact Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: 20px;
    padding: 2.5rem;
}

.contact-form-wrapper .section-title {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

/* Enhanced Contact Form */
.contact-form-enhanced {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.contact-form-enhanced .form-group input,
.contact-form-enhanced .form-group textarea,
.contact-form-enhanced .form-group select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    color: var(--input-text);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-form-enhanced .form-group select {
    appearance: none;
    cursor: pointer;
}

.contact-form-enhanced .form-group select option {
    color: #111;
    background: #fff;
}

.contact-form-enhanced .form-group select:invalid {
    color: var(--text-muted);
}

.contact-form-enhanced .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-enhanced .form-group input:focus,
.contact-form-enhanced .form-group textarea:focus,
.contact-form-enhanced .form-group select:focus {
    border-color: var(--link-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-icon.select-icon {
    right: 1rem;
    left: auto;
    pointer-events: none;
}

.form-icon.textarea-icon {
    top: 1.5rem;
    transform: none;
}

.contact-form-enhanced .form-group input:focus ~ .form-icon,
.contact-form-enhanced .form-group textarea:focus ~ .form-icon,
.contact-form-enhanced .form-group select:focus ~ .form-icon {
    color: var(--link-color);
}

.contact-form-enhanced .form-group label {
    position: absolute;
    left: 3rem;
    top: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    background-color: transparent;
    padding: 0 0.25rem;
}

.contact-form-enhanced .form-group input:focus + label,
.contact-form-enhanced .form-group input:not(:placeholder-shown) + label,
.contact-form-enhanced .form-group textarea:focus + label,
.contact-form-enhanced .form-group textarea:not(:placeholder-shown) + label {
    top: -0.6rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--link-color);
    background-color: var(--bg-color);
}

.file-group {
    position: relative;
}

.file-group input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--input-bg);
    border: 2px dashed var(--input-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    border-color: var(--link-color);
    background: rgba(0, 123, 255, 0.05);
}

.file-icon {
    color: var(--link-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-text {
    color: var(--text-primary);
    font-weight: 500;
}

.file-types {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    color: var(--link-color);
    font-size: 0.9rem;
}

.submit-btn {
    position: relative;
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;
}

.btn-loader {
    display: none;
    animation: spin 1s linear infinite;
}

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

.submit-btn.loading .btn-text {
    opacity: 0.5;
}

.submit-btn.loading .btn-loader {
    display: block;
    position: absolute;
}

.form-message {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    animation: slideIn 0.3s ease;
}

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

.form-message.show {
    display: flex;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #28a745;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
}

.map-wrapper {
    position: sticky;
    top: 100px;
}

.map-wrapper .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-map-container {
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--button-border);
    transition: all 0.3s ease;
}

.contact-map-container:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    border-color: var(--link-color);
}

.contact-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

body:not(.light-mode) .contact-map-container iframe {
    filter: invert(100%) hue-rotate(180deg) contrast(90%);
}

.map-info {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--button-bg);
    border-radius: 12px;
    border: 1px solid var(--button-border);
}

.map-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    position: relative;
    z-index: 1;
    padding: 4rem 0 6rem;
    background: var(--section-bg);
}

.faq-section .section-title,
.faq-section .section-subtitle {
    color: var(--section-title-color);
}

.faq-container {
    max-width: 900px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--link-color);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.faq-item.active {
    border-color: var(--link-color);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.15);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.faq-question:hover {
    color: var(--link-color);
}

.faq-item.active .faq-question {
    color: var(--link-color);
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--input-bg);
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-icon svg {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    background: var(--link-color);
    color: white;
}

.faq-item.active .faq-icon svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 2rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

/* Contact Page Responsive Styles */
@media (max-width: 1200px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .map-wrapper {
        position: relative;
        top: 0;
    }
    .contact-map-container {
        height: 300px;
    }
}

@media (max-width: 992px) {
    .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .contact-form-wrapper,
    .map-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
    .contact-card {
        padding: 2rem 1.5rem;
    }
    .contact-form-wrapper,
    .map-wrapper {
        padding: 1.5rem;
    }
    .faq-question {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
    .faq-answer p {
        padding: 0 1.5rem 1.25rem;
        font-size: 0.95rem;
    }
    .file-types {
        display: none;
    }
}

body.light-mode .contact-card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body.light-mode .contact-form-wrapper,
body.light-mode .faq-item {
    background: #ffffff;
}

body.light-mode .contact-form-enhanced .form-group input,
body.light-mode .contact-form-enhanced .form-group textarea,
body.light-mode .contact-form-enhanced .form-group select {
    background: #f8f9fa;
}

body.light-mode .file-label {
    background: #f8f9fa;
}

body.light-mode .faq-section {
    background: #f0f4f8;
}

/* === Contact Info Section Refinement === */
.contact-info-section {
    padding: 4.75rem 0 2.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 72%);
}

.contact-info-section .page-title {
    margin-bottom: 0.65rem;
}

.contact-info-section .page-subtitle {
    max-width: 38rem;
    margin: 0 auto;
    line-height: 1.7;
}

.contact-cards-grid {
    margin-top: 2.5rem;
    gap: 1.5rem;
    align-items: stretch;
}

.contact-card {
    min-height: 14.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 1.85rem 1.4rem 1.6rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-card::before,
.contact-card::after {
    content: none;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
    border-color: rgba(0, 123, 255, 0.35);
}

.contact-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--link-color), #005fb8);
    box-shadow: 0 10px 22px rgba(0, 123, 255, 0.18);
}

.contact-card-icon svg {
    width: 24px;
    height: 24px;
}

.contact-card h3 {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    letter-spacing: 0.01em;
}

.contact-card-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.contact-card-text a {
    font-weight: 500;
}

body.light-mode .contact-info-section {
    background: linear-gradient(180deg, rgba(0, 123, 255, 0.04), rgba(255, 255, 255, 0) 70%);
}

body.light-mode .contact-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

@media (max-width: 992px) {
    .contact-card {
        min-height: 13.5rem;
    }
}

@media (max-width: 768px) {
    .contact-info-section {
        padding-top: 4rem;
    }

    .contact-cards-grid {
        margin-top: 2rem;
        gap: 1.1rem;
    }

    .contact-card {
        min-height: auto;
        padding: 1.6rem 1.25rem 1.45rem;
    }

    .contact-card-icon {
        width: 3.2rem;
        height: 3.2rem;
        margin-bottom: 1rem;
    }
}
