/* Layout adjustments for sticky header and footer */
html, body {
    height: 100%;
    background-color: white;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

/* Sticky header */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030; /* Bootstrap's navbar z-index */
}

/* Main content should grow to fill available space */
main {
    flex: 1;
    min-height: 0; /* Allow flex item to shrink below content size */
}

/* Fixed footer that always stays at bottom */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1020;
}

/* Footer styling with reduced padding */
footer {
    padding-top: 0.5rem !important; /* Reduced from py-4 (1.5rem) */
    padding-bottom: 0.5rem !important; /* Reduced from py-4 (1.5rem) */
}

footer p {
    margin-bottom: 0 !important;
}

/* Add padding to main content to prevent overlap with fixed footer */
main div.container {
    padding-bottom: 70px; /* Reduced from 120px due to smaller footer */
}

/* Floating Contact Button Styles */
.floating-contact {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    /* Periodic pulse animation to attract attention */
    animation: contactPulse 2s ease-in-out infinite;
    animation-delay: 3s; /* Start animation after 3 seconds */
}

.contact-btn:hover {
    background: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: none; /* Pause animation on hover */
}

.contact-btn.active {
    background: #dc3545;
    transform: rotate(45deg);
    animation: none; /* Pause animation when active */
}

.contact-options {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    animation: slideUp 0.3s ease;
}

.contact-options.show {
    display: flex;
}

.contact-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-option:hover {
    transform: scale(1.1);
    text-decoration: none;
    color: white;
}

.contact-option.phone {
    background: #007bff;
}

.contact-option.phone:hover {
    background: #0056b3;
}

.contact-option.whatsapp-call {
    background: #25d366;
}

.contact-option.whatsapp-call:hover {
    background: #128c7e;
}

.contact-option.whatsapp-chat {
    background: #25d366;
}

.contact-option.whatsapp-chat:hover {
    background: #128c7e;
}

.contact-option-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.contact-option:hover .contact-option-tooltip {
    opacity: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for contact button to attract attention */
@keyframes contactPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.25);
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6), 0 0 20px rgba(37, 211, 102, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-contact {
        bottom: 15px;
        right: 15px;
    }
    
    .contact-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .contact-options {
        bottom: 60px;
    }
    
    .contact-option {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}