/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #f5f5f5;
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #F04037;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Mobile header optimization */
@media (max-width: 768px) {
    .modal-header {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-header {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 360px) {
    .modal-header {
        margin-bottom: 1rem;
    }
}

.modal-title {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.2;
    color: #F04037;
    margin-bottom: 1rem;
}

.modal-highlight {
    color: #F04037;
    font-weight: 400;
}

.modal-subtitle {
    font-size: 1rem;
    color: #333;
    margin: 0;
    opacity: 0.8;
}

.contact-form {
    margin-bottom: 2rem;
}

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

.form-group.error input,
.form-group.error textarea {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group.success input,
.form-group.success textarea {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-error {
    position: absolute;
    bottom: -20px;
    left: 1rem;
    color: #e74c3c;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-error.show {
    opacity: 1;
    transform: translateY(0);
}

.form-success {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.form-success.show {
    opacity: 1;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    transform: scale(1);
}

.form-group input:hover,
.form-group textarea:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-group textarea {
    border-radius: 25px;
    min-height: 200px;
    resize: vertical;
    padding-top: 1.5rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F04037;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(240, 64, 55, 0.1), 0 4px 20px rgba(240, 64, 55, 0.1);
    transform: scale(1.02);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.modal-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: #F04037;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.modal-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #ccc;
}

.modal-submit-btn.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: button-loading 1s infinite linear;
}

.modal-submit-btn.loading {
    color: transparent;
}

@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

.modal-submit-btn:hover {
    background: #E53935;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(240, 64, 55, 0.3);
}

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

.modal-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile footer optimization */
@media (max-width: 768px) {
    .modal-footer {
        padding-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .modal-footer {
        padding-top: 0.625rem;
    }
}

@media (max-width: 360px) {
    .modal-footer {
        padding-top: 0.5rem;
    }
}

.modal-logo {
    height: 30px;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.contact-icon-svg {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(25%) sepia(89%) saturate(3116%) hue-rotate(349deg) brightness(96%) contrast(95%);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
        max-width: 400px;
        transform: translateX(100%) scale(0.95);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .modal-overlay.active .modal-content {
        transform: translateX(0) scale(1);
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-group.half {
        flex: none;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-width: 360px;
        border-radius: 15px;
        max-height: 95vh;
    }

    .modal-close {
        top: 0.75rem;
        left: 0.75rem;
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
    }

    .modal-title {
        font-size: 1.1rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }

    .modal-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 25px;
    }

    .form-group textarea {
        min-height: 140px;
        border-radius: 15px;
        padding-top: 0.75rem;
    }

    .modal-submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
        border-radius: 25px;
    }
}

@media (max-width: 640px) and (min-width: 481px) {
    .modal-content {
        padding: 1.25rem;
        margin: 1rem;
        width: calc(100% - 2rem);
        max-width: 380px;
    }

    .modal-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .modal-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.75rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.8rem 1.1rem;
        font-size: 0.95rem;
        border-radius: 30px;
    }

    .form-group textarea {
        min-height: 150px;
        border-radius: 18px;
    }

    .modal-submit-btn {
        padding: 0.8rem 1.75rem;
        font-size: 0.9rem;
        border-radius: 30px;
    }
}

/* Ultra-small mobile screens */
@media (max-width: 360px) {
    .modal-content {
        padding: 0.875rem;
        margin: 0.375rem;
        width: calc(100% - 0.75rem);
        max-width: 320px;
        border-radius: 12px;
    }

    .modal-close {
        top: 0.625rem;
        left: 0.625rem;
        width: 28px;
        height: 28px;
        font-size: 1.25rem;
    }

    .modal-title {
        font-size: 1rem;
        line-height: 1.05;
        margin-bottom: 0.625rem;
    }

    .modal-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.25rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    .form-group textarea {
        min-height: 120px;
        border-radius: 12px;
        padding-top: 0.625rem;
    }

    .modal-submit-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }
}

/* ========================================
   YUNTO TYPOGRAPHY SYSTEM
   ======================================== */

