/* Custom CSS for CHANDU Website */

/* Font Family */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Simplified Hero Animations */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Simplified Animation Classes */
.animate-hero-fade-in {
    animation: heroFadeIn 0.6s ease-out;
}

.animate-hero-slide-up {
    animation: heroSlideUp 0.5s ease-out;
}

.animate-hero-delay-1 {
    animation: heroSlideUp 0.5s ease-out 0.1s both;
}

.animate-hero-delay-2 {
    animation: heroSlideUp 0.5s ease-out 0.2s both;
}

.animate-hero-delay-3 {
    animation: heroSlideUp 0.5s ease-out 0.3s both;
}

.animate-hero-delay-4 {
    animation: heroSlideUp 0.5s ease-out 0.4s both;
}

.animate-hero-delay-5 {
    animation: heroSlideUp 0.5s ease-out 0.5s both;
}

.animate-hero-delay-6 {
    animation: heroSlideUp 0.5s ease-out 0.6s both;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Hero section enhancements */
.hero-content {
    position: relative;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, transparent 70%);
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

/* Navigation enhancements */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

/* Brand name styling */
.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #25D366;
}

/* Logo Rounded Styles */
.navbar img {
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.navbar img:hover {
    border-radius: 12px !important;
    transform: scale(1.05) !important;
}

/* More specific selectors for navbar logo */
nav.navbar img,
.navbar img[alt*="CHANDU"],
img[src*="logo.webp"] {
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

nav.navbar img:hover,
.navbar img[alt*="CHANDU"]:hover,
img[src*="logo.webp"]:hover {
    border-radius: 12px !important;
    transform: scale(1.05) !important;
}

/* Force navbar logo rounded corners */
nav img[alt="CHANDU Logo"],
nav img[src*="logo.webp"],
.flex.items-center img {
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

nav img[alt="CHANDU Logo"]:hover,
nav img[src*="logo.webp"]:hover,
.flex.items-center img:hover {
    border-radius: 12px !important;
    transform: scale(1.05) !important;
}

.hero-logo {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.hero-logo:hover {
    border-radius: 16px;
    transform: scale(1.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: black;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Contact card hover effects */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

/* Product card hover effects */
.hover\:shadow-xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* Responsive text sizing */
@media (max-width: 640px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-7xl {
        font-size: 3.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    /* Adjust brand name and logo for mobile */
    .navbar-brand {
        font-size: 1rem;
        margin-left: 0.5rem;
    }
    
    /* Adjust logo size for mobile */
    .navbar img {
        height: 2rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 0.875rem;
        margin-left: 0.25rem;
    }
    
    /* Adjust logo size for smaller mobile */
    .navbar img {
        height: 1.75rem;
    }
}

@media (max-width: 360px) {
    .navbar-brand {
        font-size: 0.75rem;
        margin-left: 0.25rem;
    }
    
    /* Adjust logo size for very small mobile */
    .navbar img {
        height: 1.5rem;
    }
}

/* Intersection Observer animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left-on-scroll {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.slide-in-left-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right-on-scroll {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.slide-in-right-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Button hover effects */
button, .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before, .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;
}

button:hover::before, .btn:hover::before {
    left: 100%;
}

/* Focus states for accessibility */
a:focus, button:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000 !important;
    }
    
    .text-gray-500 {
        color: #000 !important;
    }
    
    .text-gray-400 {
        color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Currently using light theme, but ready for dark mode if needed */
}

/* Custom utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WhatsApp Widget Styles */
.whatsapp-main-button {
    background: #25D366 !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1000 !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
    height: auto !important;
}

.whatsapp-main-button:hover {
    transform: translateX(0) translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4) !important;
    background: #128C7E !important;
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%) !important;
}

.whatsapp-main-button:active {
    transform: translateX(0) translateY(0) !important;
    background: #25D366 !important;
}

.whatsapp-text {
    white-space: nowrap !important;
    font-family: 'Inter', sans-serif !important;
    color: white !important;
    font-weight: 600 !important;
}

/* Ensure WhatsApp icon is white */
.whatsapp-main-button svg {
    fill: white !important;
    color: white !important;
}

/* Override any framework styles that might affect the button */
#whatsapp-main-btn,
#whatsapp-main-btn.whatsapp-main-button,
button#whatsapp-main-btn {
    background: #25D366 !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1000 !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
    height: auto !important;
}

#whatsapp-main-btn svg,
#whatsapp-main-btn.whatsapp-main-button svg,
button#whatsapp-main-btn svg {
    fill: white !important;
    color: white !important;
}

#whatsapp-main-btn span,
#whatsapp-main-btn.whatsapp-main-button span,
button#whatsapp-main-btn span {
    color: white !important;
    font-weight: 600 !important;
}

