/* Google Fonts Import: Noto Serif Devanagari for Hindi, Outfit & Cinzel for English */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Noto+Serif+Devanagari:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-hindi: 'Noto Serif Devanagari', Georgia, serif;
    --font-english-body: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-english-heading: 'Cinzel', Georgia, serif;
    
    /* Universal Relative Font Scaling Units (rem, em, vw, clamp) */
    font-size: clamp(0.875rem, 0.8vw + 0.6rem, 1.125rem);
}

/* Universal Layout Lock & Overflow Prevention for All Devices */
html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    width: 100vw;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    overflow-x: hidden !important;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

*, ::before, ::after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Custom Text Selection Highlight - Rich Dark Purple Background with Spiritual Gold Text */
::selection {
    background-color: #3b0764 !important;
    color: #fef08a !important;
}

::-moz-selection {
    background-color: #3b0764 !important;
    color: #fef08a !important;
}

/* Global Font Application based on Language Attribute */
html[lang="hi"] body,
body {
    font-family: var(--font-hindi);
}

html[lang="en"] body {
    font-family: var(--font-english-body);
}

html[lang="en"] h1:not(.header-brand-title), 
html[lang="en"] h2, 
html[lang="en"] h3, 
html[lang="en"] h4,
html[lang="en"] .font-rozha {
    font-family: var(--font-english-heading);
}

html[lang="en"] p,
html[lang="en"] a,
html[lang="en"] span,
html[lang="en"] input,
html[lang="en"] textarea,
html[lang="en"] select,
html[lang="en"] button {
    font-family: var(--font-english-body);
}

.font-rozha {
    font-family: 'Noto Serif Devanagari', serif;
    font-weight: 700;
}

.font-hind {
    font-family: 'Noto Serif Devanagari', serif;
}

/* Devanagari Aware Font Utility Class */
html[lang="hi"] .font-lexend {
    font-family: 'Noto Serif Devanagari', serif;
}

html[lang="en"] .font-lexend {
    font-family: 'Outfit', sans-serif;
}

.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.font-cinzel {
    font-family: 'Cinzel', serif;
}

/* Header Specific Refined Brand Title Sizing */
.header-brand-title {
    font-size: clamp(0.9rem, 0.9vw + 0.45rem, 1.25rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    max-width: max-content !important;
    display: block !important;
}

html[lang="en"] .header-brand-title {
    font-size: clamp(0.85rem, 0.8vw + 0.4rem, 1.15rem) !important;
    font-family: var(--font-english-heading) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.header-brand-sub {
    font-size: clamp(0.625rem, 0.3vw + 0.45rem, 0.725rem) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    display: block !important;
}

.nav-link {
    position: relative;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    word-break: keep-all !important;
    flex-shrink: 0;
    font-size: clamp(0.775rem, 0.3vw + 0.675rem, 0.925rem) !important;
    padding: 0.35rem 0.5rem !important;
    border-radius: 0.5rem;
}

html[lang="en"] .nav-link {
    font-size: clamp(0.75rem, 0.28vw + 0.65rem, 0.875rem) !important;
    letter-spacing: 0.01em;
}

/* Dropdown Submenu Navigation Styles & Smooth Bridge */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: -0.5rem;
    min-width: 13.5rem;
    background: rgba(255, 251, 235, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(249, 115, 22, 0.35);
    border-radius: 0.875rem;
    box-shadow: 0 12px 30px -4px rgba(59, 7, 100, 0.25);
    padding: 0.5rem 0;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0);
}

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

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.15rem;
    font-size: clamp(0.825rem, 0.3vw + 0.7rem, 0.9rem);
    color: #3b0764;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(254, 215, 170, 0.7) 0%, rgba(254, 243, 199, 0.9) 100%);
    color: #be123c;
    padding-left: 1.35rem;
}

/* Dual Language Toggle Button Custom Styles & Hover Effects */
.lang-toggle-btn {
    font-size: clamp(0.75rem, 0.25vw + 0.65rem, 0.85rem) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    touch-action: manipulation;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(249, 115, 22, 0.5);
    color: #3b0764;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.12);
}

