/* =========================================================================
   Theme Presets & Global Variables (Fallback)
   ========================================================================= */
:root {
    --primary: #1A2980;
    --primary-dark: #0a1642;
    --accent: #26D0CE;
    --surface: #ffffff;
    --page-bg: #f8f9fa;
    --text: #212529;
    --header-bg: #1A2980;
    --header-text: #ffffff;
    --footer-bg: #1A2980;
    --footer-text: #ffffff;
    --brand-color: #ffffff;
    --menu-color: #ffffff;
    --header-gradient: linear-gradient(135deg, #1A2980, #26D0CE);
    --footer-gradient: linear-gradient(135deg, #1A2980, #26D0CE);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --border-radius: 0.75rem;
}

body {
    background: var(--page-bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

.site-navbar { 
    background-color: var(--header-bg) !important; 
    background-image: var(--header-gradient) !important;
    background-size: cover;
    box-shadow: var(--shadow-sm); 
    transition: var(--transition); 
}

.site-navbar .navbar-brand,
.site-navbar .nav-link { color: var(--header-text) !important; font-weight: 500; }
.site-navbar .nav-link { padding: 0.5rem 1rem; border-radius: 0.25rem; }
.site-navbar .nav-link:hover, .site-navbar .nav-link:focus { background: rgba(255,255,255,0.1); }
.site-navbar .navbar-toggler { border-color: rgba(255,255,255,.3); }
.site-navbar .navbar-toggler:focus { box-shadow: 0 0 0 0.25rem rgba(255,255,255,0.25); }
.site-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.site-navbar .dropdown-menu { border: none; box-shadow: var(--shadow-md); border-radius: 0.5rem; padding: 0.5rem; }
.site-navbar .dropdown-item { border-radius: 0.25rem; padding: 0.5rem 1rem; }

/* Navbar Logo */
.site-navbar .navbar-brand img {
    max-height: 40px;
    max-width: 200px;
    object-fit: contain;
}

.btn-primary, .btn-theme {
    background-color: var(--primary);
    background-image: var(--header-gradient);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.btn-primary:hover, .btn-theme:hover {
    background-color: var(--primary);
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    color: #ffffff;
}

.text-primary-theme { color: var(--primary) !important; }
.bg-primary-theme { background-color: var(--primary) !important; color:#fff; }

/* Footer */
.site-footer {
    flex-shrink: 0;
    background-color: var(--footer-bg) !important;
    background-image: var(--footer-gradient) !important;
    background-size: cover;
    color: var(--footer-text) !important;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}
.site-footer a {
    transition: var(--transition);
}
.site-footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* Footer Logo */
.site-footer img {
    max-height: 40px;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes black logos white for dark footers */
}

/* Social Media Icons */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition);
}
.social-icon:hover {
    background: var(--primary);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.whatsapp-float {
    position: fixed; bottom: 24px; z-index: 1050; display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem;
    border-radius: 50px; background: #25D366; color: #fff !important; text-decoration: none; font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4); transition: var(--transition);
}
.whatsapp-float.right { right: 24px; }
.whatsapp-float.left  { left: 24px; }
.whatsapp-float:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5); color:#fff; }
.whatsapp-float i { font-size: 1.5rem; }

@media (max-width: 575.98px) {
    .whatsapp-float { padding: 0.85rem; border-radius: 50%; bottom: 16px; right: 16px; }
    .whatsapp-float i { font-size: 1.75rem; }
}

/* Page Content */
.content-body h1 { font-size: 2.5rem; margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; line-height: 1.2; }
.content-body h2 { font-size: 2rem; margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; line-height: 1.3; }
.content-body h3 { font-size: 1.75rem; margin-top: 1.5rem; margin-bottom: 0.75rem; font-weight: 600; line-height: 1.4; }
.content-body h4 { font-size: 1.5rem; margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }
.content-body h5 { font-size: 1.25rem; margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }
.content-body h6 { font-size: 1rem; margin-top: 1rem; margin-bottom: 0.5rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.content-body p { margin-bottom: 1.25rem; line-height: 1.7; }
.content-body ul, .content-body ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.content-body li { margin-bottom: 0.5rem; }

.content-body span {
    font-family: inherit; 
    color: inherit;
}

.content-body [style*="text-align: center"], .content-body [style*="text-align:center"] { text-align: center !important; }
.content-body [style*="text-align: right"], .content-body [style*="text-align:right"] { text-align: right !important; }
.content-body [style*="text-align: justify"], .content-body [style*="text-align:justify"] { text-align: justify !important; }

.content-body img { max-width: 100%; height: auto; border-radius: 0.5rem; box-shadow: var(--shadow-sm); margin: 1rem 0; }
.content-body img[style*="float: left"], .content-body img[style*="float:left"] { margin: 0 1.5rem 1rem 0; max-width: 50%; }
.content-body img[style*="float: right"], .content-body img[style*="float:right"] { margin: 0 0 1rem 1.5rem; max-width: 50%; }
.content-body img[style*="margin-left: auto"], .content-body img[style*="margin-right: auto"] { display: block; margin-left: auto; margin-right: auto; box-shadow: var(--shadow-md); }
.content-body img[style*="width: 100%"], .content-body img[style*="width:100%"] { width: 100%; max-width: 100%; display: block; }

.content-body table { width: 100%; max-width: 100%; margin-bottom: 1.5rem; border-collapse: collapse; }
.content-body table th, .content-body table td { padding: 0.75rem; border: 1px solid #dee2e6; vertical-align: top; }
.content-body table th { background-color: #f8f9fa; font-weight: 600; }
.table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; margin-bottom: 1rem; }

.page-header {
    background-color: var(--header-bg);
    background-image: var(--header-gradient);
    background-size: cover;
    color: var(--header-text);
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 1.5rem 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.page-header h1 { font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0; }

.content-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
    margin-top: -3rem;
}

@media (max-width: 767.98px) {
    .content-card { padding: 1.5rem; }
    .page-header { padding: 3rem 0; margin-bottom: 2rem; }
}

/* Gallery */
.gallery-header {
    background-color: var(--header-bg); 
    background-image: var(--header-gradient); 
    background-size: cover;
    color: var(--header-text); 
    padding: 4rem 0; 
    margin-bottom: 0; 
    border-radius: 0 0 1.5rem 1.5rem; 
    box-shadow: var(--shadow-md);
}
.category-nav {
    position: sticky; top: 56px; z-index: 100; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
    padding: 1rem 0; border-bottom: 1px solid #eaeaea; margin-bottom: 2rem; overflow-x: auto; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav .container { display: flex; gap: 0.5rem; }
.category-nav .btn-pill { 
    border-radius: 50px; padding: 0.5rem 1.25rem; font-weight: 500; font-size: 0.95rem; border: 1px solid #dee2e6; 
    background: white; color: var(--text); transition: var(--transition); cursor: pointer; 
}
.category-nav .btn-pill:hover, .category-nav .btn-pill.active { 
    background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}
.album-section { margin-bottom: 4rem; scroll-margin-top: 140px; }
.album-title { font-weight: 700; margin-bottom: 0.25rem; }
.album-desc { color: #6c757d; max-width: 700px; font-size: 0.95rem; }
.modern-gallery-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 575.98px) { .modern-gallery-grid { grid-template-columns: 1fr; gap: 1rem; } }
.modern-gallery-item { 
    display: block; position: relative; overflow: hidden; border-radius: var(--border-radius); 
    aspect-ratio: 4/3; background: #e9ecef; box-shadow: var(--shadow-sm); transition: var(--transition); 
}
.modern-gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); z-index: 2; }
.modern-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.modern-gallery-item:hover img { transform: scale(1.06); }
.modern-gallery-item .overlay { 
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%); 
    opacity: 0; transition: opacity 0.3s ease; display: flex; align-items: flex-end; padding: 1.25rem; 
}
.modern-gallery-item:hover .overlay { opacity: 1; }
.modern-gallery-item .overlay-text { color: white; font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }

/* Mobile Fixes */
@media (max-width: 359.98px) {
    body { font-size: 0.95rem; }
    .site-navbar .navbar-brand { font-size: 1.1rem; }
    .container { padding-left: 12px; padding-right: 12px; }
    .gallery-header, .page-header { padding: 2rem 0; }
    .gallery-header h1, .page-header h1 { font-size: 2rem; }
}

/* =========================================================================
   Footer Custom Image (Powered By)
   ========================================================================= */
.footer-logo {
    height: 32px; /* Fixed height for text alignment */
    width: auto;  /* Allow width to grow based on aspect ratio */
    max-width: 160px;
    object-fit: contain;
    background: transparent !important;
    border-radius: 4px;
}

@media (max-width: 767.98px) {
    .footer-logo {
        height: 28px;
    }
}