/* ==========================================================================
   Contact Form Block - Responsive Styles
   ========================================================================== */

/* Tablet Styles (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Container adjustments */
    .contact-form-block {
        padding: 3rem 0;
    }
    
    .contact-form-inner {
        max-width: 960px;
        padding: 0 2rem;
    }
    
    .contact-form-colored-box {
        padding: 3rem 2rem;
    }
    
    /* Content grid adjustments */
    .contact-form-content {
        gap: 3rem;
        align-items: flex-start;
    }
    
    /* Text content adjustments */
    .contact-text {
        padding-right: 1rem;
    }
    
    /* Typography scaling */
    .contact-small-heading {
        font-size: 1.75rem;
    }
    
    .contact-main-heading {
        font-size: clamp(1.5rem, 2.5vw, 2rem);
    }
    
    .contact-description,
    .contact-subtext {
        font-size: 1.25rem;
    }
    
    /* Form adjustments for better touch targets */
    .contact-form {
        gap: 1rem;
    }
    
    .form-control,
    .contact-form-block .wpcf7-form-control {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .submit-button,
    .contact-form-block .wpcf7-submit {
        width: 60%;
        min-width: 180px;
        padding: 1rem 2rem;
    }
    
    /* Map container adjustments */
    .contact-map-container {
        margin-top: 2rem;
    }
    
    .contact-map {
        height: 320px;
    }
    
    /* Decorative shapes adjustments */
    .shape-1 {
        width: 200px;
        height: 200px;
        top: -100px;
        left: 5%;
    }
    
    .shape-2 {
        width: 300px;
        height: 300px;
        top: -150px;
        right: 20%;
    }
    
    .shape-3 {
        width: 180px;
        height: 180px;
        bottom: -90px;
        right: 5%;
    }
}

/* Mobile Landscape & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    /* Section spacing */
    .contact-form-block {
        padding: 2rem 0;
    }
    
    .contact-form-block.alignfull {
        width: 100%;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Container adjustments */
    .contact-form-inner {
        max-width: 100%;
        padding: 0 1.5rem;
        border-radius: 20px;
    }
    
    .contact-form-colored-box {
        border-radius: 20px;
        padding: 2.5rem 1.5rem;
    }
    
    /* Stack columns vertically */
    .contact-form-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
    }
    
    /* Reset text column padding */
    .contact-text {
        padding-right: 0;
        align-self: stretch;
        justify-content: flex-start;
    }
    
    /* Typography for mobile */
    .contact-small-heading {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .contact-main-heading {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        line-height: 1.2;
    }
    
    .contact-description {
        font-size: 1.125rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
    
    .contact-subtext {
        font-size: 1.125rem;
    }
    
    /* Make contact links more touch-friendly */
    .contact-form-container a {
        display: inline-block;
        padding: 0.25rem 0;
        text-decoration: underline;
    }
    
    /* Form wrapper */
    .contact-form-wrapper {
        width: 100%;
    }
    
    /* Form styling for mobile */
    .contact-form {
        gap: 1rem;
    }
    
    /* Touch-friendly form inputs */
    .form-control,
    .contact-form-block .wpcf7-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem 1.25rem;
        min-height: 48px; /* Minimum touch target size */
        border-radius: 12px;
    }
    
    .form-textarea,
    .contact-form-block .wpcf7-textarea {
        min-height: 120px;
        padding: 1rem 1.25rem;
    }
    
    /* Mobile-optimized submit button */
    .submit-button,
    .contact-form-block .wpcf7-submit {
        width: 100%;
        min-width: unset;
        padding: 1rem 2rem;
        font-size: 1.125rem;
        min-height: 48px;
        border-radius: 12px;
    }
    
    /* Contact Form 7 specific mobile adjustments */
    .contact-form-block .wpcf7-form {
        gap: 1rem;
    }
    
    .contact-form-block .wpcf7-form p:last-of-type {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    /* Checkbox improvements for mobile */
    .contact-form-block .wpcf7-checkbox {
        padding: 1rem;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
    }
    
    .contact-form-block .wpcf7-checkbox .wpcf7-list-item {
        flex: 0 0 100%;
    }
    
    .contact-form-block .wpcf7-checkbox .wpcf7-list-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }
    
    .contact-form-block .wpcf7-checkbox .wpcf7-list-item label {
        padding: 0.25rem 0;
        font-size: 0.95rem;
    }
    
    /* Map adjustments for mobile */
    .contact-map-container {
        margin-top: 1.5rem;
    }
    
    .contact-map-wrapper {
        border-radius: 16px;
    }
    
    .contact-map {
        height: 280px;
        border-radius: 16px;
    }
    
    /* Hide decorative shapes on mobile */
    .decorative-shapes {
        display: none;
    }
    
    /* Response output mobile styling */
    .contact-form-block .wpcf7-response-output {
        font-size: 0.875rem;
        padding: 0.875rem;
        border-radius: 8px;
    }
}