.lang-toggle-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #be123c 100%) !important;
    color: #fef08a !important;
    border-color: #ea580c !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35);
}

.lang-toggle-btn:hover svg {
    color: #fef08a !important;
    transform: rotate(15deg);
    transition: transform 0.3s ease;
}

/* Spiritual Action / Contact Button Custom Styles & Hover Effects */
.btn-jai-siyaram {
    font-size: clamp(0.75rem, 0.3vw + 0.65rem, 0.875rem) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    background: linear-gradient(135deg, #ea580c, #be123c, #581c87) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-jai-siyaram:hover {
    background: linear-gradient(135deg, #c2410c, #9f1239, #3b0764) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.55) !important;
}

.btn-jai-siyaram:hover img,
.btn-jai-siyaram:hover svg {
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

/* Fluid Responsive Typography Classes for Main Body & Hero Titles */
main h1, .hero-title-responsive {
    font-size: clamp(1.75rem, 4.5vw + 0.5rem, 3.75rem) !important;
    line-height: 1.25;
}

h2, .section-title-responsive {
    font-size: clamp(1.35rem, 3vw + 0.4rem, 2.5rem) !important;
    line-height: 1.3;
}

h3 {
    font-size: clamp(1.1rem, 2vw + 0.3rem, 1.75rem) !important;
    line-height: 1.35;
}

p, span, label {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Universal Full Width Responsive Section & Container */
.full-width-container {
    width: 100%;
    max-width: 100vw;
    padding-left: clamp(0.75rem, 3vw, 2.5rem);
    padding-right: clamp(0.75rem, 3vw, 2.5rem);
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Image & Video Scaling */
img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

/* Universal Touch Friendly Target Sizes for Mobile Devices */
button, a, input, select, textarea {
    touch-action: manipulation;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.1rem);
    padding: clamp(0.5rem, 1.2vw, 0.875rem) clamp(0.75rem, 1.5vw, 1.25rem);
    width: 100%;
    border-radius: 0.75rem;
}

/* No-Black Spiritual Background & Palette */
.spiritual-bg {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #fde68a 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Glassmorphism Header */
.glass-header {
    background: rgba(254, 243, 199, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(249, 115, 22, 0.25);
    width: 100%;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(249, 115, 22, 0.2);
    width: 100%;
}

/* Card Glow and Hover Effects */
.match-card-glow {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px -2px rgba(88, 28, 135, 0.08), 0 2px 6px -1px rgba(194, 65, 12, 0.06);
}

.match-card-glow:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(88, 28, 135, 0.18), 0 10px 15px -5px rgba(225, 29, 72, 0.12);
    border-color: rgba(225, 29, 72, 0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ea580c, #be123c);
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: #be123c;
    font-weight: 700;
}

/* Custom Filter Pills */
.filter-pill {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(249, 115, 22, 0.3);
    color: #3b0764;
    transition: all 0.25s ease;
    white-space: nowrap;
    padding: clamp(0.4rem, 1vw, 0.6rem) clamp(0.8rem, 2vw, 1.25rem);
    font-size: clamp(0.75rem, 0.8vw + 0.4rem, 0.95rem);
}

.filter-pill:hover,
.filter-pill.active {
    background: linear-gradient(135deg, #3b0764 0%, #881337 100%);
    color: #fef08a;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 7, 100, 0.25);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    background: rgba(46, 16, 101, 0.94);
    width: 100vw;
    height: 100vh;
}

.lightbox-modal.active {
    display: flex;
}

/* Badge Spiritual */
.badge-spiritual {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1.5px solid rgba(234, 88, 12, 0.4);
    color: #881337;
}

/* Page Banner */
.page-banner {
    background: linear-gradient(180deg, rgba(254, 243, 199, 0.6) 0%, rgba(253, 230, 138, 0.3) 100%);
    border-bottom: 2px solid rgba(249, 115, 22, 0.2);
    width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fef3c7;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ea580c, #881337);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b0764;
}

/* Media Queries for Ultra-Small Screens (<= 360px) */
@media (max-width: 360px) {
    .full-width-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .font-rozha {
        letter-spacing: -0.02em;
    }
}
