/* ============================================
   DEVADARPAN - PREMIUM UI/UX DESIGN SYSTEM
   ============================================ */

:root {
    /* Brand Colors - Veda Mandir Theme */
    --primary: #8B0000;
    /* Deep maroon/dark red */
    --primary-hover: #6B0000;
    /* Darker maroon */
    --primary-light: #FFF0F0;
    /* Very light pink */
    --secondary: #FF8C00;
    /* Saffron/orange */
    --secondary-dark: #CC7000;
    /* Dark saffron */
    --accent: #FFD700;
    /* Gold */

    /* Card Background Colors */
    --accent-green: #2D5016;
    /* Dark green for deity cards */
    --accent-purple: #4B0082;
    /* Indigo for deity cards */
    --accent-blue: #00008B;
    /* Dark blue for deity cards */
    --accent-maroon: #800020;
    /* Burgundy for deity cards */
    --cream: #FFF8DC;
    /* Cream background */
    --beige: #F5E6D3;
    /* Beige for cards */
    --light-orange: #FFF4E6;
    /* Light orange section */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8B0000 0%, #6B0000 100%);
    --gradient-saffron: linear-gradient(135deg, #FF8C00 0%, #CC7000 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));

    /* Deity Card Gradients */
    --gradient-green: linear-gradient(135deg, #2D5016 0%, #4A7C2C 100%);
    --gradient-purple: linear-gradient(135deg, #4B0082 0%, #6A0DAD 100%);
    --gradient-blue: linear-gradient(135deg, #00008B 0%, #0000CD 100%);
    --gradient-maroon: linear-gradient(135deg, #800020 0%, #A52A2A 100%);

    /* Text Colors */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;

    /* Background Colors */
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --bg-dark: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Telugu', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Telugu text support */
.telugu-text {
    font-family: 'Noto Sans Telugu', sans-serif;
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform var(--transition-base);
}

.logo-container:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
    transition: transform var(--transition-base);
    filter: drop-shadow(0 2px 4px rgba(153, 27, 27, 0.2));
}

.logo-icon:hover {
    transform: rotate(360deg);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(153, 27, 27, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* ============================================
   LOGIN MODAL
   ============================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.login-modal {
    background: white;
    width: 90%;
    max-width: 440px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all var(--transition-base);
}

.modal-backdrop.show .login-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #ffffff, #fef2f2);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-lighter);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.btn-close:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.phone-input-wrapper {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.1);
}

.country-code {
    background: #f9fafb;
    padding: 0.875rem 1rem;
    border-right: 2px solid #e5e7eb;
    color: var(--text-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-input {
    border: none;
    padding: 0.875rem 1rem;
    width: 100%;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.otp-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
    color: var(--primary);
}

.otp-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.1);
    outline: none;
}

.otp-resend {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.otp-resend a {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.otp-resend a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.step-transition {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    nav {
        height: 70px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 1rem;
    }
}