/* ============================================
   AUTH MODAL OVERLAY - EMBEDDED IN HOME PAGE
   ============================================ */

:root {
    --primary-blue: #0F6BF1;
    --primary-dark: #0F172A;
    --secondary-dark: #1a2847;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B9D4;
    --text-muted: #7a8ab0;
    --border-color: rgba(255, 255, 255, 0.08);
    --error-red: #EF4444;
    --success-green: #10B981;

    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 25px 80px rgba(0, 0, 0, 0.4);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MODAL OVERLAY BACKDROP
   ============================================ */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    pointer-events: none;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   MODAL CONTAINER & CARD
   ============================================ */

.auth-modal-container {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.auth-modal-container.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.auth-modal-card {
    background: linear-gradient(135deg, rgba(19, 29, 46, 0.9) 0%, rgba(26, 40, 71, 0.75) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 0 50px rgba(15, 107, 241, 0.25),
        0 30px 100px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(6, 182, 212, 0.15);
    animation: modalCardSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 10;
}

.auth-modal-container:not(.active) .auth-modal-card {
    animation: none;
}

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

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    border-radius: 8px;
    line-height: 1;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.1);
}

.auth-modal-close:active {
    transform: scale(0.95);
}

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

.auth-modal-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: logoGlow 0.6s ease-out;
}

.auth-modal-logo svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 20px rgba(15, 107, 241, 0.4));
}

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

.auth-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-modal-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   ALERTS
   ============================================ */

.auth-modal-alert {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.auth-modal-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #FECACA;
}

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

/* ============================================
   FORM VISIBILITY
   ============================================ */

.auth-modal-form {
    display: none;
    animation: formFade 0.3s ease-out;
}

.auth-modal-form.active {
    display: block;
}

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

/* ============================================
   FORM FIELDS
   ============================================ */

.auth-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-group input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.auth-form-group input::placeholder {
    color: var(--text-muted);
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(15, 107, 241, 0.08);
    box-shadow:
        0 0 0 3px rgba(15, 107, 241, 0.15),
        inset 0 0 20px rgba(15, 107, 241, 0.05);
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */

.auth-password-strength {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.auth-strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.auth-strength-bar.weak {
    background: linear-gradient(90deg, #EF4444, #FCA5A5);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.auth-strength-bar.medium {
    background: linear-gradient(90deg, #F59E0B, #FCD34D);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.auth-strength-bar.strong {
    background: linear-gradient(90deg, #10B981, #A7F3D0);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.auth-strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ============================================
   CHECKBOXES
   ============================================ */

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    margin: 0.5rem 0;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.auth-checkbox span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

/* ============================================
   BUTTONS
   ============================================ */

.auth-button {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e7bff 100%);
    color: var(--text-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    box-shadow: 0 8px 24px rgba(15, 107, 241, 0.3);
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 107, 241, 0.4);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   FORM OPTIONS
   ============================================ */

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0;
}

.auth-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0;
    font-family: inherit;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: #1e7bff;
    text-decoration: underline;
}

/* ============================================
   DIVIDER
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider::before {
    margin-right: 1rem;
}

.auth-divider::after {
    margin-left: 1rem;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.auth-social {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-social-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 100%;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.auth-social-btn svg {
    width: 20px;
    height: 20px;
}

.auth-social-btn:hover {
    background: rgba(15, 107, 241, 0.1);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 107, 241, 0.2);
}

.auth-social-btn:active {
    transform: translateY(0);
}

/* ============================================
   FOOTER
   ============================================ */

.auth-modal-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.auth-modal-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

@keyframes modalCardSlide {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes logoGlow {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.auth-button:focus-visible,
.auth-link:focus-visible,
.auth-social-btn:focus-visible,
.auth-modal-close:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

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

@media (max-width: 480px) {
    .auth-modal-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        max-width: 90vw;
    }

    .auth-modal-header h2 {
        font-size: 1.25rem;
    }

    .auth-modal-header p {
        font-size: 0.8rem;
    }

    .auth-button {
        padding: 11px 20px;
        font-size: 0.9rem;
    }

    .auth-modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
    }

    .auth-form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-form-options .auth-link {
        align-self: flex-end;
    }

    .enquiry-modal {
        padding: 1.25rem 1rem;
        max-width: 90vw;
        width: 90vw;
        max-height: 80vh;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-header p {
        font-size: 0.8rem;
    }

    .enquiry-form .form-group {
        margin-bottom: 0.6rem;
    }

    .enquiry-form input,
    .enquiry-form select {
        font-size: 0.85rem;
        padding: 0.6rem 0.7rem;
    }

    .enquiry-form .checkbox label {
        font-size: 0.8rem;
    }

    .enquiry-form .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }
}

/* ============================================
   ENQUIRY MODAL STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

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

.enquiry-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(19, 29, 46, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1000;
    max-height: 90vh;
    overflow: hidden !important;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.modal-overlay.active .enquiry-modal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #B0B9D4;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 8px;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    transform: scale(1.1);
}

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

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.modal-header p {
    font-size: 0.95rem;
    color: #B0B9D4;
    line-height: 1.5;
}

.enquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.enquiry-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.enquiry-form input::placeholder,
.enquiry-form select::placeholder,
.enquiry-form textarea::placeholder {
    color: #7a8ab0;
}

.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus {
    outline: none;
    border-color: #0F6BF1;
    background: rgba(15, 107, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(15, 107, 241, 0.15);
}

.enquiry-form .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.enquiry-form .checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0F6BF1;
    flex-shrink: 0;
}

.enquiry-form .checkbox label {
    font-size: 0.9rem;
    color: #B0B9D4;
    cursor: pointer;
    line-height: 1.4;
}

.enquiry-form .btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: linear-gradient(135deg, #0F6BF1 0%, #1e7bff 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(15, 107, 241, 0.3);
    margin-top: 0.5rem;
}

.enquiry-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 107, 241, 0.4);
}

.enquiry-form .btn:active {
    transform: translateY(0);
}

.modal-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: #B0B9D4;
}

.modal-footer .link {
    color: #0F6BF1;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-footer .link:hover {
    color: #1e7bff;
    text-decoration: underline;
}
