/* Component Styles */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), #e6a700);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* Contact Form Card */
.contact-form-card {
    background: var(--accent-color);
    color: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(214, 158, 46, 0.1), rgba(45, 90, 160, 0.1));
    z-index: -1;
}

.form-title {
    text-align: center;
    color: var(--gray-100);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

.form-subtitle {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: 0.9rem;
    color: var(--gray-200);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"] {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--white);
    color: black;
}

.contact-form input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.1);
}

.radio-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: inherit;
}

.radio-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.radio-option input[type="radio"] {
    margin: 0;
}

.radio-option span {
    font-size: 0.9rem;
}

/* Tabs */
.tabs {
    margin-top: var(--spacing-2xl);
}

.tab-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
    justify-content: center;   /* Căn giữa các nút theo chiều ngang */
    flex-wrap: wrap;   
}

.tab-button {
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
    
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.modal-description {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xl);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Success/Error Messages */
.message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.message-success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(56, 161, 105, 0.2);
}

.message-error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(229, 62, 62, 0.2);
}

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Focus Styles */
.focus-ring:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .floating-contact,
    .back-to-top,
    .modal {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-bg {
        display: none;
    }
    
    .hero-content {
        color: var(--gray-900);
    }
}


/* Form Select */
.form-select {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    font-size: 1rem;
    background: var(--white);
    color: var(--gray-700);
    transition: all var(--transition-normal);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    background-size: 1rem;
    padding-right: calc(var(--spacing-md) + 1.5rem);
}

.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.1);
    outline: none;
}

.form-select option {
    padding: var(--spacing-sm);
    background: var(--white);
    color: var(--gray-700);
}

/* Apartment Selector */
.apartment-selector {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.apartment-selector label {
    display: block;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.apartment-selector .form-select {
    max-width: 300px;
    margin: 0 auto;
}

/* Apartment Images */
.apartment-images {
    position: relative;
}

.apartment-image {
    display: none;
    animation: fadeIn 0.3s ease;
}

.apartment-image.active {
    display: block;
}

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

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group label {
    font-weight: 500;
    color: inherit;
    font-size: 0.9rem;
}

/* Form Select */
.form-select {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    font-size: 1rem;
    background: var(--white);
    color: var(--gray-700);
    transition: all var(--transition-normal);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    background-size: 1rem;
    padding-right: calc(var(--spacing-md) + 1.5rem);
}

.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.1);
    outline: none;
}

.form-select option {
    padding: var(--spacing-sm);
    background: var(--white);
    color: var(--gray-700);
}

.logo-img {
    height: 50px;
    width: auto;
}