/* Custom styles for Guddu Telecom */

/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
}

/* Prevent layout shift */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Alpine.js cloak - hide elements until Alpine.js loads (if used elsewhere) */
[x-cloak] {
    display: none !important;
}

/* ===== Mobile menu dropdown animation ===== */
@keyframes mobileMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 767px) {
    nav #mobile-menu.is-open {
        animation: mobileMenuSlide 0.2s ease-out;
    }
}

/* Touch target for hamburger (min 44px) */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* ===== Navigation Styles ===== */
/* WordPress Menu Styles */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0;
}

/* Desktop Menu - Force horizontal layout */
@media (max-width: 767px) {
    nav ul.hidden {
        display: none !important;
    }
}

@media (min-width: 768px) {
    /* Show desktop menu */
    nav ul.hidden.md\:flex {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 1rem 0;
    }
    
    /* Hide mobile menu button on desktop */
    nav .md\:hidden {
        display: none !important;
    }
}

/* Mobile: show only the nav-mobile-bar, keep dropdown hidden */
@media (max-width: 767px) {
    nav .nav-mobile-bar {
        display: flex !important;
    }
    /* Dropdown stays hidden until JS adds .is-open */
    nav #mobile-menu {
        display: none !important;
    }
    nav #mobile-menu.is-open {
        display: block !important;
    }
}

/* Desktop Menu Links - Target all menu items */
nav ul.menu a,
nav ul a,
nav .menu-item > a,
nav li > a {
    position: relative;
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

/* Ensure desktop menu ul is flex */
@media (min-width: 768px) {
    nav ul.menu,
    nav ul.hidden.md\:flex {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 1rem 0;
    }
    
    nav ul.menu li,
    nav ul.hidden.md\:flex li {
        display: inline-block;
        margin: 0;
    }
}

/* Active/Current Menu Item States - Desktop */
nav ul.hidden.md\:flex .current-menu-item > a,
nav ul.hidden.md\:flex .current-page-item > a,
nav ul.hidden.md\:flex .current_page_parent > a,
nav ul.hidden.md\:flex a.active,
nav ul .current-menu-item > a,
nav ul .current-page-item > a {
    color: #c084fc !important; /* purple-400 */
}

/* Underline for active desktop menu items */
nav ul.hidden.md\:flex .current-menu-item > a::after,
nav ul.hidden.md\:flex .current-page-item > a::after,
nav ul.hidden.md\:flex .current_page_parent > a::after,
nav ul.hidden.md\:flex a.active::after,
nav ul .current-menu-item > a::after,
nav ul .current-page-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #c084fc, #818cf8);
    border-radius: 2px;
}

/* Mobile Menu Links – tap-friendly */
@media (max-width: 767px) {
    nav .mobile-menu-dropdown ul {
        padding: 0.5rem 0 1rem;
    }
    nav .mobile-menu-dropdown .menu-item a,
    nav .mobile-menu-dropdown a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        min-height: 44px;
        box-sizing: border-box;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
        color: #fff;
        -webkit-tap-highlight-color: transparent;
    }
}
nav .px-4.py-3 a,
nav .px-4.py-3 .menu-item > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white;
}

/* Active/Current Mobile Menu Item States */
nav .px-4.py-3 .current-menu-item > a,
nav .px-4.py-3 .current-page-item > a,
nav .px-4.py-3 .current_page_parent > a,
nav .px-4.py-3 a.active {
    color: #c084fc !important;
    background-color: rgba(192, 132, 252, 0.1);
    border-radius: 8px;
}

/* Hover states */
nav a:hover {
    color: #c084fc !important;
}

/* Menu item icons */
nav .menu-item a span[aria-hidden="true"],
nav a span[aria-hidden="true"] {
    font-size: 1.125rem;
    line-height: 1;
    display: inline-block;
}

/* Ensure menu items don't have bullets */
nav .menu-item {
    list-style: none;
}

/* Fix for WordPress menu structure */
nav ul.menu,
nav ul.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Container spacing */
nav .container {
    max-width: 1200px;
}

/* ===== Focus States for Accessibility ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c084fc;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #7c3aed;
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ===== Floating Contact Button ===== */
.floating-contact {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    font-size: 24px;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-btn-call {
    background: linear-gradient(135deg, #9333ea 0%, #6366f1 100%);
    color: white;
}

.floating-btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

/* Pulse animation for floating buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(147, 51, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
    }
}

.floating-btn-call {
    animation: pulse 2s infinite;
}

/* Hide floating buttons on larger screens (optional - remove if you want them always visible) */
@media (min-width: 768px) {
    .floating-contact {
        bottom: 30px;
        right: 30px;
    }
}

/* ===== Utility Classes ===== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom gradient background */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== Service Cards ===== */
.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* ===== Button Styles ===== */
.btn-primary {
    @apply bg-purple-600 text-white px-8 py-4 rounded-lg font-bold hover:bg-purple-700 transition duration-300 inline-block;
}

.btn-secondary {
    @apply bg-white text-purple-600 px-8 py-4 rounded-lg font-bold hover:scale-105 hover:shadow-xl transition duration-300 inline-block;
}

/* ===== Review Cards ===== */
.review-card {
    transition: all 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Rating stars */
.star-rating {
    color: #fbbf24;
}

/* Owner reply bubble */
.owner-reply {
    background-color: #faf5ff;
    border-left: 4px solid #9333ea;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* ===== Contact Cards ===== */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== Hero Section Mobile Image ===== */
.hero-image-mobile {
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .hero-image-mobile {
        max-height: none;
    }
}

/* ===== Image Lazy Loading Placeholder ===== */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Improved Touch Targets ===== */
@media (max-width: 768px) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Larger tap areas for mobile navigation */
    nav a, nav button {
        padding: 12px 16px;
    }
}
