@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800;900&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - International Gold & White */
    --primary-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 50%, #B38728 100%);
    --primary-color: #D4AF37;
    --primary-dark: #B38728;
    --secondary-color: #c9a227;
    --surface-white: #ffffff;
    --bg-color: #fafafa;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(212, 175, 55, 0.2);
    --glass-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    
    --text-color: #1a1a1a;
    --text-muted: #777777;
    --white: #ffffff;
    --border-color: rgba(212, 175, 55, 0.15);
    
    --shadow-premium: 0 12px 50px rgba(0,0,0,0.04);
    --shadow-hover: 0 25px 60px rgba(0,0,0,0.08);
    --border-radius-lg: 0px; 
    --border-radius-md: 8px;
    --border-radius-sm: 4px;
    
    --navbar-height: 90px;
    --site-scale: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(212, 175, 55, 0.03) 0px, transparent 50%);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 0.95rem;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

h1, h2, h3, h4, .brand-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Header Navbar - Glassmorphism */
header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    flex-direction: column;
    display: flex;
    transition: all 0.3s ease;
}

.top-header {
    background: var(--primary-gradient);
    width: 100%;
    padding: 0.4rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.bottom-header {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    background: #fff;
}

.navbar {
    width: 100%;
    margin: 0;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Base Buttons - Premium Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    box-shadow: 0 10px 20px rgba(179, 135, 40, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(179, 135, 40, 0.25);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f8f8f8;
    transform: translateY(-1px);
}

/* Layout - Antigravity Grid */
#app-container {
    width: 100% !important;
    max-width: none !important;
    margin: 90px 0 0 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
    gap: 0 !important;
    min-height: 80vh;
}

/* Sidebar Styling */
.sidebar-left {
    position: sticky;
    top: 90px;
    width: 240px !important;
    flex-shrink: 0 !important;
    height: fit-content;
    min-height: calc(100vh - 90px);
    background: var(--primary-gradient);
    padding: 20px 15px;
    border-radius: 0;
    box-shadow: 10px 0 30px rgba(0,0,0,0.05);
    z-index: 50;
}

.sidebar-right {
    position: sticky;
    top: 90px;
    width: 280px !important;
    flex-shrink: 0 !important;
    height: fit-content;
    min-height: calc(100vh - 90px);
    padding: 20px 15px;
    background: #fff;
    border-left: 1px solid var(--border-color);
}

.side-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.side-nav li a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
}

.side-nav li a i {
    margin-right: 10px;
    font-size: 1rem;
}

.side-nav li a:hover, .side-nav li a.active {
    background: #1a1a1a;
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transform: translateX(5px);
}

.card, .post-card, .form-container {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.card:hover, .post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.06);
    border-color: var(--primary-color);
}

.widget {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
}

.widget h3 {
    font-size: 1.05rem !important;
    margin-top: 0;
    margin-bottom: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.widget p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
}

.widget a {
    font-size: 0.85rem !important;
}

/* Post Styling */
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.avatar {
    width: 52px;
    height: 52px;
    background: var(--primary-gradient);
    color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-right: 15px;
    box-shadow: 0 8px 20px rgba(179, 135, 40, 0.1);
}

.post-meta-info {
    flex: 1;
}

.post-author {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-badge {
    background: rgba(212, 175, 55, 0.08);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: 0px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-content {
    color: #444;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Counselor Card */
.counselor-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.counselor-avatar {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-premium);
}

/* Forms - Premium */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: #fcfcfc;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(121, 40, 202, 0.1);
}

/* Hero Section (for Sliders) */
.hero-slider {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 4rem;
}

.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.slide-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    max-width: 600px;
}

.slide-content h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.slide-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive */
@media (max-width: 1200px) {
    #app-container {
        grid-template-columns: 240px 1fr;
    }
    .sidebar-right { display: none; }
}

@media (max-width: 900px) {
    #app-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    .sidebar-left { display: none; }
    .navbar { padding: 0 1rem; }
}

/* Admin Dashboard Specifics */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-premium);
    text-align: center;
}

.stat-card h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 5px;
}

footer {
    clear: both !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
    z-index: 100;
}

.main-feed {
    flex-grow: 1 !important;
    width: auto !important;
    padding: 40px;
    min-height: 100vh;
}

