
/* ============================================
   FULL COMPACT NAVIGATION HEADER
   Desktop: 32% smaller | Mobile: 40% smaller
   Site-wide Malayalam Font Support
   ============================================ */

/* Apply to all elements */
* {
    font-family: 'Anuphan', 'Manjari', -apple-system, BlinkMacSystemFont, 'Segoe UI', 
                 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
}

/* Body */
body {
    font-family: 'Anuphan', 'Manjari', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 400;
    line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Anuphan', 'Manjari', sans-serif !important;
    font-weight: 600;
}

/* Paragraphs and text */
p, span, div, a, button, input, textarea, select, label {
    font-family: 'Anuphan', 'Manjari', sans-serif !important;
}

/* Malayalam text - Use Manjari font (better for Malayalam) */
[lang="ml"],
.malayalam,
.name-ml,
.name_ml,
.description-ml,
.description_ml,
.title-ml,
.title_ml,
.content-ml,
.message-ml {
    font-family: 'Manjari', 'Anuphan', sans-serif !important;
    font-weight: 400;
}

/* Tables */
table, th, td {
    font-family: 'Anuphan', 'Manjari', sans-serif !important;
}

/* Navigation */
nav, .navbar, .nav-item, .menu-item {
    font-family: 'Anuphan', 'Manjari', sans-serif !important;
}

/* Cards */
.card, .card-title, .card-body, .card-text {
    font-family: 'Anuphan', 'Manjari', sans-serif !important;
}

/* Admin Panel */
.admin-panel, .dashboard, .sidebar {
    font-family: 'Anuphan', 'Manjari', sans-serif !important;
}

/* ==================== COMPACT HEADER STYLES (DESKTOP) ==================== */

/* Professional Temple Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* Top Header Bar - COMPACT */
.header-top {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    padding: 5px 0;  /* REDUCED from 8px */
    font-size: 11px;  /* REDUCED from 13px */
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;  /* REDUCED from 10px */
}

.header-contact {
    display: flex;
    gap: 12px;  /* REDUCED from 20px */
    align-items: center;
}

.header-contact a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s;
    font-size: 11px;  /* REDUCED from 13px */
}

.header-contact a:hover {
    opacity: 0.8;
}

.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-switcher a {
    color: white;
    text-decoration: none;
    padding: 3px 10px;  /* REDUCED from 4px 12px */
    border-radius: 4px;
    background: rgba(255,255,255,0.15);
    transition: all 0.3s;
    font-size: 11px;  /* REDUCED from 12px */
    font-weight: 600;
}

.lang-switcher a:hover {
    background: rgba(255,255,255,0.25);
}

.lang-switcher a.active {
    background: rgba(212, 175, 55, 0.9);
    font-weight: 700;
}

/* Main Header - COMPACT */
.main-header {
    background: white;
    padding: 8px 0;  /* REDUCED from 12px */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Section - COMPACT */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;  /* REDUCED from 15px */
    text-decoration: none;
    transition: transform 0.3s;
}

.site-logo:hover {
    transform: scale(1.02);
}

