/* ========================================
   CONTACT FORM STYLES - IMPROVING DESIGN SYSTEM
   Version: 2.0
   ======================================== */

/* Make CTA buttons behave like links when they are button elements */
button.cta-button-improving {
    /* Remove default button styles */
    border: none;
    margin: 0;
    padding: 0;
    width: auto;
    overflow: visible;
    outline: none;
    
    /* Inherit CTA button styles from product-pages-improving.css */
    background: inherit;
    color: inherit;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    
    /* Fix for display and text alignment */
    display: inline-block;
    text-align: center;
    text-decoration: none;
    vertical-align: baseline;
    
    /* Ensure transitions work */
    -webkit-appearance: none;
    -moz-appearance: none;
}

button.cta-button-improving:hover {
    /* Let the original hover styles work */
    background: inherit;
    color: inherit;
}

/* Ensure button inherits all the .cta-button-improving styles */
button.cta-button-improving:not([class*="btn-"]) {
    padding: 14px 36px;
    background: linear-gradient(135deg, #005596, #4597D3, #5BC2A7);
    color: #ffffff;
    text-decoration: none;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 85, 150, 0.25);
    display: inline-block !important;
    text-align: center;
    vertical-align: baseline;
}

button.cta-button-improving:not([class*="btn-"]):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 85, 150, 0.35);
    background: linear-gradient(135deg, #004477, #005596, #4597D3);
}

/* ========================================
   MODAL OVERLAY & CONTAINER
   ======================================== */

.contact-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 85, 150, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease;
}

.contact-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 85, 150, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid #E0E7EF;
}

/* Custom Scrollbar for Modal */
.contact-modal-content::-webkit-scrollbar {
    width: 8px;
}

.contact-modal-content::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 0 20px 20px 0;
}

.contact-modal-content::-webkit-scrollbar-thumb {
    background: #005596;
    border-radius: 4px;
}

.contact-modal-content::-webkit-scrollbar-thumb:hover {
    background: #004477;
}

/* ========================================
   MODAL HEADER
   ======================================== */

.contact-modal-header {
    padding: 55px 55px 40px;
    border-bottom: 2px solid #E0E7EF;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
}

.contact-modal-header h2 {
    margin: 0 0 12px 0;
    font-size: 38px;
    color: #005596;
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.contact-modal-header p {
    margin: 0;
    color: #6c757d;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
    max-width: 650px;
}

/* ========================================
   CLOSE BUTTON
   ======================================== */

.contact-modal-close {
    position: absolute;
    top: 28px;
    right: 28px;
    background: transparent;
    border: none;
    font-size: 38px;
    cursor: pointer;
    color: #6c757d;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    font-weight: 300;
    line-height: 1;
}

.contact-modal-close:hover {
    background: rgba(0, 85, 150, 0.1);
    color: #005596;
    transform: rotate(90deg) scale(1.08);
}

.contact-modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* ========================================
   FORM CONTAINER & LAYOUT
   ======================================== */

.contact-form {
    padding: 50px 55px 55px;
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 11px;
    font-weight: 600;
    color: #005596;
    font-size: 16px;
    letter-spacing: -0.2px;
}

/* ========================================
   FORM INPUTS
   ======================================== */

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 17px 22px;
    border: 2px solid #E0E7EF;
    border-radius: 12px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #f8f9fa;
    color: #212529;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #4597D3;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #005596;
    box-shadow: 0 0 0 4px rgba(0, 85, 150, 0.12);
    background: white;
}

/* Reset select background on hover/focus to prevent multiple arrows */
.form-group select:hover,
.form-group select:focus {
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23005596' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.7;
    font-family: inherit;
}

/* Custom Select Dropdown */
.form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23005596' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}



/* ========================================
   SUBMIT BUTTON
   ======================================== */

.form-actions {
    margin-top: 38px;
}

.btn-submit {
    width: 100%;
    padding: 19px 36px;
    background: linear-gradient(135deg, #005596 0%, #4597D3 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 25px rgba(0, 85, 150, 0.25);
    text-transform: none;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #004477 0%, #005596 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 85, 150, 0.35);
}

.btn-submit:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-submit:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 85, 150, 0.3);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: inline-block;
}

.btn-spinner {
    display: none;
}

/* ========================================
   SPINNER ANIMATION
   ======================================== */

.spinner {
    animation: spin 0.7s linear infinite;
    width: 26px;
    height: 26px;
}

.spinner circle {
    stroke: white;
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.5));
}

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

/* ========================================
   FORM MESSAGES (Success/Error)
   ======================================== */

