/* Contact Page Styles */

/* Hero Section */
.contact-hero {
    position: relative;
    padding: 140px 0;
    margin-top: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--light-gray);
    text-align: center;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/hero/hero-contact-desktop.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.webp .contact-hero::before {
    background-image: url('/images/hero/hero-contact-desktop.webp');
}

.contact-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

.contact-hero .container {
    position: relative;
    z-index: 10;
}

.contact-hero .hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.contact-hero .hero-description {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.6;
}

/* Payment Options Section */
.payment-options {
    padding: 50px 0 80px;
    background-color: var(--light-gray);
    border-bottom: 2px solid var(--accent-color);
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.payment-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.payment-card:hover,
.payment-card:focus {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.payment-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-header h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.payment-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 1rem;
    text-align: center;
}

.payment-badge.warning {
    background-color: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
}

.payment-content {
    padding: 1.5rem;
}

.fee-info {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.fee-label {
    font-weight: 600;
    color: var(--black);
    margin-right: 1rem;
}

.fee-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.fee-note {
    color: var(--medium-gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.payment-benefits {
    margin-bottom: 1.5rem;
}

.payment-benefits h4 {
    color: var(--black);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.payment-benefits ul {
    list-style: none;
    padding: 0;
}

.payment-benefits ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--black);
    line-height: 1.6;
}

.payment-benefits ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.payment-note {
    background-color: #f0f7ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--black);
}

.payment-note.warning {
    background-color: #fff9e6;
    border-left-color: #ffc107;
}

.payment-note strong {
    color: var(--primary-color);
}

.payment-note.warning strong {
    color: #854200;
}

.payment-links h4 {
    color: var(--black);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.payment-links ul {
    list-style: none;
    padding: 0;
}

.payment-links ul li {
    margin-bottom: 0.5rem;
}

.payment-links ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.payment-links ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.payment-links ul li a::after {
    content: "→";
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.payment-links ul li a:hover::after {
    transform: translateX(3px);
}

/* Payment Help Section */
.payment-help {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    color: var(--white);
}

.payment-help h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.payment-help p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1067px) {
    .contact-hero::before {
        background-image: url('/images/hero/hero-contact-tablet.jpg');
    }

    .webp .contact-hero::before {
        background-image: url('/images/hero/hero-contact-tablet.webp');
    }
}

@media (max-width: 800px) {
    .contact-hero::before {
        background-image: url('/images/hero/hero-contact-mobile.jpg');
    }

    .webp .contact-hero::before {
        background-image: url('/images/hero/hero-contact-mobile.webp');
    }
}

@media (max-width: 768px) {
    .payment-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .contact-hero .hero-title {
        font-size: 2.5rem;
    }

    .contact-hero .hero-description {
        font-size: 1.1rem;
    }

    .payment-options {
        padding: 60px 0;
    }

    .payment-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }

    .payment-badge {
        align-self: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        padding: 120px 0 80px;
    }

    .contact-hero .hero-title {
        font-size: 2rem;
    }

    .contact-hero .hero-description {
        font-size: 1rem;
    }

    .payment-card {
        border-radius: 8px;
    }

    .payment-header h3 {
        font-size: 1.3rem;
    }

    .fee-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .payment-help {
        padding: 1.5rem;
    }

    .payment-help h3 {
        font-size: 1.5rem;
    }

    .payment-help p {
        font-size: 1rem;
    }
}

/* Contact Form Section */
.contact-form-section {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.form-group .required {
    color: #d32f2f;
    margin-left: 0.2rem;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: var(--white);
    color: var(--black);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
    
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Tooltip Styles */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
    transition: background-color 0.3s ease, transform 0.2s ease;
    vertical-align: middle;
}

.help-icon:hover,
.help-icon:focus,
.tooltip-wrapper.tooltip-active .help-icon {
    background-color: var(--secondary-color);
    transform: scale(1.1);
    outline: none;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background-color: var(--black);
    color: var(--white);
    text-align: left;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--black) transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text,
.help-icon:focus + .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Error Messages */
.error-message {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.input-error {
    border-color: #d32f2f !important;
    background-color: #fff5f5 !important;
}

.input-error:focus {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1) !important;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.btn-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.btn-submit:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Loading Spinner */
.btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: var(--white);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Form Messages */
.form-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

.form-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.form-message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

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

/* Utility Classes for Visibility */
.hidden {
    display: none !important;
}

.visible-block {
    display: block !important;
}

.visible-flex {
    display: flex !important;
}

.visible-inline {
    display: inline !important;
}

/* Honeypot Field - Hidden */
#website {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* Button Loader - Hidden by default */
.btn-loader {
    display: none;
}

/* Form Message - Hidden by default */
.form-message {
    display: none;
}

/* Error Message - Hidden by default */
.error-message {
    display: none;
}

/* Cloudflare Turnstile Container */
.cf-turnstile {
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

/* Responsive Design for Form */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 60px 0;
    }

    .contact-form {
        padding: 2rem;
    }

    .tooltip-text {
        position: fixed;
        top: auto;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 85vw;
        max-width: 320px;
        z-index: 9999;
    }

    .tooltip-text::after {
        display: none;
    }

    /* Disable CSS-driven hover/focus visibility on mobile — JS controls it */
    .tooltip-wrapper:hover .tooltip-text,
    .help-icon:focus + .tooltip-text {
        visibility: hidden;
        opacity: 0;
    }

    /* JS-toggled visibility for mobile */
    .tooltip-wrapper.tooltip-active .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .contact-form-section {
        padding: 40px 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group select,
    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.8rem;
    }

    .tooltip-text {
        width: 240px;
        font-size: 0.8rem;
        padding: 0.7rem;
    }

    .help-icon {
        width: 16px;
        height: 16px;
        font-size: 0.7rem;
    }
}