/**
 * Additional WordPress-specific styles for KRIOTHERMAL theme
 * 
 * @package KRIOTHERMAL
 * @since 1.0.0
 */

/* WordPress Core Styles */
.wp-block-group {
    margin-bottom: 2rem;
}

.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.wp-block-column {
    flex: 1;
    min-width: 0;
}

/* Gutenberg Block Styles */
.wp-block-button .wp-block-button__link {
    background: linear-gradient(135deg, #00D4FF, #0099CC);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.wp-block-quote {
    border-left: 4px solid #00D4FF;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.wp-block-pullquote {
    text-align: center;
    border-top: 4px solid #00D4FF;
    border-bottom: 4px solid #00D4FF;
    padding: 2rem 0;
    margin: 3rem 0;
}

/* Contact Form 7 Enhanced Styles */
.wpcf7 {
    margin: 0;
}

.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wpcf7-form-control-wrap {
    position: relative;
    width: 100%;
}

.wpcf7-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.wpcf7-form-control:focus {
    outline: none;
    border-color: #00D4FF;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.wpcf7-not-valid {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1) !important;
}

.wpcf7-response-output {
    margin: 1rem 0 0 0;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 500;
}

.wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wpcf7-mail-sent-ng,
.wpcf7-aborted,
.wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wpcf7-spam-blocked {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Form Loading State */
.wpcf7-form.submitting .wpcf7-submit {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.wpcf7-form.submitting .wpcf7-submit::after {
    content: ' Enviando...';
}

/* Custom Form Fields Layout */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .wpcf7-form-control-wrap {
    flex: 1;
    min-width: 200px;
}

/* Checkbox and Radio Styles */
.wpcf7-list-item {
    margin: 0.5rem 0;
}

.wpcf7-list-item-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.wpcf7-checkbox input[type="checkbox"],
.wpcf7-radio input[type="radio"] {
    width: auto;
    margin: 0;
    padding: 0;
}

/* File Upload Styles */
.wpcf7-file {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpcf7-file:hover {
    border-color: #00D4FF;
    background: #f0f9ff;
}

/* Accessibility Improvements */
.wpcf7-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    color: #333;
}

.wpcf7-form .required {
    color: #ff4757;
}

/* Animation for form elements */
.wpcf7-form-control {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error Messages */
.wpcf7-not-valid-tip {
    color: #ff4757;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success Animation */
.wpcf7-mail-sent-ok {
    animation: successPulse 0.5s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


.site-header.hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

/* Animation Classes */
.animate-in {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00D4FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .form-row .wpcf7-form-control-wrap {
        min-width: 100%;
    }

    .wpcf7-form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Print Styles */
@media print {

    .site-header,
    .site-footer,
    .contact-section,
    .wpcf7 {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }

    .hero-section,
    .content-section {
        padding: 1rem 0;
        background: #fff !important;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }

    .service-card,
    .benefit-item,
    .testimonial-card {
        border: 2px solid #000;
    }

    .hero-section {
        background: #fff;
        color: #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .hero-section {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #fff;
    }

    .service-card,
    .testimonial-card,
    .contact-form {
        background: #2d2d2d;
        color: #fff;
        border-color: #444;
    }

    .section-title {
        color: #fff;
    }

    .section-subtitle,
    .hero-description {
        color: #ccc;
    }
}