/* Mobile Portrait (max-width: 480px) */
@media (max-width: 480px) {
    /* Tighter spacing for small screens */
    .contact-form-block {
        padding: 1.5rem 0;
    }
    
    .contact-form-inner {
        padding: 0 1rem;
        border-radius: 16px;
    }
    
    .contact-form-colored-box {
        padding: 2rem 1rem;
        border-radius: 16px;
    }
    
    .contact-form-content {
        gap: 2rem;
    }
    
    /* Smaller typography for very small screens */
    .contact-small-heading {
        font-size: 1.25rem;
    }
    
    .contact-main-heading {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .contact-description,
    .contact-subtext {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* Form adjustments */
    .contact-form {
        gap: 0.875rem;
    }
    
    .form-control,
    .contact-form-block .wpcf7-form-control {
        padding: 0.875rem 1rem;
        font-size: 16px;
    }
    
    .form-textarea,
    .contact-form-block .wpcf7-textarea {
        min-height: 100px;
        padding: 0.875rem 1rem;
    }
    
    .submit-button,
    .contact-form-block .wpcf7-submit {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Map for small screens */
    .contact-map {
        height: 250px;
    }
    
    /* Checkbox adjustments for small screens */
    .contact-form-block .wpcf7-checkbox {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .contact-form-block .wpcf7-checkbox .wpcf7-list-item label {
        font-size: 0.875rem;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .contact-form-block {
        padding: 1.5rem 0;
    }
    
    .contact-form-colored-box {
        padding: 2rem 1.5rem;
    }
    
    .contact-map {
        height: 220px;
    }
}

/* High resolution mobile devices */
@media (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px),
       (min-resolution: 192dpi) and (max-width: 768px) {
    /* Ensure crisp borders and shadows */
    .form-control,
    .contact-form-block .wpcf7-form-control {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .submit-button,
    .contact-form-block .wpcf7-submit {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        will-change: transform;
    }
}

/* Touch device specific improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .form-control,
    .contact-form-block .wpcf7-form-control {
        min-height: 50px;
    }
    
    .submit-button,
    .contact-form-block .wpcf7-submit {
        min-height: 50px;
    }
    
    /* Remove hover effects on touch devices */
    .submit-button:hover,
    .contact-form-block .wpcf7-submit:hover {
        transform: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
    
    /* Add active state for better feedback */
    .submit-button:active,
    .contact-form-block .wpcf7-submit:active {
        transform: translateY(1px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    /* Make links more touch-friendly */
    .contact-form-container a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 0;
    }
}

/* Print styles */
@media print {
    .contact-form-block {
        page-break-inside: avoid;
    }
    
    .decorative-shapes {
        display: none;
    }
    
    .contact-form-colored-box {
        background-color: transparent !important;
        border: 1px solid #ccc;
    }
    
    .submit-button,
    .contact-form-block .wpcf7-submit {
        display: none;
    }
}