/* ========================================
   KARMAVYAA — Global CSS
   Navbar, Footer, WhatsApp, Reset, Shared Variables
   ======================================== */

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4F46E5;
    --primary-light: #6366F1;
    --primary-dark: #4338CA;
    --indigo: #3730A3;
    --indigo-light: #818cf8;
    --blue: #3B82F6;
    --blue-light: #60A5FA;
    --cyan: #06B6D4;
    --purple: #8B5CF6;
    --orange: #F97316;
    --emerald: #10B981;
    --rose: #F43F5E;
    --amber: #F59E0B;

    --dark: #0F172A;
    --dark-surface: #1E293B;
    --dark-card: #1E1E1E;
    --services-bg: #050505;
    --brands-bg: #121212;

    --gray-600: #475569;
    --gray-500: #64748B;
    --gray-400: #94A3B8;
    --gray-300: #CBD5E1;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --gray-50: #F8FAFC;
    --white: #FFFFFF;
    --whatsapp: #25D366;
    --accent: #F4C430;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 20px;
    left: 40px;
    right: 40px;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15),
                inset 0 0 80px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    border-radius: 100px;
    transition: top 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    top: 12px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2),
                inset 0 0 80px rgba(255, 255, 255, 0.1);
}

.navbar .nav-links a,
.navbar .nav-dropdown > a {
    color: #2d2d2d;
}
.navbar .nav-links a:hover,
.navbar .nav-dropdown > a:hover {
    color: var(--primary);
}
.navbar .nav-links a.active {
    color: var(--primary);
}
.navbar .logo,
.navbar.scrolled .logo {
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-container {
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: var(--text-xl);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: #2d2d2d;
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

/* Resources Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-dropdown > a::after {
    display: none;
}

.dropdown-arrow {
    font-size: var(--text-xs);
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 12px 0;
    min-width: 180px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4),
                0 4px 6px -2px rgba(79, 70, 229, 0.2);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5),
                0 8px 10px -4px rgba(79, 70, 229, 0.3);
}

/* ========================================
   MOBILE HAMBURGER MENU
   ======================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #2d2d2d;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span:nth-child(1) { margin-bottom: 6px; }
.hamburger span:nth-child(3) { margin-top: 6px; }

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 100px 24px 40px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.mobile-menu-links li { width: 100%; }

.mobile-menu-links a {
    display: block;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: var(--text-lg);
    padding: 16px 24px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.mobile-dropdown { width: 100%; }

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    color: var(--dark);
    font-weight: 600;
    font-size: var(--text-lg);
    padding: 16px 24px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.mobile-dropdown-toggle:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.mobile-dropdown-toggle i {
    font-size: var(--text-xs);
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-toggle i { transform: rotate(180deg); }

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 12px;
    margin-top: 4px;
}

.mobile-dropdown.active .mobile-dropdown-menu { max-height: 300px; }

.mobile-dropdown-menu a {
    font-size: var(--text-md);
    padding: 14px 24px;
    color: var(--dark);
}

.mobile-dropdown-menu a:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.mobile-menu-cta {
    margin-top: 32px;
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--text-md);
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
}

body.menu-open { overflow: hidden; }

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: clamp(16px, 3vh, 32px);
    right: clamp(16px, 3vw, 32px);
    width: clamp(48px, 5vw, 60px);
    height: clamp(48px, 5vw, 60px);
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: clamp(22px, 2.5vw, 28px);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15);
}

@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6), 0 2px 8px rgba(0, 0, 0, 0.15); }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding-top: 200px;
    padding-bottom: 40px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-img {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 16px;
    transition: transform 0.2s, opacity 0.2s;
}

.footer-logo-img img {
    display: block;
    width: 110px;
    height: auto;
    background: linear-gradient(135deg, #ffffff 0%, #ffe4e6 100%);
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.footer-logo-img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.footer-tagline {
    font-size: var(--text-md);
    color: var(--gray-400);
    font-weight: 400;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column a {
    display: block;
    font-size: var(--text-base);
    color: var(--gray-400);
    text-decoration: none;
    margin-bottom: var(--space-3);
    transition: color 0.2s;
    font-weight: 300;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-social h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-social-icons {
    display: flex;
    gap: var(--space-3);
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    transition: all 0.2s;
}

.footer-social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.footer-bottom {
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: var(--text-base);
    color: var(--gray-500);
    font-weight: 400;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: var(--text-base);
    color: var(--gray-500);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--white);
}

/* ========================================
   RESPONSIVE — SHARED
   ======================================== */
@media (max-width: 1024px) {
    .hamburger { display: flex; }
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .navbar { top: 12px; border-radius: 60px; }
    .nav-container { padding: 8px 40px; gap: 16px; }
    .hamburger { width: 40px; height: 40px; padding: 6px; }
    .hamburger span { width: 22px; }

    .footer-container { padding: 0 40px; }
    .footer-main { display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
    .footer-brand { text-align: center; width: 100%; }
    .footer-tagline { text-align: center; max-width: 400px; margin: 0 auto; }
    .footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; width: 100%; max-width: 600px; text-align: center; }
    .footer-column { text-align: center; }
    .footer-social { text-align: center; width: 100%; }
    .footer-social-icons { justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .footer-legal { justify-content: center; }
}

@media (max-width: 768px) {
    .navbar { left: 16px; right: 16px; top: 10px; border-radius: 50px; }
    .logo { font-size: var(--text-lg); }
    .hamburger { width: 38px; height: 38px; padding: 6px; }
    .hamburger span { width: 20px; }
    .nav-container { padding: 8px 20px; }
    .footer { padding-top: 64px; padding-bottom: 32px; }
    .footer-container { padding: 0 24px; }
    .footer-main { display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
    .footer-brand { text-align: center; display: flex; flex-direction: column; align-items: center; width: 100%; }
    .footer-tagline { font-size: var(--text-sm); text-align: center; line-height: 1.6; max-width: 300px; }
    .footer-links { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) 20px; text-align: center; width: 100%; max-width: 320px; }
    .footer-column { text-align: center; }
    .footer-column h4 { font-size: var(--text-xs); margin-bottom: 14px; }
    .footer-column a { font-size: var(--text-sm); margin-bottom: 10px; }
    .footer-social { text-align: center; width: 100%; }
    .footer-social h4 { margin-bottom: var(--space-3); }
    .footer-social-icons { justify-content: center; gap: var(--space-2); }
    .footer-bottom { padding-top: 28px; flex-direction: column; gap: 14px; text-align: center; }
    .footer-bottom p { font-size: var(--text-xs); }
    .footer-legal { gap: 20px; justify-content: center; flex-wrap: wrap; }
    .footer-legal a { font-size: var(--text-xs); }
}

@media (max-width: 480px) {
    .navbar { left: 20px; right: 20px; }
    .footer { padding-top: 48px; }
    .footer-container { padding: 0 20px; }
    .footer-main { gap: var(--space-4); }
    .footer-links { grid-template-columns: 1fr; gap: 24px; max-width: 200px; }
    .footer-column h4 { margin-bottom: var(--space-3); }
    .footer-column a { margin-bottom: 8px; }
}

@media (max-width: 375px) {
    .navbar { left: 16px; right: 16px; }
    .nav-container { padding: 6px 10px; }
    .footer-container { padding: 0 16px; }
    .footer { padding-top: 48px; }
    .footer-links { grid-template-columns: 1fr; gap: 24px; max-width: 200px; }
    .footer-tagline { max-width: 250px; }
}

/* Widescreen navbar alignment */
@media (min-width: 1281px) {
    .navbar {
        left: calc((100vw - 1280px) / 2 + clamp(16px, 3vw, 60px));
        right: calc((100vw - 1280px) / 2 + clamp(16px, 3vw, 60px));
        max-width: none;
        margin: 0;
    }
}

/* Landscape phones — mobile menu */
@media (orientation: landscape) and (max-height: 500px) {
    .mobile-menu { padding-top: 70px; padding-bottom: 20px; }
    .mobile-menu-links a,
    .mobile-dropdown-toggle { padding: 10px 20px; font-size: var(--text-md); }
    .mobile-menu-cta { margin-top: 16px; padding: 12px 24px; }
}
