/* ==========================================================================
   PATANKAR VIVAH SANSTHA - MODERN MOBILE & DESKTOP STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #c82333;
    --primary-dark: #a71d2a;
    --primary-light: #fbebee;
    --accent-color: #25d366;
    --text-main: #2d3748;
    --text-muted: #718096;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --bottom-bar-height: 64px;
}

/* Base & Global Typography */
html, body {
    font-family: 'Mukta', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: #f7fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 56px;
    padding-bottom: calc(var(--bottom-bar-height) + 16px);
}

/* Mobile Input Zoom Fix (iOS Safari won't zoom if font >= 16px) */
@media (max-width: 768px) {
    input, select, textarea, .form-control {
        font-size: 16px !important;
    }
}

/* Touch targets: at least 44px for accessibility */
button, .btn, .nav-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Top Navigation Bar */
.navbar.fixed-top {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%) !important;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* App-Style Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-bar-height);
    background: #ffffff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    border-top: 1px solid #edf2f7;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    list-style: none;
}

.mobile-bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.15s ease;
    min-height: 52px;
}

.mobile-bottom-nav .nav-link i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    line-height: 1;
}

.mobile-bottom-nav .nav-link.active,
.mobile-bottom-nav .nav-link:hover {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-link.whatsapp-link {
    color: #25d366;
}

/* Floating WhatsApp Action Button */
.whatsapp-fab {
    position: fixed;
    bottom: calc(var(--bottom-bar-height) + 14px);
    right: 16px;
    width: 52px;
    height: 52px;
    background: #25d366;
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    z-index: 1035;
    text-decoration: none !important;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.whatsapp-fab:hover, .whatsapp-fab:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Responsive Hero Carousel */
.carousel {
    margin-bottom: 0;
    overflow: hidden;
}

.carousel-item {
    height: 38vw;
    min-height: 240px;
    max-height: 480px;
    background-color: #000;
}

.carousel-item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-caption {
    bottom: 2rem;
    z-index: 10;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--radius-md);
    backdrop-filter: blur(4px);
    max-width: 90%;
    margin: 0 auto;
    left: 5%;
    right: 5%;
}

.carousel-caption h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.carousel-caption h4 {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .carousel-caption h1 {
        font-size: 2.3rem;
    }
    .carousel-caption h4 {
        font-size: 1.2rem;
    }
}

/* Quick Search Card on Mobile */
.quick-search-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
    margin-top: -30px;
    position: relative;
    z-index: 20;
    border: 1px solid var(--border-color);
}

/* 2-Column Mobile Profile Grid Cards */
.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 12px 10px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.profile-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.profile-avatar-wrapper {
    position: relative;
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
}

.profile-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.profile-card .profile-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
    line-height: 1.2;
}

.profile-card .profile-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.35;
    flex-grow: 1;
}

.profile-card .btn-view {
    width: 100%;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 6px 8px;
}

/* Profile Details Specs View (view_profile.php & dashboard) */
.specs-list {
    display: flex;
    flex-direction: column;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.95rem;
}

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

.spec-label {
    width: 42%;
    color: var(--text-muted);
    font-weight: 500;
}

.spec-value {
    width: 58%;
    color: var(--text-main);
    font-weight: 600;
}

/* Animations */
@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.heartbeat-text {
    animation: heartbeat 1.5s infinite;
    color: #c82333;
}

/* Page Header & Container Spacing: Remove massive gap under fixed navbar */
body > .jumbotron,
.jumbotron.mt-5,
.jumbotron {
    margin-top: 0 !important;
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
    background-color: transparent !important;
}

@media (max-width: 768px) {
    body > .jumbotron,
    .jumbotron.mt-5,
    .jumbotron {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
        padding-bottom: 1rem !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
}

/* Long-press Admin Login styles */
.admin-longpress-login {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    position: relative;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.admin-longpress-login.login-holding {
    opacity: 0.65;
    transform: scale(0.92);
}

/* PWA App Install Banner */
.pwa-banner {
    position: fixed;
    bottom: 66px;
    left: 12px;
    right: 12px;
    margin: 0 auto;
    max-width: 440px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    z-index: 1050;
    animation: pwaSlideUp 0.35s ease-out;
}

@media (min-width: 768px) {
    .pwa-banner {
        bottom: 24px;
        right: 24px;
        left: auto;
        max-width: 380px;
    }
}

@keyframes pwaSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pwa-banner-text {
    flex-grow: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 0.95rem;
    color: #212529;
    line-height: 1.2;
}

.pwa-banner-text small {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.2;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-close-btn {
    background: transparent;
    border: none;
    font-size: 1.35rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}
.pwa-close-btn:hover {
    color: #333;
}