.logo-img {
    width: 55px;  /* REDUCED from 70px */
    height: 55px;  /* REDUCED from 70px */
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #D4AF37;  /* REDUCED from 3px */
    padding: 3px;  /* REDUCED from 5px */
    background: white;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Title Image - COMPACT */
.title-image {
    max-height: 40px;  /* REDUCED from 50px */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: opacity 0.3s;
    display: block;
}

.title-text-fallback {
    display: none;
    flex-direction: column;
}

.site-title {
    color: #8B0000;
    font-size: 16px;  /* REDUCED from 20px */
    font-weight: 700;
    font-family: 'Georgia', serif;
    line-height: 1.2;
    margin: 0;
}

.site-subtitle {
    color: #666;
    font-size: 10px;  /* REDUCED from 11px */
    margin-top: 2px;
    font-style: italic;
}

/* Mobile Menu Toggle - COMPACT */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border: none;
    padding: 8px 12px;  /* REDUCED from 10px 15px */
    font-size: 20px;  /* REDUCED from 22px */
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(139,0,0,0.3);
    flex-shrink: 0;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Navigation - COMPACT */
.main-nav {
    display: flex;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;  /* REDUCED from 3px */
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav > ul > li > a {
    display: block;
    padding: 8px 12px;  /* REDUCED from 10px 16px */
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;  /* REDUCED from 14px */
    transition: all 0.3s;
    border-radius: 6px;
    white-space: nowrap;
}

.main-nav > ul > li > a:hover {
    background: #FFF8F0;
    color: #8B0000;
}

/* Dropdown Styles - COMPACT */
.has-dropdown > a::after {
    content: ' ▼';
    font-size: 9px;
    margin-left: 4px;
    opacity: 0.7;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;  /* REDUCED from 220px */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 4px 0;  /* REDUCED from 6px */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 5px;  /* REDUCED from 8px */
    border: 2px solid #E8D5C4;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    padding: 10px 14px;  /* REDUCED from 12px 18px */
    color: #333;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;  /* REDUCED from 14px */
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: #FFF8F0;
    color: #8B0000;
}

.dropdown-icon {
    font-size: 16px;  /* REDUCED from 18px */
}

/* Donate Button - COMPACT */
.donate-btn {
    background: linear-gradient(135deg, #D4AF37 0%, #F4C430 100%) !important;
    color: #8B0000 !important;
    padding: 8px 16px !important;  /* REDUCED from 10px 20px */
    font-weight: 700 !important;
    font-size: 13px !important;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4) !important;
}

.donate-btn:hover {
    background: linear-gradient(135deg, #F4C430 0%, #D4AF37 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5) !important;
}

/* ==================== TABLET/MOBILE RESPONSIVE ==================== */

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-nav > ul > li > a {
        padding: 14px 18px;
        border-radius: 0;
        font-size: 15px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #FFF8F0;
        margin: 0;
        padding: 0;
        display: none;
        border: none;
    }
    
    .has-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .has-dropdown > a::after {
        float: right;
        transition: transform 0.3s;
    }
    
    .has-dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    .dropdown-menu a {
        padding: 12px 18px 12px 35px;
        font-size: 14px;
    }
}

/* ==================== MOBILE COMPACT - WHITE AREA SMALLER ==================== */

@media (max-width: 768px) {
    /* Red top bar - compact */
    .header-top {
        font-size: 10px;
        padding: 5px 0;  /* Compact */
    }
    
    .header-top .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 0 10px;
    }
    
    .header-contact {
        display: flex;
        flex-direction: column;
        gap: 3px;  /* Tighter */
        align-items: flex-start;
        flex: 1;
    }
    
    .header-contact a {
        font-size: 10px;
        white-space: nowrap;
    }
    
    .lang-switcher {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
    }
    
    .lang-switcher a {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    /* WHITE HEADER AREA - MUCH MORE COMPACT (KEY FIX!) */
    .main-header {
        padding: 5px 0 !important;  /* REDUCED from 12px - This makes white area smaller! */
    }
    
    .header-content {
        padding: 0 10px;
    }
    
    /* Logo - smaller on mobile */
    .logo-img {
        width: 42px !important;   /* REDUCED from 55px */
        height: 42px !important;  /* REDUCED from 55px */
        padding: 2px !important;
        border: 2px solid #D4AF37 !important;
    }
    
    /* Title image - smaller */
    .title-image {
        max-height: 35px !important;  /* REDUCED from 50px */
    }
    
    /* Logo container - tighter spacing */
    .site-logo {
        gap: 8px !important;  /* REDUCED from 15px */
    }
    
    /* Hamburger button - smaller */
    .mobile-menu-toggle {
        padding: 7px 10px !important;
        font-size: 18px !important;
    }
    
    /* Fallback text */
    .site-title {
        font-size: 13px !important;
    }
    
    .site-subtitle {
        font-size: 9px !important;
    }
}

/* Small Mobile - Even More Compact */
@media (max-width: 480px) {
    .header-top {
        padding: 4px 0;
        font-size: 9px;
    }
    
    .header-top .container {
        padding: 0 8px;
        gap: 6px;
    }
    
    .header-contact {
        gap: 2px;
    }
    
    .header-contact a {
        font-size: 9px;
    }
    
    .lang-switcher a {
        padding: 3px 8px;
        font-size: 9px;
    }
    
    /* WHITE AREA - ULTRA COMPACT */
    .main-header {
        padding: 4px 0 !important;
    }
    
    .header-content {
        padding: 0 8px;
    }
    
    .logo-img {
        width: 38px !important;
        height: 38px !important;
        padding: 2px !important;
    }
    
    .title-image {
        max-height: 32px !important;
    }
    
    .site-logo {
        gap: 6px !important;
    }
    
    .mobile-menu-toggle {
        padding: 6px 9px !important;
        font-size: 17px !important;
    }
    
    .site-title {
        font-size: 12px !important;
    }
    
    .site-subtitle {
        display: none;
    }
}

/* Very Small Mobile - Minimal */
@media (max-width: 360px) {
    .header-top {
        padding: 3px 0;
        font-size: 8px;
    }
    
    .header-top .container {
        padding: 0 6px;
        gap: 5px;
    }
    
    .header-contact a {
        font-size: 8px;
    }
    
    .lang-switcher a {
        padding: 3px 7px;
        font-size: 8px;
    }
    
    /* WHITE AREA - MINIMAL */
    .main-header {
        padding: 3px 0 !important;
    }
    
    .header-content {
        padding: 0 6px;
    }
    
    .logo-img {
        width: 35px !important;
        height: 35px !important;
        padding: 1px !important;
    }
    
    .title-image {
        max-height: 28px !important;
    }
    
    .site-logo {
        gap: 5px !important;
    }
    
    .mobile-menu-toggle {
        padding: 5px 8px !important;
        font-size: 16px !important;
    }
}

/* Landscape Mobile Fix */
@media (max-height: 500px) and (orientation: landscape) {
    .header-top {
        padding: 3px 0;
    }
    
    .main-header {
        padding: 4px 0 !important;
    }
    
    .logo-img {
        width: 38px !important;
        height: 38px !important;
    }
    
    .title-image {
        max-height: 30px !important;
    }
}