/* Bottom Navbar Styling & Classes */
.bottom-navbar {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.bottom-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 250px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-radius: 4px;
    border-top: 3px solid var(--primary-color);
    z-index: 100;
    margin-top: 10px;
    padding: 10px 0;
}

/* Featured Decoration Grid */
.featured-decoration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 4rem;
    padding: 0 15px;
}

/* Hide Mobile Elements Utility */
.hide-mobile {
    display: inline;
}

/* Mobile Responsiveness Styles */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .bottom-navbar {
        justify-content: space-between !important;
        padding: 0 10px !important;
    }
    
    .bottom-navbar .nav-actions {
        width: 100%;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    
    /* Ensure explore menu is visible and not cut off on mobile */
    .main-menu-dropdown {
        left: 0 !important;
        right: auto !important;
        min-width: 260px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        margin-top: 5px !important;
    }
    
    /* Make buttons and toggle a bit more compact on mobile to fit perfectly */
    .bottom-navbar .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.7rem !important;
    }
    
    .bottom-navbar #menu-toggle {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Reduce vertical padding in feed content to fit mobile screen nicely */
    .main-feed {
        padding: 20px 10px !important;
    }
    
    .content-page-header {
        margin-bottom: 2rem !important;
    }
    
    .content-page-header h1 {
        font-size: 2.2rem !important;
    }
    
    /* Featured Decoration Grid mobile fallback */
    .featured-decoration-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Hero slider adjustment on mobile */
    .hero-slide {
        height: 380px !important;
    }
    .hero-slide img {
        height: 100% !important;
    }
    .hero-slide h2 {
        font-size: 1.2rem !important;
    }
    .hero-slide-wrapper {
        margin-bottom: 3rem !important;
    }
    #hero-prev, #hero-next {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.8rem !important;
    }
    
    /* Target the absolute positioned div for slider controls */
    .hero-slider-wrapper div[style*="left: 6rem"] {
        left: 2rem !important;
        bottom: 20px !important;
    }
}

@media (max-width: 480px) {
    .bottom-navbar .nav-actions {
        gap: 5px !important;
    }
    
    .bottom-navbar .btn {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.65rem !important;
    }
    
    .main-menu-dropdown {
        min-width: 240px !important;
    }
}

/* PWA iOS Install Modal Styles */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    padding: 20px;
    animation: pwaFadeIn 0.3s ease forwards;
}

.pwa-ios-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    padding: 30px 25px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    text-align: center;
    animation: pwaSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.pwa-ios-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.pwa-ios-modal-close:hover {
    color: #1a1a1a;
}

.pwa-ios-icon-wrapper {
    background: rgba(212, 175, 55, 0.08);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.pwa-ios-icon-wrapper i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.pwa-ios-modal-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.pwa-ios-modal-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 25px;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.pwa-ios-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pwa-ios-step .step-num {
    background: var(--primary-gradient);
    color: #1a1a1a;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(179,135,40,0.15);
}

.pwa-ios-step .step-text {
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
}

@keyframes pwaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    padding: 0 5px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #777;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 6px 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.mobile-nav-item i {
    font-size: 1.15rem;
    margin-bottom: 3px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--primary-dark);
}

.mobile-nav-item.active {
    color: var(--primary-dark);
    font-weight: 700;
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
    color: var(--primary-dark);
}

/* Center Highlighted Action Button (Ask) */
.mobile-nav-item.mobile-nav-action {
    position: relative;
    top: -12px;
}

.mobile-nav-item.mobile-nav-action .action-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(179, 135, 40, 0.35);
    border: 3px solid #ffffff;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-nav-item.mobile-nav-action .action-circle i {
    font-size: 1.25rem;
    margin-bottom: 0;
    color: #1a1a1a !important;
}

.mobile-nav-item.mobile-nav-action span {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 3px;
}

.mobile-nav-item.mobile-nav-action:active .action-circle {
    transform: scale(0.92);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }

    body {
        padding-bottom: 72px !important;
    }

    .whatsapp-float {
        bottom: 78px !important;
        right: 18px !important;
        width: 52px !important;
        height: 52px !important;
        font-size: 26px !important;
    }
}
