/* ================================
   Mobile Call Button (Fixed)
================================ */

/* Show only on mobile */
.mobile-call-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

/* Dual Call Buttons Container */
.dual-call-buttons {
    display: flex;
    gap: 0;
    width: 100%;
    pointer-events: auto;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

/* Call Button Base */
.call-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 16px 12px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    border: none;
    outline: none;
}

.call-btn:hover {
    transform: translateY(-2px);
}

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

/* Phone Call Button */
.call-btn-phone {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    gap: 12px;
}

.call-btn-phone:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Consultation Button */
.call-btn-consultation {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.call-btn-consultation:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Call Button Icon */
.call-btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: phoneRing 2s infinite;
    flex-shrink: 0;
}

.call-btn-icon svg {
    width: 22px;
    height: 22px;
}

/* Call Button Content */
.call-btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
}

.call-btn-phone .call-btn-content {
    align-items: flex-start;
}

.call-btn-consultation .call-btn-content {
    align-items: center;
    text-align: center;
}

.call-btn-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.call-btn-number {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    direction: ltr;
}

.call-btn-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Pulse Animation for Phone Button */
.call-btn-pulse {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
    pointer-events: none;
}

.call-btn-pulse.pulse-2 {
    animation-delay: 1s;
}

/* Shine Effect for Consultation Button */
.call-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
    pointer-events: none;
}

/* Floating Action Button */
.floating-actions {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 10000;
    pointer-events: auto;
}

/* FAB Toggle Button */
.fab-toggle {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fab-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.fab-toggle.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* FAB Icon (Hamburger) */
.fab-icon {
    width: 24px;
    height: 18px;
    position: relative;
}

.fab-icon .line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.line-1 { top: 0; }
.line-2 { top: 8px; }
.line-3 { top: 16px; }

.fab-toggle.active .line-1 {
    transform: rotate(45deg);
    top: 8px;
}

.fab-toggle.active .line-2 {
    opacity: 0;
}

.fab-toggle.active .line-3 {
    transform: rotate(-45deg);
    top: 8px;
}

/* FAB Menu */
.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* FAB Items */
.fab-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    transform: scale(0);
    animation: fabItemIn 0.3s ease forwards;
}

.fab-item:nth-child(1) { animation-delay: 0.1s; }
.fab-item:nth-child(2) { animation-delay: 0.2s; }
.fab-item:nth-child(3) { animation-delay: 0.3s; }
.fab-item:nth-child(4) { animation-delay: 0.4s; }

.fab-item svg {
    width: 22px;
    height: 22px;
}

.fab-item:hover {
    transform: scale(1.15);
}

/* FAB Item Colors */
.fab-call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.fab-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.fab-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005577 100%);
}

.fab-form {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Tooltips */
.fab-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.fab-item:hover::before {
    opacity: 1;
    visibility: visible;
}

/* FAB Overlay */
.fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

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

/* Call Popup - Update tel links */
.call-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.call-popup.show {
    opacity: 1;
    visibility: visible;
}

.call-popup-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.call-popup.show .call-popup-content {
    transform: scale(1);
}

.call-popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.call-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.call-popup-header {
    margin-bottom: 25px;
}

.call-popup-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #ffffff;
}

.call-popup-icon svg {
    width: 28px;
    height: 28px;
}

.call-popup-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.call-popup-header p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.call-popup-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.call-popup-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.call-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.call-btn-secondary {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff;
}

.call-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.call-popup-btn svg {
    width: 18px;
    height: 18px;
}

.call-popup-features {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.popup-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.popup-feature svg {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* ================================
   Animations
================================ */

@keyframes phoneRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
}

@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes fabItemIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* ================================
   Mobile Only
================================ */
@media (max-width: 768px) {
    .mobile-call-button {
        display: block;
    }

    /* Hide desktop back to top on mobile */
    .back-to-top {
        display: none;
    }
}

@media (max-width: 480px) {
    .call-btn {
        padding: 14px 8px;
    }

    .call-btn-icon {
        width: 36px;
        height: 36px;
    }

    .call-btn-text {
        font-size: 0.9rem;
    }

    .call-btn-number {
        font-size: 0.75rem;
    }

    .call-btn-subtitle {
        font-size: 0.75rem;
    }

    .floating-actions {
        bottom: 100px;
        right: 15px;
    }

    .fab-toggle {
        width: 52px;
        height: 52px;
    }

    .call-popup-content {
        padding: 25px 20px;
    }

    .call-popup-actions {
        flex-direction: column;
    }

    .call-popup-features {
        flex-direction: column;
        gap: 10px;
    }
}
