/* Perfect Contact CSS - Always Visible X Button */

/* Floating Button */
.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--accent-color), #48b0c5);
    color: white;
    padding: 14px 20px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(85, 194, 218, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    animation: pulseFloat 3s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    outline: none;
}

.floating-contact-btn:hover {
    transform: translateY(-2px);
    animation: none;
    box-shadow: 0 10px 28px rgba(85, 194, 218, 0.45);
}

@keyframes pulseFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Modal Wrapper */
.contact-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.contact-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: -1;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    position: relative;
}

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

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

/* Split Layout */
.contact-split-container {
    display: flex;
    flex-wrap: wrap;
}

.contact-info-side {
    background: var(--primary-color, #2b2b2b);
    color: white;
    flex: 1 1 40%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-side h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.contact-info-side .highlight {
    color: var(--accent-color);
}

.contact-methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    color: #ffffff;
}

.contact-methods i {
    margin-right: 10px;
    color: var(--accent-color);
}

.contact-methods a {
    color: white;
}

.social-icons {
    display: flex;
    gap: 14px;
    margin-top: auto;
}

.social-icons a {
    color: var(--accent-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #fff;
}

.contact-form-side {
    flex: 1 1 60%;
    padding: 40px 30px;
    position: relative;
}

/* PERFECT: Always Visible X Button - Desktop and Mobile */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.4rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #666;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex !important; /* FORCE display */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000 !important; /* FORCE high z-index */
    font-weight: 300;
    line-height: 1;
    opacity: 1 !important; /* FORCE visibility */
    visibility: visible !important; /* FORCE visibility */
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: scale(1.1);
}

/* Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form-tags label {
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: #333;
}

#interestTags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#interestTags span {
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #f9f9f9;
    transition: background 0.2s, border-color 0.2s;
}

#interestTags span.selected {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
}

.send-btn {
    background: var(--accent-color);
    border: none;
    padding: 12px 20px;
    color: white;
    border-radius: 50px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-status {
    margin-top: 10px;
    padding: 10px;
    font-size: 0.9rem;
    border-radius: 8px;
    display: none;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.form-status.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* RESPONSIVE DESIGN WITH PERFECT X BUTTON */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 800px;
        margin: 20px;
    }

    .contact-info-side,
    .contact-form-side {
        padding: 35px 25px;
    }

    .contact-info-side h2 {
        font-size: 1.8rem;
    }

    /* X button adjustment for tablets */
    .close-btn {
        top: 15px !important;
        right: 15px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 1.3rem !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 1000 !important;
    }
}

@media (max-width: 768px) {
    .contact-modal {
        padding: 15px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .contact-split-container {
        flex-direction: column;
    }

    .contact-info-side {
        flex: none;
        background: var(--primary-color, #2b2b2b);
        padding: 30px 20px;
        min-height: auto;
    }

    .contact-info-side h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
        line-height: 1.2;
    }

    .contact-methods {
        gap: 10px;
        margin-bottom: 20px;
    }

    .contact-methods li {
        font-size: 0.9rem;
    }

    .contact-form-side {
        flex: none;
        padding: 25px 20px;
    }

    /* PERFECT: Mobile X button - Always visible */
    .close-btn {
        top: 15px !important;
        right: 15px !important;
        font-size: 1.2rem !important;
        background: rgba(255, 255, 255, 0.9) !important; /* LIGHT background for dark section */
        color: #333 !important; /* DARK text for contrast */
        width: 30px !important;
        height: 30px !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 1000 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }

    .close-btn:hover {
        background: rgba(255, 255, 255, 1) !important;
        color: #000 !important;
        transform: scale(1.1) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }

    .contact-form {
        gap: 18px;
    }

    .contact-form-tags label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    #interestTags {
        gap: 8px;
    }

    #interestTags span {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .send-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        border-radius: 25px;
        margin-top: 10px;
    }

    .floating-contact-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contact-modal {
        padding: 10px;
        padding-top: 20px;
    }

    .modal-content {
        border-radius: 12px;
        max-height: 95vh;
    }

    .contact-info-side {
        padding: 25px 15px;
    }

    .contact-info-side h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .contact-methods {
        gap: 8px;
        margin-bottom: 15px;
    }

    .contact-methods li {
        font-size: 0.85rem;
    }

    .contact-methods i {
        margin-right: 8px;
        font-size: 0.9rem;
    }

    .social-icons {
        gap: 12px;
    }

    .social-icons a {
        font-size: 1.1rem;
    }

    .contact-form-side {
        padding: 20px 15px;
    }

    /* PERFECT: Small mobile X button - Highly visible */
    .close-btn {
        top: 12px !important;
        right: 12px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 1.1rem !important;
        background: rgba(255, 255, 255, 0.95) !important;
        color: #333 !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 1000 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(0, 0, 0, 0.15) !important;
    }

    .contact-form {
        gap: 15px;
    }

    .contact-form-tags label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    #interestTags {
        gap: 6px;
    }

    #interestTags span {
        padding: 4px 10px;
        font-size: 0.75rem;
        border-radius: 15px;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 5px;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .send-btn {
        padding: 12px 18px;
        font-size: 0.85rem;
        border-radius: 20px;
        gap: 6px;
    }

    .form-status {
        font-size: 0.8rem;
        padding: 8px;
        border-radius: 6px;
    }

    .floating-contact-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        justify-content: center;
        font-size: 1.1rem;
    }

    .floating-contact-btn span {
        display: none;
    }

    .floating-contact-btn i {
        margin: 0;
    }
}