/* 
 * Paramananda Foundation - Custom Stylesheet
 * Custom CSS with Premium, Professional, Minimal, and Trustworthy Design
 */

/* Root Variables */
:root {
    --primary-color: #1565C0;
    --primary-hover: #0D47A1;
    --secondary-color: #2E7D32;
    --secondary-hover: #1B5E20;
    --accent-color: #FF9800;
    --accent-hover: #F57C00;
    --bg-color: #F8FAFC;
    --text-color: #263238;
    --text-muted: #546E7A;
    --card-bg: #FFFFFF;
    --light-bg: #F1F5F9;
    --border-color: #E2E8F0;
    
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout Constants */
    --border-radius-btn: 8px;
    --border-radius-card: 15px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 15px 35px rgba(21, 101, 192, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Reset & Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-color);
}

/* Preloader Settings */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-bg);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typography Helpers */
.text-primary-color { color: var(--primary-color) !important; }
.text-secondary-color { color: var(--secondary-color) !important; }
.text-accent-color { color: var(--accent-color) !important; }
.bg-primary-color { background-color: var(--primary-color) !important; }
.bg-secondary-color { background-color: var(--secondary-color) !important; }

/* Sticky Navbar Structure */
.header-wrapper {
    transition: var(--transition-smooth);
    z-index: 1030;
}

.navbar {
    transition: var(--transition-smooth);
    padding: 20px 0;
    background-color: transparent;
}

/* Header state on scroll */
.header-scrolled .navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 12px 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    padding: 8px 16px !important;
    position: relative;
    transition: var(--transition-smooth);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition-smooth);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 32px);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
}

/* Button Customizations */
.btn {
    border-radius: var(--border-radius-btn);
    font-weight: 500;
    padding: 10px 24px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(21, 101, 192, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-accent:hover, .btn-accent:focus {
    background-color: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

/* Custom Cards */
.card-custom {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-card);
    border: none;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-custom .card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-custom .card-img-wrapper img {
    transition: var(--transition-smooth);
}

.card-custom:hover .card-img-wrapper img {
    transform: scale(1.1);
}

/* Hero Section & Parallax Banner */
.hero-slider-container {
    height: 100vh;
    width: 100%;
}

.hero-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    color: #FFFFFF;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

/* Page Headers (Parallax feel) */
.page-header {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    padding: 120px 0 80px 0;
    color: #FFFFFF;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 101, 192, 0.85); /* Tinted with primary brand color */
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

/* Sections */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    position: relative;
    margin-bottom: 50px;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-title.text-start::after {
    left: 0;
    transform: none;
}

/* Statistics / Counter Section */
.counter-box {
    text-align: center;
    padding: 30px;
    border-radius: var(--border-radius-card);
    background-color: #FFFFFF;
    box-shadow: var(--shadow-soft);
}

.counter-val {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Footer Section */
footer {
    background-color: #1A252C;
    color: #B0BEC5;
    font-size: 0.95rem;
}

footer h5 {
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: 25px;
}

footer a {
    color: #B0BEC5;
    text-decoration: none;
    transition: var(--transition-smooth);
}

footer a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #263238;
}

/* Grid/Gallery Image Effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-card);
    margin-bottom: 30px;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 101, 192, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
    color: white;
    padding: 20px;
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item img {
    transition: var(--transition-smooth);
    width: 100%;
    height: auto;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* CSS Masonry Grid for Gallery */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
}

@media(max-width: 992px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media(max-width: 576px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* Partner Logo Grayscale Filter */
.partner-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    height: 100px;
}

.partner-logo-item img {
    max-width: 130px;
    max-height: 50px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.partner-logo-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Testimonial Quote Styling */
.testimonial-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-card);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    position: relative;
    border-bottom: 4px solid var(--secondary-color);
}

.testimonial-card::before {
    content: "\f10d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: rgba(46, 125, 50, 0.08);
}

/* --- Alert and Notification Overlap Fixes --- */
.alert {
    position: relative;
    z-index: 1010; /* Ensure standard alerts sit clearly within the stack */
    margin-top: 10px;
}

/* Floating top notification helper */
.alert-fixed-top {
    position: fixed;
    top: 90px; /* Positioned clearly below the 80px sticky navbar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050; /* Higher than navbar z-index (1020) */
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
}


