/* Contact Page Styles - New Layout */

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.contact-hero {
    background-color: var(--dark-hero);
    color: var(--text-inverse);
    padding: var(--hero-padding-top-desktop) 0 var(--hero-padding-bottom-desktop);
    text-align: center;
    position: relative;
    width: 100%;
    /* background-image set inline in PHP */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 0;
}

.contact-hero.hero-light {
    position: relative;
}

.contact-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 48, 53, 0.9) 0%, rgba(22, 22, 21, 0.95) 100%);
    z-index: 0;
}

/* Keď má hero featured image, overlay je jemnejší a rešpektuje vrstvy */
/* Keď má hero featured image, overlay je jemnejší a rešpektuje vrstvy */
.contact-hero[style*="background"]::before,
.contact-hero[style*="url"]::before {
    /* Cinematic gradient: Dark Top (Header) -> Clearer Middle (Image focus) -> Solid Bottom (Transition) */
    background: linear-gradient(to bottom,
            rgba(22, 22, 21, 0.85) 0%,
            rgba(22, 22, 21, 0.4) 50%,
            rgba(22, 22, 21, 1) 100%);
}

.contact-hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 var(--container-padding, 20px);
}

.contact-hero-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.contact-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.contact-hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    line-height: 1.6;
    color: var(--text-inverse);
    max-width: 724px;
    margin: 0 auto;
    font-weight: 400;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 6px 20px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.contact-hero-actions {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.contact-hero-actions .btn-primary svg,
.contact-hero-actions .btn-secondary svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.hero-divider {
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--container-width, 1280px) - 40px);
    max-width: calc(100% - 40px);
    height: 1px;
    background-color: var(--divider);
    border: none;
    z-index: 2;
}

@media (max-width: 1023px) {
    .hero-divider {
        top: 68px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════════════════════════════════ */

.contact-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding, 20px) var(--section-spacing-desktop);
    position: relative;
    z-index: 1;
    /* Lower z-index to not block footer */
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 2rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   MAIN GRID: FORM LEFT, CONTACT INFO RIGHT
   ═══════════════════════════════════════════════════════════════════════ */

.contact-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-top: 0;
    margin-bottom: var(--spacing-section);
    align-items: start;
}



.contact-form-wrapper {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

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

/* Right Column: Boxes - start below hero */
.contact-info-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0;
}



.contact-info-box {
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: none;
    transition: none;
}

.contact-info-box:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.contact-info-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.office-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-detail:last-child {
    margin-bottom: 0;
}

.contact-icon-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    border-radius: 50%;
    flex-shrink: 0;
    color: var(--primary);
    transition: all 0.3s ease;
}

.contact-detail:hover .contact-icon-wrapper {
    background: var(--primary);
    color: white;
}

.contact-detail svg {
    width: 18px;
    height: 18px;
    color: inherit;
}

.contact-detail span {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.contact-detail a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

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

/* ═══════════════════════════════════════════════════════════════════════
   APPLICATION FORM
   ═══════════════════════════════════════════════════════════════════════ */

.application-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0;
}

.form-group {
    margin-bottom: 0.5rem;
    position: relative;
    flex: 0 0 100%;
}



.form-group label:not(.checkbox-wrapper) {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-group label .required {
    color: var(--error);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    font-weight: 500;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    height: var(--input-height);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--input-placeholder);
    font-weight: var(--font-weight-normal);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: var(--shadow-focus);
    background: var(--input-bg-focus);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--input-border-hover);
    background: white;
}

.form-group-checkbox {
    margin-bottom: 1.25rem;
}

.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: var(--font-weight-normal);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.checkbox-label {
    font-size: var(--font-size-xs);
    color: var(--text);
    font-weight: var(--font-weight-normal);
    line-height: 1.25;
}

.checkbox-label a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 2px;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition);
}

.checkbox-label a:hover {
    color: var(--text);
    text-decoration-color: var(--text);
}

.btn-submit-application {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--text);
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-submit-application:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 198, 0, 0.25);
}

.btn-submit-application:active {
    transform: translateY(0);
}

.form-ps-note {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.form-ps-note p {
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    display: none;
}

.form-message.success {
    background-color: var(--success-light);
    color: var(--success-hover);
    border: 1px solid var(--success-border);
}

.form-message.error {
    background-color: var(--error-light);
    color: var(--error-hover);
    border: 1px solid var(--error-border);
}

/* Validation States */
.form-group input.form-error,
.form-group textarea.form-error,
.form-group select.form-error,
.form-group.form-error .checkbox-wrapper {
    border-color: var(--error);
    background-color: var(--error-light);
}

.form-group input.form-success,
.form-group textarea.form-success,
.form-group select.form-success {
    border-color: var(--success);
    background-color: var(--success-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.form-error-label {
    color: var(--error);
}

.form-error-message {
    font-size: var(--font-size-xs);
    color: var(--error);
    margin-top: 0.5rem;
    display: none;
    font-weight: var(--font-weight-medium);
}

.form-error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
}

/* Success Message */
.application-success-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
}

.application-success-message .success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.application-success-message .success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
    stroke-width: 2.5;
}

.application-success-message h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text);
    margin-bottom: 0.5rem;
}

.application-success-message p {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   MAP SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.contact-map-section {
    margin-bottom: 0;
    width: 100%;
}

.contact-map-section .section-title {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 20px;
}

.contact-map-wrapper {
    height: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    background: var(--bg-subtle);
    width: 100%;
    margin-top: 2rem;
}

.google-map-container {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
}

.google-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.map-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
}

.map-placeholder iframe {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.map-note {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.8125rem;
    z-index: 10;
    max-width: 280px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.5;
}

.map-note em {
    font-style: normal;
}

/* ═══════════════════════════════════════════════════════════════════════
   BILLING INFO SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.billing-info-section {
    background: white;
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    max-width: 900px;
    margin: 0 auto;
}

.billing-info-section .section-title {
    margin-bottom: 2rem;
    text-align: center;
}

.billing-info-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.billing-info-content p {
    margin-bottom: 0.75rem;
}

.billing-info-content strong {
    color: var(--text);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
    .contact-main-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 0;
    }

    .contact-main-info-box {
        grid-template-columns: 1fr 1fr;
    }

    .contact-form-column {
        margin-top: 2rem;
        order: 2;
    }

    .contact-info-column {
        gap: 1rem;
        margin-top: 2rem;
        order: 1;
        position: relative;
        z-index: 2;
        /* Lower z-index to not block footer */
    }

    /* Email and Phone back to full width on mobile */
    .form-group:has(#contact_email),
    .form-group:has(#contact_phone),
    .form-group:nth-of-type(2),
    .form-group:nth-of-type(3) {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .contact-info-box {
        padding: 1.5rem;
    }

    .contact-map-wrapper {
        height: 400px;
    }
}

.contact-hero-cta {
    display: none;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .contact-hero {
        padding: var(--hero-padding-top-mobile) 0 var(--hero-padding-bottom-mobile);
    }

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



    .contact-form-wrapper,
    .billing-info-section {
        padding: 2rem;
    }

    .contact-info-box {
        padding: 1.5rem;
    }

    .contact-main-detail a {
        font-size: 1rem;
    }

    .contact-main-icon {
        width: 44px;
        height: 44px;
    }

    .contact-main-icon svg {
        width: 18px;
        height: 18px;
    }

    .contact-form-column {
        margin-top: 2rem;
    }

    .contact-info-column {
        margin-top: 2rem;
    }

    .contact-main-info-box {
        grid-template-columns: 1fr;
    }
}