/* ============================================
   MODALS & WIDGETS
   - Image Gallery Modal
   - Calculator Modals
   - Toast Notifications
   - WhatsApp Float Button
   - Back to Top Button
   ============================================ */

/* ── Image Gallery Modal ───────────────────── */
.image-gallery-modal .modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-gallery-modal .modal-header {
    background: transparent;
    border-bottom: none;
    padding: 15px 20px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.image-gallery-modal .modal-body {
    padding: 0;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-gallery-modal .modal-close {
    color: #fff;
    opacity: 0.8;
    font-size: 1.8rem;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--dur-fast) var(--ease);
}

.image-gallery-modal .modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.gallery-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    justify-content: center;
    align-items: center;
    animation: fadeEffect 0.5s;
}

.gallery-slide.active {
    display: flex;
}

.gallery-slide img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
}

.gallery-caption {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: var(--text-md);
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    font-weight: var(--weight-medium);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 30px;
    z-index: 5;
}

.gallery-nav-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur) var(--ease);
}

.gallery-nav-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-primary);
}

.gallery-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 30px;
    z-index: 5;
}

.gallery-thumbnail {
    width: 60px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-xs);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    opacity: 0.6;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(234, 69, 38, 0.4);
}

.gallery-thumbnail:hover {
    opacity: 1;
    border-color: #fff;
}

/* ── Calculator Modals ─────────────────────── */
.modal-calculator,
.modal-calcumate {
    overflow: hidden;
}

.modal-calculator .modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-calculator .modal-header {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: #fff;
    border: none;
    padding: 20px 30px;
}

.modal-calculator .modal-title,
.modal-calcumate .modal-title {
    font-weight: var(--weight-bold);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-xl);
    font-family: var(--font-primary);
}

.modal-calculator .modal-title i,
.modal-calcumate .modal-title i {
    font-size: 1.5rem;
}

.modal-calculator .modal-close,
.modal-calcumate .modal-close {
    color: #fff;
    opacity: 0.8;
    font-size: 1.8rem;
    transition: all var(--dur-fast) var(--ease);
    background: transparent;
    border: none;
    font-weight: 300;
    padding: 0;
    margin: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-calculator .modal-close:hover,
.modal-calcumate .modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-calcumate .modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    height: 100vh;
}

.modal-calcumate .modal-header {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 20px 30px;
}

.modal-calcumate .modal-body {
    height: calc(100vh - 70px);
    overflow: hidden;
    padding: 0 !important;
}

.modal-calcumate {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
}

.modal-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
}

.modal-fullscreen .modal-content {
    height: 100vh;
    border: 0;
    border-radius: 0;
}

/* ── Toast Notifications ───────────────────── */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    min-width: 320px;
    max-width: 400px;
    background-color: var(--surface);
    color: var(--gray-800);
    border-radius: var(--border-radius-lg);
    padding: 16px 18px 16px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(40px) scale(0.96);
    opacity: 0;
    transition: opacity 0.35s var(--ease-out),
                transform 0.35s var(--ease-out);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10),
                0 1px 4px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

/* Accent bar */
.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

.toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-md);
    background-color: var(--primary-50);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: var(--weight-bold);
    margin-bottom: 2px;
    color: var(--gray-900);
    font-size: var(--text-sm);
}

.toast-message {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.toast-close {
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 12px;
    padding: 5px;
    transition: all var(--dur-fast) var(--ease);
    border-radius: var(--border-radius-sm);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

/* ── WhatsApp Float ────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    color: #fff;
    border-radius: var(--border-radius-full);
    font-size: 24px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: all var(--dur) var(--ease), bottom 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.whatsapp-float i {
    margin-top: 0;
}

/* ── Back to Top ───────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--dur) var(--ease);
    border: none;
    box-shadow: var(--shadow-primary);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary-lg);
    border-radius: 50%;
