/* style/contact.css */

/* Base styles */
.page-contact {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Body background from shared.css */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container for consistent spacing */
.page-contact__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section common styles */
.page-contact__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-contact__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #555555;
}

/* Hero Section */
.page-contact__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    overflow: hidden; /* Ensure image doesn't overflow */
    background-color: #017439; /* Fallback background */
}

.page-contact__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6); /* Darken image for text readability */
    min-width: unset; /* Override global min-width for hero */
    min-height: unset; /* Override global min-height for hero */
}

.page-contact__container--hero {
    position: relative;
    z-index: 1;
    padding: 60px 20px;
}

.page-contact__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff; /* White text on dark background */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-contact__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0; /* Slightly off-white for contrast */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.page-contact__hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-contact__btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
    cursor: pointer;
}

.page-contact__btn--primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-contact__btn--primary:hover {
    background-color: #a00606;
    border-color: #a00606;
    color: #fff;
}

.page-contact__btn--secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-contact__btn--secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* Contact Form Section */
.page-contact__form-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
}

.page-contact__form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-contact__form-group {
    margin-bottom: 20px;
}

.page-contact__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333333;
}

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    color: #333333;
    background-color: #ffffff;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
    color: #999999;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #017439;
    outline: none;
}

.page-contact__form-textarea {
    resize: vertical;
}

/* Contact Info Section */
.page-contact__info-section {
    padding: 80px 0;
    background-color: #017439; /* Dark brand color background */
    color: #ffffff; /* White text */
    position: relative;
    overflow: hidden;
}

.page-contact__info-section .page-contact__section-title {
    color: #ffffff;
}

.page-contact__info-section .page-contact__section-description {
    color: #f0f0f0;
}

.page-contact__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.page-contact__info-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-contact__info-heading {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-contact__info-text {
    font-size: 1em;
    margin-bottom: 15px;
    color: #f0f0f0;
}

.page-contact__info-link {
    color: #FFFF00; /* Highlight links with specific color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-contact__info-link:hover {
    color: #ffffff;
}

.page-contact__info-address {
    font-style: normal;
    color: #f0f0f0;
}

.page-contact__social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.page-contact__social-link {
    color: #ffffff;
    font-size: 1.1em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-contact__social-link:hover {
    color: #FFFF00;
}

.page-contact__support-channels-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 400px; /* Specific size */
    height: 300px; /* Specific size */
    object-fit: contain;
    opacity: 0.1;
    z-index: 0;
}

/* Why Choose Section */
.page-contact__why-choose-section {
    padding: 80px 0;
    background-color: #f5f5f5; /* Slightly off-white background */
}

.page-contact__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-contact__feature-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-contact__feature-heading {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-contact__feature-text {
    color: #333333;
}

.page-contact__feature-text a {
    color: #017439;
    text-decoration: underline;
}

.page-contact__feature-text a:hover {
    color: #005f2c;
}

/* FAQ Section */
.page-contact__faq-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
}

.page-contact__faq-list {
    max-width: 900px;
    margin: 0 auto;
    margin-top: 40px;
}

.page-contact__faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.page-contact__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

.page-contact__faq-question:hover {
    background-color: #f0f0f0;
}

.page-contact__faq-heading {
    font-size: 1.2em;
    color: #017439; /* Brand primary color for FAQ questions */
    margin: 0;
    font-weight: bold;
}

.page-contact__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
    transform: rotate(45deg);
}

.page-contact__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #f9f9f9;
}

.page-contact__faq-item.active .page-contact__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 25px 25px 25px;
}

.page-contact__faq-text {
    margin: 0;
    color: #333333;
}

.page-contact__faq-text a {
    color: #017439;
    text-decoration: underline;
}

.page-contact__faq-text a:hover {
    color: #005f2c;
}

.page-contact__faq-illustration {
    display: block;
    margin: 50px auto 0 auto;
    width: 800px; /* Specific display width */
    height: 600px; /* Specific display height */
    object-fit: contain;
}

/* Images responsive - Global rule */
.page-contact img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: none !important; /* Ensure no filter changes image color */
}

/* Global image size constraint check: ensure no image display size is less than 200px */
/* This applies to content images. Hero and small utility images (if allowed, but forbidden here) are exceptions. */
.page-contact__support-channels-image, .page-contact__faq-illustration {
  min-width: 200px;
  min-height: 200px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-contact__hero-title {
        font-size: 2.5em;
    }
    .page-contact__hero-description {
        font-size: 1.1em;
    }
    .page-contact__section-title {
        font-size: 2em;
    }
    .page-contact__info-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .page-contact__support-channels-image {
        width: 300px;
        height: 225px;
    }
    .page-contact__faq-illustration {
        width: 600px;
        height: 450px;
    }
}

@media (max-width: 768px) {
    .page-contact {
        font-size: 16px;
        line-height: 1.6;
        max-width: 100%; /* Ensure content area does not cause horizontal scroll */
        overflow-x: hidden;
    }
    .page-contact__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-contact__hero-title {
        font-size: 2em;
    }
    .page-contact__hero-description {
        font-size: 1em;
    }
    .page-contact__hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    .page-contact__btn {
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-contact__form {
        padding: 20px;
    }
    .page-contact__info-grid {
        grid-template-columns: 1fr;
    }
    .page-contact__faq-question {
        padding: 15px 20px;
    }
    .page-contact__faq-heading {
        font-size: 1.1em;
    }
    .page-contact__faq-answer {
        padding: 0 20px;
    }
    .page-contact__faq-item.active .page-contact__faq-answer {
        padding: 15px 20px 20px 20px;
    }

    /* Mobile image responsive - Forced with !important */
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-contact__section,
    .page-contact__card,
    .page-contact__container,
    .page-contact__feature-item,
    .page-contact__info-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-contact__form-section,
    .page-contact__info-section,
    .page-contact__why-choose-section,
    .page-contact__faq-section {
        padding: 40px 0;
    }
    .page-contact__support-channels-image {
        position: static;
        margin: 30px auto 0 auto;
        width: 100% !important;
        height: auto !important;
        opacity: 1;
    }
    .page-contact__faq-illustration {
        width: 100% !important;
        height: auto !important;
        margin: 30px auto 0 auto;
    }
    .page-contact__hero-image {
        filter: brightness(0.4) !important; /* Make text even more readable */
    }
}