.whatsapp-menu {
    position: absolute !important;
    bottom: 80px !important;
    right: 0 !important;
    background: #1a1a1a !important;
    border-radius: 16px !important;
    padding: 20px !important;
    min-width: 280px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transform: translateY(10px) !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    z-index: 999 !important;
    display: block !important;
    visibility: hidden !important;
}

.whatsapp-menu:not(.hidden) {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.whatsapp-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.whatsapp-menu-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: white !important;
}

.whatsapp-close-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
    color: white !important;
}

.whatsapp-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.whatsapp-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.whatsapp-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    border: 1px solid transparent !important;
    background: transparent !important;
}

.whatsapp-option:hover {
    background-color: rgba(37, 211, 102, 0.1) !important;
    border-color: rgba(37, 211, 102, 0.3) !important;
    transform: translateX(4px) !important;
    color: white !important;
}

.whatsapp-option-icon {
    width: 40px !important;
    height: 40px !important;
    background: #25D366 !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.whatsapp-option-content h4 {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: white !important;
}

.whatsapp-option-content p {
    margin: 0 !important;
    font-size: 12px !important;
    opacity: 0.8 !important;
    color: #d1d5db !important;
}

/* Ensure WhatsApp icons in menu are white */
.whatsapp-option-icon svg {
    fill: white !important;
    color: white !important;
}

/* Mobile responsiveness for WhatsApp widget */
@media (max-width: 640px) {
    .whatsapp-main-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-menu {
        min-width: 260px;
        right: -10px;
    }
    
    .whatsapp-option {
        padding: 10px;
    }
    
    .whatsapp-option-icon {
        width: 36px;
        height: 36px;
    }
}

/* Animation for WhatsApp button entrance */
@keyframes whatsappSlideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.whatsapp-main-button {
    animation: whatsappSlideIn 0.6s ease-out 1s both;
    animation-fill-mode: both;
}

/* Ensure button stays visible */
.whatsapp-main-button.animation-complete {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Pulse animation for WhatsApp button */
@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
        transform: translateX(0) scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
        transform: translateX(0) scale(1.05);
    }
}

.whatsapp-main-button.animate-pulse {
    animation: whatsappPulse 1s ease-in-out;
}

/* Custom Modal Styles */
#confirmation-modal {
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

#confirmation-modal.show {
    opacity: 1;
}

#confirmation-modal.show #modal-content {
    transform: scale(1);
    opacity: 1;
}

#confirmation-modal.hide {
    opacity: 0;
}

#confirmation-modal.hide #modal-content {
    transform: scale(0.95);
    opacity: 0;
}

/* Modal Icon Styles */
.modal-icon-grab {
    background: #00B14F;
}

.modal-icon-whatsapp {
    background: #25D366;
}

.modal-icon-default {
    background: #6B7280;
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes modalSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
}

.modal-show {
    animation: modalSlideIn 0.3s ease-out;
}

.modal-hide {
    animation: modalSlideOut 0.3s ease-out;
}

/* Mobile Modal Improvements */
@media (max-width: 640px) {
    #confirmation-modal {
        padding: 1rem;
    }
    
    #modal-content {
        max-width: calc(100vw - 2rem);
        margin: 0 1rem;
    }
    
    #modal-content .modal-show {
        animation: modalSlideInMobile 0.3s ease-out;
    }
    
    #modal-content .modal-hide {
        animation: modalSlideOutMobile 0.3s ease-out;
    }
}

@keyframes modalSlideInMobile {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes modalSlideOutMobile {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
}

/* Ensure modal is always visible on mobile */
@media (max-width: 640px) {
    #confirmation-modal.show {
        display: flex !important;
    }
    
    #confirmation-modal.hide {
        display: flex !important;
    }
}