/* ===================================================
   Veda Webtech — Custom Styles (Gold Primary Brand)
   Extends Tailwind CSS with animations & utilities
   =================================================== */

/* ---------- Smooth scroll & base ---------- */
html { scroll-behavior: smooth; }
body { line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', 'Inter', system-ui, sans-serif; line-height: 1.25; }

/* ---------- Unified Header & Navbar ---------- */
#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top bar collapse on scroll */
#top-bar {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 44px;
    overflow: hidden;
}
#main-header.scrolled #top-bar {
    max-height: 0;
    border-bottom-width: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Nav bar height and scroll styling */
#main-nav {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#main-nav > div > div {
    /* The flex row container */
    height: 80px;
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#main-header.scrolled #main-nav > div > div {
    height: 64px;
}
#main-header.scrolled #main-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px) saturate(2);
    -webkit-backdrop-filter: blur(40px) saturate(2);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.dark #main-header.scrolled #main-nav {
    background: rgba(5, 5, 5, 0.98);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logo sizing */
#nav-logo img {
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    height: 44px;
}
#main-header.scrolled #nav-logo img {
    height: 32px;
}

/* Mobile overrides */
@media (max-width: 1023px) {
    #top-bar { display: none !important; }
    #main-nav > div > div { height: 64px !important; }
    #nav-logo img { height: 32px !important; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 208, 63, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(244, 208, 63, 0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---------- Navigation Active State ---------- */
.nav-link.active, .mobile-nav-link.active {
    color: #D4B93C !important; /* gold-500 */
}
.nav-link.active {
    background: rgba(212, 185, 60, 0.05);
}
.dark .nav-link.active {
    background: rgba(212, 185, 60, 0.1);
}
.mobile-nav-link.active {
    background: rgba(212, 185, 60, 0.05);
    border-radius: 1rem;
}
.dark .mobile-nav-link.active {
    background: rgba(212, 185, 60, 0.1);
}
@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Animation utility classes */
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; }
.animate-fade-in-left { animation: fadeInLeft 0.8s ease-out forwards; opacity: 0; }
.animate-fade-in-right { animation: fadeInRight 0.8s ease-out forwards; opacity: 0; }
.animate-scale-in { animation: scaleIn 0.6s ease-out forwards; opacity: 0; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 6s ease infinite;
}
.animate-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2.5s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Card hover glow (Gold) ---------- */
.card-glow {
    position: relative;
    overflow: hidden;
}
.card-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(244,208,63,0), rgba(244,208,63,0.4), rgba(244,208,63,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s;
}
.card-glow:hover::before { opacity: 1; }

/* ---------- Text gradient (Gold → Teal) ---------- */
.text-gradient {
    background: linear-gradient(135deg, #F4D03F 0%, #D4B93C 40%, #4DB8A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fafafa; }
::-webkit-scrollbar-thumb { background: #D4B93C; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C49F1A; }

/* ---------- Form focus ring (Gold) ---------- */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.25);
    border-color: #F4D03F !important;
}

/* ---------- Selection color ---------- */
::selection {
    background: rgba(244, 208, 63, 0.3);
    color: #1A1A1A;
}

/* ---------- Service card line anim (Gold) ---------- */
.service-card-line { position: relative; }
.service-card-line::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background: linear-gradient(90deg, #F4D03F, #4DB8A8);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.service-card-line:hover::after { width: 100%; }

/* ---------- Marquee for partners ---------- */
.marquee-track {
    animation: marquee 30s linear infinite;
}
.marquee-track:hover {
    animation-play-state: paused;
}

/* ---------- WhatsApp FAB pulse ---------- */
#whatsapp-fab { animation: pulse-glow 2s ease-in-out infinite; }
#whatsapp-fab:hover { animation: none; }

/* ---------- Process timeline (Gold) ---------- */
.process-step {
    position: relative;
}
.process-step::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    left: 50%;
    width: calc(100% - 4rem);
    height: 2px;
    background: linear-gradient(90deg, #F4D03F, #FEF9E7);
    transform: translateX(50%);
}
.process-step:last-child::after { display: none; }

@media (max-width: 768px) {
    .process-step::after { display: none; }
}

/* ---------- Testimonial carousel ---------- */
.testimonial-slider {
    overflow: hidden;
}
.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}
.testimonial-slide {
    flex: 0 0 100%;
    padding: 0 1rem;
}
@media (min-width: 768px) {
    .testimonial-slide { flex: 0 0 50%; }
}
@media (min-width: 1024px) {
    .testimonial-slide { flex: 0 0 33.333%; }
}

/* ---------- Star rating ---------- */
.star-rating { color: #F4D03F; }

/* ---------- Image hover zoom ---------- */
.img-zoom {
    overflow: hidden;
    border-radius: 1rem;
}
.img-zoom img {
    transition: transform 0.7s ease;
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* ---------- Active nav highlight ---------- */
.nav-link-active {
    color: #1a1a1a;
    background: rgba(244, 208, 63, 0.1);
}

/* ---------- Marquee Animation ---------- */
.animate-marquee {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

/* ---------- Mega Menu Premium Transitions ---------- */
.group\/mega:hover .mega-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-panel {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%) translateY(10px);
}

/* Glassmorphism Refinement */
.mega-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(1.8);
    -webkit-backdrop-filter: blur(25px) saturate(1.8);
    border: 1px solid rgba(244, 208, 63, 0.1);
}

.dark .mega-glass {
    background: rgba(5, 5, 5, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom shadow for premium depth */
.mega-shadow {
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.15), 0 30px 60px -30px rgba(0, 0, 0, 0.2);
}

.dark .mega-shadow {
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6), 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}