.form-message {
    margin-top: 28px;
    padding: 20px 26px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1.6;
}

.form-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #e8f5e9 100%);
    color: #155724;
    border: 2px solid #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
}

.form-message.success::before {
    content: '✓ ';
    font-weight: 700;
    font-size: 20px;
    margin-right: 4px;
}

.form-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #ffebee 100%);
    color: #721c24;
    border: 2px solid #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.15);
}

.form-message.error::before {
    content: '⚠ ';
    font-weight: 700;
    font-size: 20px;
    margin-right: 4px;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .contact-modal.active {
        padding: 15px;
    }
    
    .contact-modal-content {
        width: 100%;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .contact-modal-header {
        padding: 45px 35px 30px;
        border-radius: 16px 16px 0 0;
    }
    
    .contact-modal-header h2 {
        font-size: 30px;
    }
    
    .contact-modal-header p {
        font-size: 17px;
    }
    
    .contact-form {
        padding: 35px 35px 40px;
    }
    
    .form-group {
        margin-bottom: 28px;
    }
    
    .form-group label {
        font-size: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .btn-submit {
        padding: 17px 32px;
        font-size: 18px;
    }
    
    .contact-modal-close {
        top: 23px;
        right: 23px;
        width: 44px;
        height: 44px;
        font-size: 34px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .contact-modal.active {
        padding: 10px;
    }
    
    .contact-modal-content {
        border-radius: 14px;
        max-height: 96vh;
    }
    
    .contact-modal-header {
        padding: 35px 28px 25px;
        border-radius: 14px 14px 0 0;
    }
    
    .contact-modal-header h2 {
        font-size: 26px;
        letter-spacing: -0.5px;
    }
    
    .contact-modal-header p {
        font-size: 16px;
    }
    
    .contact-form {
        padding: 30px 28px 35px;
    }
    
    .form-group {
        margin-bottom: 24px;
    }
    
    .form-group label {
        font-size: 15px;
        margin-bottom: 9px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 18px;
        font-size: 16px;
    }
    
    .form-group textarea {
        min-height: 130px;
    }
    
    .btn-submit {
        padding: 16px 28px;
        font-size: 17px;
    }
    
    .contact-modal-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
    
    .form-message {
        padding: 18px 22px;
        font-size: 15px;
    }
}

/* ========================================
   CONTACT PAGE STYLES (Full Page)
   ======================================== */

.contact-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.contact-page-header {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    margin-bottom: 60px;
    border: 2px solid #E0E7EF;
}

.contact-page-header h1 {
    font-size: 48px;
    color: #005596;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: -1px;
}

.contact-page-subtitle {
    font-size: 20px;
    color: #6c757d;
    margin: 0;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.contact-page-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-info-card {
    background: white;
    padding: 35px;
    border-radius: 16px;
    border: 2px solid #E0E7EF;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 85, 150, 0.15);
    border-color: #4597D3;
}

.contact-info-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #005596 0%, #4597D3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px 0;
    color: white;
}

.contact-info-card h3 {
    color: #005596;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
}

.contact-info-card p {
    color: #6c757d;
    font-size: 17px;
    margin: 0;
    line-height: 1.6;
}

.contact-form-section {
    background: white;
    padding: 50px;
    border-radius: 20px;
    border: 2px solid #E0E7EF;
    box-shadow: 0 8px 30px rgba(0, 85, 150, 0.08);
}

.contact-form-section h2 {
    color: #005596;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 35px 0;
    letter-spacing: -0.5px;
}

/* Responsive for Contact Page */
@media (max-width: 1024px) {
    .contact-page-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-info-section {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact-info-card {
        flex: 1 1 calc(50% - 12.5px);
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .contact-page-header {
        padding: 45px 30px;
        margin-bottom: 45px;
    }
    
    .contact-page-header h1 {
        font-size: 36px;
    }
    
    .contact-page-subtitle {
        font-size: 18px;
    }
    
    .contact-info-section {
        flex-direction: column;
    }
    
    .contact-info-card {
        flex: 1 1 100%;
    }
    
    .contact-form-section {
        padding: 35px 30px;
    }
    
    .contact-form-section h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .contact-page-header {
        padding: 35px 25px;
        margin-bottom: 35px;
    }
    
    .contact-page-header h1 {
        font-size: 30px;
    }
    
    .contact-page-subtitle {
        font-size: 17px;
    }
    
    .contact-info-card {
        padding: 28px 25px;
    }
    
    .contact-form-section {
        padding: 30px 25px;
    }
    
    .contact-form-section h2 {
        font-size: 26px;
    }
}
