.whatsapp-chat-icon,
.scroll-to-top {
    text-decoration: none !important;
}
@media (min-width: 992px) {
    .main-menu > li > a,
    .main-menu > li > a.active {
        color: #fff !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.45), 0 0 2px #222 !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em;
        transition: color 0.2s, text-shadow 0.2s;
    }
    .main-menu > li > a:hover,
    .main-menu > li > a.active:hover {
        color: #f6d634 !important;
        text-shadow: 0 4px 16px rgba(0,0,0,0.55), 0 0 2px #222 !important;
    }
}
body.register-page.dark-mode, body.payment-page.dark-mode {
    background-image: url('/static/main/images/bg-pattern.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: transparent !important;
}
html body.register-page.dark-mode,
html body.payment-page.dark-mode {
    background-image: url('/static/main/images/bg-pattern.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    /* background-color removed to allow image to show */
}
/* removed duplicate/incorrect dark mode background rules */
/* --- FINAL, SUPER-SPECIFIC OVERRIDE: Registration page must be pure white, no gradient, in light mode --- */
body.register-page, 
body.register-page .login-section, 
body.register-page .login-form-container, 
body.register-page .page-header {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    /* background-image: none !important; */
}
/* --- FINAL, SUPER-SPECIFIC OVERRIDE: Registration page must be pure white, no gradient, in light mode --- */
    background: #fff !important;
    background-color: #fff !important;
    /* background-image: none !important; */
}
/* --- FINAL OVERRIDE: Registration page must be pure white, no gradient, in light mode --- */
body.register-page {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
        /* background-image: none !important; */
}
body.register-page .login-section,
body.register-page .login-form-container,
body.register-page .page-header {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    /* background-image: none !important; */
}
body.register-page.dark-mode {
    /* background removed to allow image to show */
}
body.register-page.dark-mode .login-section,
body.register-page.dark-mode .login-form-container,
body.register-page.dark-mode .page-header {
    background: transparent !important;
    background-color: transparent !important;
}
/* --- FORCE REGISTRATION PAGE PURE WHITE BACKGROUND IN LIGHT MODE, NO GRADIENT OR IMAGE --- */
body.register-page:not(.dark-mode),
body.register-page:not(.dark-mode) .login-section,
body.register-page:not(.dark-mode) .login-form-container,
body.register-page:not(.dark-mode) .page-header {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--text-primary, #222) !important;
}
/* --- ABSOLUTE OVERRIDE: Registration page must be white in light mode --- */
body.register-page:not(.dark-mode),
body.register-page:not(.dark-mode) .login-section,
body.register-page:not(.dark-mode) .login-form-container,
body.register-page:not(.dark-mode) .page-header {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--text-primary, #222) !important;
}
/* --- ABSOLUTE OVERRIDE: Payment page must be white in light mode --- */
body.payment-page:not(.dark-mode),
body.payment-page:not(.dark-mode) .login-section,
body.payment-page:not(.dark-mode) .login-form-container,
body.payment-page:not(.dark-mode) .page-header {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--text-primary, #222) !important;
}
/* --- FORCE PAYMENT PAGE PURE WHITE BACKGROUND IN LIGHT MODE --- */
body.payment-page, body.payment-page .login-section, body.payment-page .login-form-container, body.payment-page .page-header {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
        /* background-image: none !important; */
}
body.payment-page.dark-mode, body.payment-page.dark-mode .login-section, body.payment-page.dark-mode .login-form-container, body.payment-page.dark-mode .page-header {
    background: transparent !important;
    background-color: transparent !important;
}
/* --- FORCE PAYMENT PAGE SOLID BACKGROUND, NO GRADIENT OR IMAGE --- */
body.payment-page, body.payment-page .login-section, body.payment-page .login-form-container, body.payment-page .page-header {
    background: #fff !important;
    background-image: none !important;
}
body.payment-page.dark-mode, body.payment-page.dark-mode .login-section, body.payment-page.dark-mode .login-form-container, body.payment-page.dark-mode .page-header {
    background: transparent !important;
}
/* Ensure post detail text and icons are visible in dark mode */
.post-detail-content,
.post-detail-content p,
.post-detail-content span,
.post-detail-content li,
.post-detail-content ul,
.post-detail-content ol,
.post-detail-content blockquote,
.post-detail-content pre,
.post-detail-content code,
.post-detail-meta,
.comments-section,
.comment-item,
.comment-form-container,
.post-actions-container,
.social-share-wrapper,
.social-icons-container {
    color: var(--text-primary) !important;
}
.post-detail-content i,
.post-detail-meta i,
.post-actions-container i,
.social-share-wrapper i,
.social-icons-container i {
    color: var(--primary) !important;
}
body.dark-mode .post-detail-content,
body.dark-mode .post-detail-content p,
body.dark-mode .post-detail-content span,
body.dark-mode .post-detail-content li,
body.dark_mode .post-detail-content ul,
body.dark_mode .post-detail-content ol,
body.dark_mode .post-detail-content blockquote,
body.dark_mode .post-detail-content pre,
body.dark_mode .post-detail-content code,
body.dark_mode .post-detail-meta,
body.dark_mode .comments-section,
body.dark_mode .comment-item,
body.dark_mode .comment-form-container,
body.dark_mode .post-actions-container,
body.dark_mode .social-share-wrapper,
body.dark_mode .social-icons-container {
    color: var(--text-primary) !important;
}
body.dark-mode .post-detail-content i,
body.dark-mode .post-detail-meta i,
body.dark-mode .post-actions-container i,
body.dark-mode .social-share-wrapper i,
body.dark-mode .social-icons-container i {
    color: var(--primary) !important;
}
/* Theme-aware blog post detail text */
.post-detail-content,
.post-detail-content p,
.post-detail-content span,
.post-detail-content li,
.post-detail-content ul,
.post-detail-content ol,
.post-detail-content blockquote,
.post-detail-content pre,
.post-detail-content code,
.post-detail-meta,
.comments-section,
.comment-item,
.comment-form-container,
.post-actions-container,
.social-share-wrapper,
.social-icons-container {
    color: var(--text-primary) !important;
}
body.dark-mode .post-detail-content,
body.dark-mode .post-detail-content p,
body.dark-mode .post-detail-content span,
body.dark-mode .post-detail-content li,
body.dark-mode .post-detail-content ul,
body.dark-mode .post-detail-content ol,
body.dark-mode .post-detail-content blockquote,
body.dark-mode .post-detail-content pre,
body.dark-mode .post-detail-content code,
body.dark-mode .post-detail-meta,
body.dark-mode .comments-section,
body.dark-mode .comment-item,
body.dark-mode .comment-form-container,
body.dark-mode .post-actions-container,
body.dark-mode .social-share-wrapper,
body.dark-mode .social-icons-container {
    color: var(--text-primary) !important;
}
/* Match blog page gradient background */
.about-gradient-bg {
    background: linear-gradient(90deg, #b3e0ff 0%, #c3a1e6 100%);
}

@media (max-width: 991px) {
    .about-gradient-bg {
        background: linear-gradient(180deg, #87ceeb 0%, #c3a1e6 100%);
    }
}
@media (max-width: 991px) {
    .about-gradient-bg {
        background: linear-gradient(180deg, #87ceeb 0%, #c3a1e6 100%);
    }
}
@media (max-width: 767px) {
    .get-started-gradient-bg .join-us-card {
        min-height: calc(100% - 60px) !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
}
@media (max-width: 767px) {
    .footer-wrapper {
        padding: 10px 0 4px !important;
    }
    .footer-widgets {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
}
@media (max-width: 991px) {
    .get-started-gradient-bg {
        background: linear-gradient(180deg, #c3a1e6 0%, #87ceeb 100%);
    }
}
@media (min-width: 992px) {
    .tabbed-section .tab-buttons {
        display: flex;
        gap: 24px;
        justify-content: center;
    }
    .tabbed-section .tab-buttons .tab-btn {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
        padding: 0.9rem 2.5rem;
        font-size: 1.15rem;
        text-align: center;
    }
}
@media (min-width: 992px) {
    .tabbed-section .tab-buttons .tab-btn {
        min-width: 180px;
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
    }
}
.learn-more-gradient-bg {
    background: linear-gradient(90deg, #b3e0ff 0%, #c3a1e6 100%);
}

@media (max-width: 991px) {
    .learn-more-gradient-bg {
        background: linear-gradient(180deg, #87ceeb 0%, #c3a1e6 100%);
    }
}
.light-theme .comments-section input[type="text"],
.light-theme .comments-section textarea {
    border: 2px solid #333 !important;
    background: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
    outline: none !important;
    z-index: 2;
}
.light-theme .comments-section input[type="text"],
.light-theme .comments-section textarea {
    border: 1.5px solid #bbb !important;
    background: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
}
.light-theme .comments-section input[type="text"],
.light-theme .comments-section textarea {
    border: 1.5px solid #bbb !important;
    background: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
}
@media (max-width: 768px) {
    .dark-theme .comments-section input[type="text"],
    .dark-theme .comments-section textarea {
        border: 1.5px solid #444 !important;
        background: #222 !important;
        color: #eee !important;
        box-shadow: none !important;
    }
}
@media (max-width: 768px) {
    .light-theme .comments-section input[type="text"],
    .light-theme .comments-section textarea {
        border: 1.5px solid #bbb !important;
        background: #fff !important;
        color: #222 !important;
        box-shadow: none !important;
    }
}
@media (max-width: 768px) {
    .comments-section {
        position: relative !important;
        top: -100px !important;
    }
}
@media (max-width: 768px) {
    .social-share-wrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .social-icons-container {
        position: static !important;
        right: unset !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        pointer-events: auto !important;
        opacity: 1 !important;
    }
    .share-main-btn {
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
    }
}
@media (max-width: 767px) {
    .back-btn-animated {
        margin-bottom: 20px !important;
    }
}
:root {
    /* Light Mode (Default) */
    --primary: #0D91D5;
    --primary-rgb: 13, 145, 213;
    --secondary: #D003C1;
    --secondary-rgb: 208, 3, 193;
    --accent: #F6D634;
    --bg-primary: #fff;
    --bg-primary-rgb: 255, 255, 255;
    --bg-secondary: #f9f9f9;
    --text-primary: #1a202c;
    --text-secondary: #555;
    --border-color: #eee;
    --shadow-color: rgba(0,0,0,0.1);
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
}

/* Global mobile centering and alignment fix */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body, main, section, .container, .dashboard-container {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    .row, .tutor-grid, .subjects-grid, .testimonial-slider, .team-section .row {
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    [class*="col-"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

body.dark-mode {
    /* Dark Mode */
    --primary: #15a1e0; /* Slightly brighter primary for dark bg */
    --primary-rgb: 21, 161, 224;
    --secondary: #e033d1;
    --secondary-rgb: 224, 51, 209;
    --accent: #F6D634;
    --bg-primary: #1a202c; /* Dark blue-gray */
    --bg-primary-rgb: 26, 32, 44;
    --bg-secondary: #2d3748; /* Slightly lighter dark */
    --bg-secondary-rgb: 45, 55, 72;
    --text-primary: #edf2f7; /* Light gray for text */
    --text-secondary: #a0aec0; /* Muted gray for secondary text */
    --border-color: #4a5568;
    --shadow-color: rgba(0,0,0,0.4);
}

html {
    overflow-x: hidden;
}


body {
    font-family: 'Baloo 2', cursive;
    background: #fff;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Product Detail Page: Sky Blue to Purple Gradient */
.product-detail-page {
    background: linear-gradient(135deg, #87ceeb 0%, #a259f7 100%) !important;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-secondary); /* Light grey */
    border-top: 5px solid var(--primary); /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotate-angle {
    to { --angle: 360deg; }
}

/* Header Styles */
header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, background-color 2s ease, box-shadow 0.3s ease;
    width: 100%;    
}

/* Frosty glass effect for header on pages with a background */
.has-page-background header {
    background-color: rgba(var(--bg-primary-rgb), 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--border-color), 0.2);
}


/* Scroll Progress Bar */
.progress-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
}
.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.1s linear;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.logo a {
    font-family: 'Baloo 2', cursive;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo img {
    max-height: 90px; /* Adjust this value to fit your logo's dimensions */
    transition: max-height 0.3s ease;
    width: auto;
}

/* Hide mobile-only menu items on desktop */
.mobile-only-btn {
    display: none;
}

/* GLOBAL HERO/NAV LINK STYLES */

.main-menu a {
    color: #181818 !important;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    font-size: 16px !important;
    font-weight: 600 !important;
}

body.dark-mode .main-menu a {
    color: #fff !important;
    text-shadow: 1px 1px 8px rgba(0,0,0,0.35), 0 2px 12px rgba(0,0,0,0.18);
    font-size: 16px !important;
    font-weight: 600 !important;
}

@media (max-width: 991px) {
    .main-menu a {
        font-size: 15px !important;
        font-weight: 500 !important;
        text-shadow: none !important;
    }
}

@media (min-width: 992px) {
    .main-menu a {
        font-size: 16.5px !important;
    }
    body.dark-mode .main-menu a {
        font-size: 16.5px !important;
    }
}
.main-menu a {
    position: relative;
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
    transition: color 0.3s ease;
    padding-bottom: 5px;
}

.main-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.main-menu a:hover, .main-menu a.active {
    color: var(--secondary);
}

.main-menu a:hover::after, .main-menu a.active::after {
    width: 100%;
}

.header-right-items .vs-btn {
    padding: 10px 25px;
    font-size: 14px;
}

/* Group header items for better layout */
.header-right-items {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between button and toggle */
}

/* Dark Mode Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 16px;
    padding: 1px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-switch:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    box-sizing: border-box;
    position: absolute;
    cursor: pointer;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background-color: var(--bg-secondary);
    border: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 8px;
}

.slider:before {
    position: absolute;
    content: "☀️";
    height: 14px;
    width: 14px;
    left: 1px;
    bottom: 2px;
    background-color: transparent;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

input:checked + .slider {
    background-color: var(--bg-secondary);
}

input:checked + .slider:before {
    transform: translateX(14px);
    content: "🌙";
}

.theme-switch:active {
    transform: scale(0.98);
}

/* Shrinking effect on scroll */
header.scrolled {
    box-shadow: 0 4px 12px var(--shadow-color);
    padding: 2px 0;
    background-color: rgba(var(--bg-primary-rgb), 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.scrolled .logo img {
    max-height: 55px;
}

/* General Responsive Adjustments */
/* For screens smaller than 992px (typical tablet breakpoint) */
@media (max-width: 991px) {
    .container { padding-left: 15px; padding-right: 15px; }
}

/* Dropdown Menu Styles */
.main-menu {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu li {
    position: relative;
}

.main-menu li a .fa-chevron-down {
    font-size: 0.7em;
    margin-left: 5px;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(var(--bg-primary-rgb), 0.35); /* Increased transparency */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 200px;
    box-shadow: 0 8px 16px var(--shadow-color);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}


.like-btn.liked .fa-heart {
    color: var(--primary); /* Use theme primary color for visibility in both modes */
}

.like-btn .like-count {
    transition: color 0.3s ease;
}

.like-btn.liked .like-count {
    color: var(--primary); /* Change color when liked */
}

/* --- Blog Post Like Button --- */
.post-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.post-like-btn:hover {
    color: var(--primary);
}

.post-like-btn .fa-heart {
    transition: transform 0.2s ease, color 0.2s ease;
}

.post-like-btn .fa-heart.liked {
    color: var(--primary);
    transform: scale(1.1);
}


/* --- Styles for Popular Posts Sidebar --- */
.widget-title {
    font-family: 'Baloo 2', cursive;
    font-size: 22px;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(var(--text-primary-rgb, 51, 51, 51), 0.1);
}

.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blog-card-small {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.blog-card-small:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-card-small-img-link {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
}

.blog-card-small-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card-small-img-link:hover .blog-card-small-img {
    transform: scale(1.1);
}

.blog-card-small-content {
    flex-grow: 1;
}

.blog-card-small-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.blog-card-small-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-small-title a:hover {
    color: var(--primary);
}

.blog-card-small .blog-meta {
    font-size: 12px; /* Smaller meta info for compact cards */
    margin-bottom: 0; /* Override default margin */
}


.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    width: 100%;
}

.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-primary);
    white-space: nowrap;
    margin: 0;
}

.sub-menu li a:hover {
    background-color: var(--bg-secondary);
    color: var(--secondary);
}

/* Ensure dropdown links are always dark, even on transparent header */
.home-page header .sub-menu li a {
    color: var(--text-primary);
}

/* ===================================================================
    Global Layout & Grid (Merged from home.css)
=================================================================== */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* New wider container that inherits from .container */
.container-wide {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}
@media (min-width: 1400px) {
    .container.container-wide, .container-wide { 
        max-width: 1400px; 
    }
    /* Override for 4-column layout inside a wide container */
    .container-wide .col-lg-4 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}
.container-fluid {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    /* Remove negative margins to use the modern gutter system */
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: calc(-.5 * var(--bs-gutter-x));
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* ===================================================================
    Global Button Styles (Merged from home.css)
=================================================================== */
.vs-btn {
    display: inline-block;
    background-color: rgba(var(--secondary-rgb), 0.8); /* Frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Baloo 2', cursive;
    transition: all 0.4s ease;
    text-align: center;
}

.vs-btn:hover {
    background-color: rgba(var(--primary-rgb), 0.9);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.vs-btn.style-1 {
    background-color: rgba(var(--secondary-rgb), 0.8);
}
.vs-btn.style-1:hover {
    background-color: rgba(var(--primary-rgb), 0.9);
}

/* Solid button variant for primary actions like 'Add to Cart' */
.vs-btn-solid {
    background-color: rgba(var(--secondary-rgb), 0.8); /* Use frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    color: #fff;
}

.vs-btn-solid:hover {
    background-color: rgba(var(--primary-rgb), 0.9); /* Use frosty glass effect on hover, increased color */
    transform: translateY(-3px); /* Keep consistent hover effect */
}

/* Slimmer button variant */
.vs-btn-slim {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Narrower button variant */
.vs-btn-narrow {
    padding: 15px 25px;
}

/* Combined slim and narrow variant */
.vs-btn-slim.vs-btn-narrow {
    padding: 10px 25px;
}

/* ===================================================================
    Global Section Styles (Merged from home.css)
=================================================================== */
.space-vertical-only {
    padding-top: 100px;
    padding-bottom: 100px;
}

@media (max-width: 767px) {
    .space-vertical-only {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* Global Grid Column Styles */
.col-12, .col-sm-6, .col-sm-12, .col-md-3, .col-md-4, .col-md-6, .col-md-12,
.col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-12,
.col-xl-3, .col-xl-4, .col-xl-6, .col-xl-12 {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    /* Apply horizontal gutter padding from Bootstrap's grid system */
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5);
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5);
    margin-top: var(--bs-gutter-y); /* Apply vertical gutter */
}

@media (min-width: 576px) {
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    .col-lg {
        flex-basis: 0;
        flex-grow: 1;
        max-width: 100%;
    }
}

@media (min-width: 1200px) {
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Original styles that are no longer used by the new header */
/*
header {
    background: var(--primary);
    color: #fff;
    padding: 1rem;
    border-radius: 0 0 30px 30px;
}

nav a:hover {
    color: var(--secondary);
}

.hero {
    background: var(--accent);
    color: var(--primary);
    padding: 2rem;
    border-radius: 30px;
    text-align: center;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    animation: fadeIn 1s;
}

.cta-btn {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-size: 1.2rem;
    margin-top: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.cta-btn:hover {
    background: var(--primary);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.subject-card {
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.subject-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    background: var(--secondary);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 2rem auto;
}


input, textarea {
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 1rem;
}

/* --- DARK MODE FORMS --- */
body.dark-mode form,
body.dark-mode .form,
body.dark-mode .login-form-container,
body.dark-mode .register-flex-container-modern,
body.dark-mode .register-section-modern {
    background: #23272e !important;
    color: var(--text-primary, #f3f4f6) !important;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #181a20 !important;
    color: #f3f4f6 !important;
    border: 2px solid #444 !important;
    box-shadow: none !important;
    outline: none !important;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: var(--primary, #4f8cff) !important;
    background: #23272e !important;
    color: #fff !important;
}

body.dark-mode label,
body.dark-mode .form-label {
    color: #e5e7eb !important;
}

body.dark-mode ::placeholder {
    color: #a1a1aa !important;
    opacity: 1;
}

body.dark-mode button[type="submit"],
body.dark-mode input[type="submit"] {
    background: var(--primary, #4f8cff) !important;
    color: #fff !important;
    border: none;
}
body.dark-mode button[type="submit"]:hover,
body.dark-mode input[type="submit"]:hover {
    background: var(--secondary, #2563eb) !important;
}
}

.light-theme .comments-section input[type="text"],
.light-theme .comments-section textarea {
    border: 2px solid #333 !important;
    background: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
    outline: none !important;
    z-index: 2;
}

button[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: var(--secondary);
}
*/

@media (max-width: 600px) {
    .hero, .subjects-grid {
        margin: 1rem;
        padding: 1rem;
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: none;}
}

/* Footer Styles */
.footer-wrapper {
    background-color: rgba(var(--bg-primary-rgb), 0.8); /* Frosty glass effect, increased opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-top: 1px solid rgba(var(--border-color), 0.2);
    color: var(--text-primary);
    padding: 60px 0 20px;
}

body.dark-mode .footer-wrapper {
    background-color: rgba(var(--bg-secondary-rgb), 0.95); /* Specific dark frosty glass color, increased opacity */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-widget {
    flex: 1;
    min-width: 250px;
}

.footer-widget .widget-title {
    font-family: 'Baloo 2', cursive;
    color: var(--accent);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Added for visibility */
    font-size: 22px;
    margin-bottom: 20px;
}

.footer-widget p {
    color: var(--text-primary); /* Made text darker for light mode */
    line-height: 1.7;
}

body.dark-mode .footer-widget p {
    color: var(--text-secondary); /* Revert to lighter text for dark mode */
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li a {
    color: var(--text-primary); /* Made text darker for light mode */
    text-decoration: none;
    line-height: 2.2; /* Increased line-height for icon spacing */
    transition: color 0.3s ease;
    display: inline-block; /* Ensure transform works correctly on hover */
}

/* Add icon before each link */
.footer-widget ul li a::before {
    content: '\f054'; /* Font Awesome chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 0.8em;
    color: var(--primary);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Added shadow */
    transition: all 0.3s ease;
}

body.dark-mode .footer-widget ul li a {
    color: var(--text-secondary); /* Revert to lighter text for dark mode */
}

.footer-widget ul li a:hover, .footer-widget a:hover {
    color: var(--secondary); /* Use a more vibrant hover color */
    transform: translateX(5px); /* Move text slightly on hover */
}

.footer-widget ul li a:hover::before {
    color: var(--secondary); /* Change icon color on hover */
}

body.dark-mode .footer-widget ul li a:hover, body.dark-mode .footer-widget a:hover {
    color: var(--text-primary); /* Keep hover color light in dark mode */
}

/* Theme-aware email link styling */
.footer-widget a.email-link,
a[href^="mailto:"] {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a.email-link:hover,
a[href^="mailto:"]:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.copyright-wrap {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 767px) {
    .copyright-wrap {
        font-size: 12px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        text-align: center;
    }
    .footer-wrapper .container { padding-left: 0; padding-right: 0; }
    .footer-widgets { flex-direction: column; gap: 20px; }
    .footer-widget { min-width: unset; width: 100%; text-align: center; }
    
    /* Reduce footer text sizes on mobile, keep titles same */
    .footer-widget p,
    .footer-widget ul li a {
        font-size: 0.9rem;
    }
    
    /* Add side padding to footer paragraphs on mobile */
    .footer-widget p {
        padding-left: 15px;
        padding-right: 15px;
    }
}
/* Social Media Icons in Footer */
.social-links {
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(52, 73, 94, 0.7); /* Frosty glass effect, increased color */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(236, 240, 241, 0.2);
    color: #ecf0f1;
    text-decoration: none;
    margin-right: 10px;    
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    animation: bounce 0.6s ease;
}

.social-icon.facebook:hover { background-color: rgba(59, 89, 152, 0.8); }
.social-icon.instagram:hover { background-color: rgba(225, 48, 108, 0.8); }
.social-icon.linkedin:hover { background-color: rgba(0, 119, 181, 0.8); }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
    40% {
        -webkit-transform: translateY(-10px);
        transform: translateY(-10px);
    }
    60% {
        -webkit-transform: translateY(-5px);
        transform: translateY(-5px);
    }
}

/* Back to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(var(--primary-rgb), 0.7); /* Frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
    z-index: 9999; /* Ensure it stays above all other content including footer */
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: rgba(var(--secondary-rgb), 0.7);
}

@media (max-width: 767px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .whatsapp-chat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* WhatsApp Chat Icon */
.whatsapp-chat-icon {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Positioned on the left */
    width: 60px;
    height: 60px;
    background-color: rgba(37, 211, 102, 0.8); /* Frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.whatsapp-chat-icon:hover {
    transform: scale(1.1) translateY(-2px);
}

/* Custom Tooltip for WhatsApp Icon */
.whatsapp-chat-icon::before,
.whatsapp-chat-icon::after {
    position: absolute;
    left: 75px; /* Position to the right of the icon */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.whatsapp-chat-icon::before {
    content: attr(data-tooltip);
    background-color: #fff;
    color: #292929;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    font-family: 'Baloo 2', cursive;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1001;
}

.whatsapp-chat-icon::after {
    content: '';
    border: 6px solid transparent;
    border-right-color: #fff;
    left: 63px; /* Position the arrow correctly */
    z-index: 1001;
}

.whatsapp-chat-icon:hover::before,
.whatsapp-chat-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Subjects Page Styles */
.subjects-section {
    /* This section is now transparent to show the page background. */
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 50px;
    justify-content: center;
}

.subject-card-new {
    position: relative; /* Crucial for positioning the new sticker */
    overflow: hidden; /* This helps contain the ribbon */
    background-color: rgba(var(--bg-primary-rgb), 0.7); /* Frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-color), 0.2);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    /* New flexbox properties to ensure equal height */
    display: flex;
    flex-direction: column;
    height: 100%; /* Make the card fill the anchor tag's space */
    box-shadow: 0 8px 20px var(--shadow-color); /* Keep the base shadow */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Updated transition */
}

body.dark-mode .subject-card-new {
    background-color: rgba(var(--bg-secondary-rgb), 0.6); /* Dark frosty glass, increased color */
}

@media (max-width: 767px) {
    .subject-card-new { padding: 20px; }
}

.subject-card-new:hover {
    border-color: var(--primary); /* Change border color to primary on hover */
    /* Apply the pulsing animation on hover */
    animation: pulse-glow 2s infinite ease-in-out;
}

/* Keyframe animation for the pulsing glow effect */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 8px 20px var(--shadow-color), 0 0 15px rgba(var(--primary-rgb), 0.6);
    }
    50% {
        box-shadow: 0 8px 20px var(--shadow-color), 0 0 25px rgba(var(--primary-rgb), 0.8);
    }
    100% {
        box-shadow: 0 8px 20px var(--shadow-color), 0 0 15px rgba(var(--primary-rgb), 0.6);
    }
}

@keyframes border-pulse {
    0%, 100% {
        border-color: var(--primary);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }
    50% {
        border-color: var(--primary);
        box-shadow: 0 0 0 5px rgba(var(--primary-rgb), 0);
    }
}

.subject-card-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.subject-card-title {
    font-family: 'Baloo 2', cursive;
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

body.dark-mode .subject-card-title {
    color: var(--text-primary);
}

.subject-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    flex-grow: 1; /* Allows the description to push the icon/title up */
    line-height: 1.6;
}

/* Staggered animation for subject cards */
.subject-card-new {
    transition-delay: calc(0.1s * var(--animation-order, 1));
}

/* Contact Page Styles */
.contact-section {
    background-color: #fff;
}

body.dark-mode .contact-section {
    background-color: var(--bg-primary);
}

.contact-form {
    max-width: 700px;
    margin: 40px auto 0;
}

.contact-form p {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}
body.dark-mode .contact-form label {
    color: var(--text-primary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder {
    color: var(--text-secondary);
}

/* --- Contact Page Background --- */
body.contact-page {
    /* The background is now handled by the .page-background div for consistency */
    background-color: transparent;
}

/* Blur the full-page background image on contact page */
.contact-page .page-background {
    filter: blur(10px);
    transform: scale(1.05);
}

/* Make contact page header text readable against the background */
.contact-page .page-header-title,
.contact-page .page-header-subtitle {
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

/* Remove the dark overlay from the contact page's background image */
.contact-page .page-background::before {
    background-color: transparent;
}

/* New grid container for contact cards to ensure equal height and spacing */
.contact-cards-column {
    display: grid;
    margin-top: calc(-3rem - 50px); /* Move up by 50px on mobile */
    grid-template-columns: 1fr; /* A single column */
    gap: 2rem; /* Consistent spacing between cards */
}

/* Move contact form card higher on desktop */
@media (min-width: 768px) {
    .contact-cards-column {
        margin-top: calc(-8rem - 65px); /* Move up by 65px on desktop */
    }
}


.frosty-glass-container {
    /* Consistent frosty glass effect using theme variables */
    background-color: rgba(var(--bg-primary-rgb), 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-color), 0.2);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 20px var(--shadow-color);
    margin-bottom: 0; /* Margin is now handled by the grid gap */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Specific layout for the main contact card with the form and logo */
.contact-page .frosty-glass-container:first-of-type {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contact-form-wrapper {
    flex: 2; /* Give more space to the form */
}

/* Desktop styling for contact form title area */
.contact-form-wrapper .title-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form-wrapper .title-area p {
    display: block;
    padding: 10px 15px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    width: fit-content;
    max-width: 90%;
    margin: 10px auto;
    text-align: center;
    animation: border-pulse 1s infinite;
}

/* Hide contact-logo-wrapper on desktop */
@media (min-width: 768px) {
    .contact-logo-wrapper {
        display: none;
    }
}

.contact-logo-wrapper {
    flex: 1; /* Give less space to the logo */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* Stack items vertically */
}

.contact-logo-wrapper img {
    max-width: 100%;
    height: auto;
    opacity: 0.7;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

body.dark-mode .frosty-glass-container {
    background-color: rgba(var(--bg-secondary-rgb), 0.7);
}

.frosty-glass-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

/* Mobile-friendly contact page cards */
@media (max-width: 767px) {
    .contact-cards-column {
        margin-top: calc(-1rem - 80px); /* Move up by 80px on mobile */
        gap: 1.5rem; /* Smaller gap on mobile */
        display: flex; /* Change to flex for better control */
        flex-direction: column; /* Stack cards vertically */
        align-items: center; /* Center the cards */
    }

    .frosty-glass-container {
        padding: 20px; /* Reduced padding on mobile */
        border-radius: 12px; /* Slightly smaller radius */
        width: 80%; /* 80% of page width on mobile */
        max-width: 80%; /* Ensure it doesn't exceed 80% */
    }

    .contact-page .frosty-glass-container:first-of-type {
        flex-direction: column; /* Stack form and button vertically on mobile */
        gap: 1.5rem;
        margin-top: -40px;
        padding-top: 10px; /* Make the card shorter on mobile */
        padding-bottom: 10px; /* Make the card shorter on mobile */
    }

    /* Lift the form fields higher inside the card */
    .contact-form-wrapper form {
        margin-top: -15px;
    }

    .contact-form-wrapper .title-area p {
        padding-top: 5px;
        padding-bottom: 0; /* Further reduce bottom padding for the helper text */
    }

    .contact-form-wrapper,
    .contact-logo-wrapper {
        flex: 1;
        width: 100%; /* Full width on mobile */
    }

    .contact-form-wrapper .title-area {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-form-wrapper .title-area h2 {
        font-size: 1.5rem; /* Smaller title on mobile */
        width: fit-content;
        text-align: center;
    }

    .contact-form-wrapper .title-area p {
        font-size: 0.95rem !important; /* Smaller text on mobile */
        display: block !important;
        padding: 10px 15px !important;
        border: 2px solid var(--primary) !important;
        border-radius: 8px !important;
        width: fit-content !important;
        max-width: 90% !important;
        margin: 10px auto !important;
        text-align: center !important;
        animation: border-pulse 2s infinite;
    }

    .contact-info-box h3 {
        font-size: 1.3rem; /* Smaller headings */
    }

    .contact-info-box p {
        font-size: 0.95rem; /* Smaller text */
    }
}

/* Theme-aware link colors for contact page */
.contact-info-box a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info-box a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    font-family: 'Baloo 2', cursive;
    border: 1px solid transparent;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}


/* Dashboard Styles */
.dashboard-section {
    background-color: #f9f9f9;
}

/* About Us Page Header */
.page-header {
    padding: 40px 0 10px; /* Reduced top padding to move title lower */
    position: relative;
    text-align: center;
    color: #fff;
}

.page-header-title {
    font-size: 63px;
    /* Add a strong shadow to maintain readability */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.page-header-subtitle {
    font-size: 27px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.page-header .container {
    position: relative;
    z-index: 2; /* Ensure content is above the overlay */
}

/* New wrapper for header controls */
.page-header .header-controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

/* Search bar inside page header */
.page-header .search-container {
    max-width: 500px;
    margin: 0 auto;
    flex-grow: 0;
    position: relative;
}

.page-header .search-input {
    width: 100%;
    padding: 15px 50px 15px 25px;
    border-radius: 50px;
    border: 1px solid transparent;
    border-color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    /* Make background transparent */
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary); /* Use theme variable for text color */
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

/* Style for the placeholder text */
.page-header .search-input::placeholder {
    color: var(--text-secondary); /* Use theme variable for placeholder */
}

.page-header .search-input:focus {
    outline: none;
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.page-header .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Filter controls inside page header */
.page-header .filter-container {
    /* This container is no longer used for the new layout */
}

.page-header .filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align labels to the left */
    flex-shrink: 0; /* Prevent filters from shrinking */
}

.page-header .filter-group label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 8px;
    font-family: 'Baloo 2', cursive;
}

.page-header .filter-group select {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    min-width: 200px;
    font-family: 'Baloo 2', cursive;
}

/* Styling for the options inside the select dropdown */
.page-header .filter-group select option {
    /* Apply a solid background for readability within the dropdown */
    background-color: var(--bg-primary); 
    color: var(--text-primary); 
    padding: 5px; /* Add a little padding for better spacing */
}

/* Founder Section */
.founder-section {
    /* Background is handled by the page-background and frosty-glass cards */
}

.founder-img img {
    width: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 8px solid #fff;
    max-width: 400px;
    display: block;
    margin: 0 auto;
}
@media (max-width: 991px) {
    .founder-img { margin-bottom: 30px; }
    .founder-info { padding-left: 0; text-align: center; }
}

.founder-info {
    padding-left: 20px;
}

.founder-bio {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

body.dark-mode .founder-bio {
    color: var(--text-secondary);
}

.founder-quote {
    font-style: italic;
    font-size: 18px;
    color: var(--primary);
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-top: 20px;
}

/* About Page Font Styles */
.page-header-title,
.page-header-subtitle,
.about-section .sec-desc,
.mission-box p,
.founder-info .founder-bio,
.founder-info .founder-quote {
    font-family: 'Baloo 2', cursive;
}

/* Transparent Header Styles */
.transparent-header header {
    position: absolute;
    background-color: transparent;
    border-bottom: none;
    box-shadow: none;
}

.transparent-header header .main-menu a,
.transparent-header header .logo a {
    /* Make the text white and add a shadow */
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); /* Reduced shadow for mobile */
}

.transparent-header header .mobile-menu-toggle span {
    background-color: #fff;
}

/* Make toggle icons white on transparent header */
.transparent-header header .theme-switch .slider {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Make toggle icons white on transparent header */
.transparent-header header .theme-switch .sun-icon,
.transparent-header header .theme-switch .moon-icon {
    color: #fff;
}
/* Scrolled state for transparent header */
.transparent-header header.scrolled {
    position: fixed; /* Keep it fixed at the top */
    /* Apply the frosty glass effect on scroll */
    background-color: rgba(var(--bg-primary-rgb), 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--border-color), 0.2);
    text-shadow: none; /* Remove text shadow when there's a background */
}

.transparent-header header.scrolled .main-menu a,
.transparent-header header.scrolled .logo a {
    color: var(--text-primary);
}

.transparent-header header.scrolled .mobile-menu-toggle span {
    background-color: var(--text-primary);
}

body.dark-mode .transparent-header header.scrolled .logo a {
    color: var(--primary); /* Keep logo color vibrant on dark scroll */
}

/* Mobile menu specific overrides for transparent header */
@media (max-width: 991px) {
    .transparent-header header .main-menu.active li a { color: #333; }
}

@media (max-width: 991px) {
    .menu-item-has-children > a .fa-chevron-down {
        display: inline-block; /* Ensure chevron is visible on mobile */
        transition: transform 0.3s ease;
    }
    
    .menu-item-has-children.open > a .fa-chevron-down {
        transform: rotate(180deg);
    }

    .sub-menu {
        position: static;
        background-color: var(--bg-secondary);
        box-shadow: none;
        border-radius: 0;
        padding-left: 20px; /* Indent sub-menu items */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    }

    .menu-item-has-children.open > .sub-menu {
        max-height: 500px; /* A large enough value to show all items */
        padding: 10px 0 10px 20px;
    }
}

@media (max-width: 767px) {
    .header-container { padding: 0 15px; }
}

/* Mission and Vision Section */
.mission-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .mission-box {
    background-color: var(--bg-secondary);
}

.mission-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.mission-icon {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.mission-title {
    font-family: 'Baloo 2', cursive;
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

body.dark-mode .mission-title {
    color: var(--text-primary);
}

@media (max-width: 767px) {
    .mission-box {
        margin-bottom: 30px;
    }
}

/* Global Image Hover Effect */
.about-img, .why-images, .founder-img, .team-img {
    overflow: hidden; /* This is crucial to contain the scaled image */
    border-radius: inherit; /* Ensures the container's border-radius is respected */
}

.about-img img,
.why-images img,
.founder-img img,
.team-img img {
    transition: transform 0.5s ease;
}

.row:hover .about-img img,
.row:hover .why-images img,
.row:hover .founder-img img,
.team-box:hover .team-img img {
    transform: scale(1.05);
}

/* Remove overlay from tutor profile page background in light mode */
body:not(.dark-mode).tutor-profile-page .page-background::before {
    background-color: transparent;
}
/* Remove overlay from tutor profile page background in dark mode */
body.dark-mode.tutor-profile-page .page-background::before {
    background-color: transparent;
}

/* Featured Blog Card Styles */
.featured-blog-card {
    background-color: rgba(var(--bg-primary-rgb), 0.8); /* Frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-color), 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .featured-blog-card {
    background-color: rgba(45, 55, 72, 0.7); /* Specific dark frosty glass color, increased color */
    border-color: rgba(255, 255, 255, 0.1);
}

.featured-blog-card .blog-meta,
.featured-blog-card p {
    color: var(--text-secondary);
}
body.dark-mode .featured-blog-card .blog-meta,
body.dark-mode .featured-blog-card p {
    color: var(--text-secondary);
}
.featured-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.featured-blog-img-link {
    display: block;
    height: 100%;
    overflow: hidden;
}

.featured-blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-blog-card:hover .featured-blog-img {
    transform: scale(1.05);
}

/* --- New Interactive Social Share Button --- */
.post-actions-container {
    display: flex;
    justify-content: flex-end; /* Align to the right */
    margin-top: 30px;
    margin-bottom: 30px;
}

.social-share-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}


.share-main-btn {
    background-color: var(--primary);
    color: #fff;
}
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
    position: relative; /* Ensure z-index is applied */
    z-index: 5; /* Bring it above other elements */
}

.share-main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.5);
}

.social-icons-container {
    display: flex;
    align-items: center;
    position: absolute;
    right: 100%; /* Position the container to the left of the main button */
    margin-right: 15px;
    pointer-events: none;
}


.social-share-wrapper.active .social-icons-container {
    opacity: 1;
    pointer-events: auto;
    right: 100%; /* Move to the left of the main button */
    margin-right: 15px;
}

.social-share-wrapper.active .share-main-btn {
    background-color: var(--secondary);
    box-shadow: 0 4px 15px rgba(var(--secondary-rgb), 0.4);
}

.social-icons-container .social-icon-link {
    margin: 0 5px; /* Spacing between icons */
    display: inline-flex;
    align-items: center;
    /* Initial state for animation */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* --- Tooltip Styles for Social Icons --- */

.social-icon-link::before,
.social-icon-link::after {
    position: absolute;
    bottom: 125%; /* Position above the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-icon-link::before {
    content: attr(data-tooltip);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 13px;
    font-family: 'Baloo 2', cursive;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.social-icon-link:hover::before,
.social-icon-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px); /* Add a slight upward movement */
}

/* --- Style for the "Copied!" tooltip state --- */
.social-icon-link[data-tooltip="Copied!"]::before {
    background-color: #28a745; /* A success green color */
    color: #fff;
}

/* Staggered animation for icons when the share button is active */
.social-share-wrapper.active .social-icon-link {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for active icons */
}
.social-share-wrapper.active .social-icon-link:nth-child(1) { transition-delay: 0.1s; }
.social-share-wrapper.active .social-icon-link:nth-child(2) { transition-delay: 0.2s; }
.social-share-wrapper.active .social-icon-link:nth-child(3) { transition-delay: 0.3s; }
.social-share-wrapper.active .social-icon-link:nth-child(4) { transition-delay: 0.4s; }
.social-share-wrapper.active .social-icon-link:nth-child(5) { transition-delay: 0.5s; }
.social-icon-link:hover {
    transform: translateY(-3px);
}

.social-icon-link.facebook { background-color: #3b5998; }
.social-icon-link.twitter { background-color: #1da1f2; }
.social-icon-link.linkedin { background-color: #0077b5; }
.social-icon-link.whatsapp { background-color: #25d366; }
.social-icon-link.instagram {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

.social-icon-link.copy-link-btn {
    background-color: #7f8c8d; /* A neutral gray color */
}


.featured-blog-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.featured-blog-title {
    font-size: 28px;
    font-family: 'Baloo 2', cursive;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-blog-title a:hover {
    color: var(--secondary);
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Blog Page Styles */
.blog-section {
    position: relative;
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: transparent;
}

.blog-card {
    background-color: rgba(var(--bg-primary-rgb), 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-color), 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.dark-mode .blog-card {
    background-color: rgba(45, 55, 72, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

/* --- Tutor Detail Page Rating System --- */
.average-rating-display {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.star-rating-static {
    font-size: 1.5rem;
    color: #ccc; /* Default grey for empty stars */
    margin-bottom: 5px;
}

.star-rating-static.small {
    font-size: 1rem;
}

.star-rating-static .fas.fa-star.filled {
    color: var(--accent); /* Gold color for filled stars */
}

.rating-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Rating Form Container */
.rating-form-container {
    padding: 25px;
    margin-top: 20px;
}

.rating-form-container h4 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.rating-form .form-group {
    margin-bottom: 15px;
}

.rating-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.rating-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    /* Increase width of bio textarea */
    width: 100%; /* Ensure it takes the full width of its container */
    max-width: 600px; /* Set a maximum width for larger screens */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Baloo 2', cursive;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rating-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

/* Star Rating Input (Radio Buttons) */
.star-rating-input {
    display: inline-flex;
    flex-direction: row-reverse; /* Reverse order to make CSS :checked ~ label work */
    justify-content: center;
}

.star-rating-input input[type="radio"] {
    display: none; /* Hide the actual radio button */
}

.star-rating-input label {
    cursor: pointer;
    width: 30px; /* Size of each star */
    height: 30px;
    font-size: 1.5rem;
    color: #ccc; /* Default color for unselected stars */
    transition: color 0.2s ease;
    margin: 0 2px;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input[type="radio"]:checked ~ label {
    color: var(--accent); /* Gold color for selected and hovered stars */
}

/* Reviews Section */
.reviews-section {
    padding: 25px;
}

.reviews-section h4 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.review-list {
    max-height: 400px; /* Limit height for scrollability */
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.review-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}
.blog-card-img {
    height: 200px;
    overflow: hidden;
}

.blog-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-family: 'Baloo 2', cursive;
}

.blog-meta span {
    margin-right: 15px;
}

.blog-meta i {
    margin-right: 5px;
    color: var(--primary);
}

.blog-card-title {
    font-size: 22px;
    font-family: 'Baloo 2', cursive;
    margin-bottom: 10px;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--secondary);
}

.blog-card-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    font-size: 16px;
}

.read-more-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    font-family: 'Baloo 2', cursive;
    transition: color 0.3s ease;
}

.read-more-btn:hover {
    color: var(--secondary);
}

/* ===================================================================
    Custom Pagination Styles
=================================================================== */
.pagination {
    --pagination-color: #007bff; /* Your primary theme color */
    --pagination-hover-bg: #e9ecef;
    --pagination-active-bg: #0056b3; /* A darker shade for the active page */
    --pagination-active-color: #fff;
    --pagination-disabled-color: #6c757d;
    --pagination-disabled-bg: #fff;
    --pagination-border-radius: 0.375rem; /* Rounded corners */
}

/* Style for each individual page link (the 'a' tag) */
.page-link {
    color: var(--pagination-color);
    border-radius: var(--pagination-border-radius);
    margin: 0 3px; /* Adds a little space between page numbers */
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}

/* Hover effect for page links */
.page-link:hover {
    background-color: var(--pagination-hover-bg);
    border-color: #cdd5db;
    transform: translateY(-2px); /* Subtle lift effect on hover */
}

/* Remove focus outline for a cleaner look */
.page-link:focus {
    box-shadow: none;
}

/* Styling for the currently active page item */
.page-item.active .page-link {
    background-color: var(--pagination-active-bg);
    border-color: var(--pagination-active-bg);
    color: var(--pagination-active-color);
    font-weight: bold;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styling for disabled links (e.g., 'Previous' on the first page) */
.page-item.disabled .page-link {
    color: var(--pagination-disabled-color);
    background-color: var(--pagination-disabled-bg);
    border-color: var(--border-color);
    pointer-events: none; /* Prevents clicking on disabled links */
}

body.dark-mode .page-link {
    background-color: rgba(var(--bg-secondary-rgb), 0.5);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* --- Featured Post on Blog Page --- */
.featured-post-wrapper {
    background-color: rgba(var(--bg-primary-rgb), 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-color), 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .featured-post-wrapper {
    background-color: rgba(45, 55, 72, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.featured-post-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.featured-post-img-link {
    display: block;
    height: 100%;
    overflow: hidden;
}

.featured-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post-wrapper:hover .featured-post-img {
    transform: scale(1.05);
}

.featured-post-img-link {
    display: block;
    height: 100%;
    max-height: 350px; /* NEW: Constrain the height of the image container */
    overflow: hidden;
}
.featured-post-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-post-tag {
    display: inline-block;
    background-color: var(--accent);
    color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    align-self: flex-start;
}

.featured-post-title {
    font-size: 28px;
    font-family: 'Baloo 2', cursive;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post-title a:hover {
    color: var(--secondary);
}

/* Comments Section Styling */
.comments-section {
    margin-top: 40px;
}

.comments-title, .form-title {
    font-family: 'Baloo 2', cursive;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.comment-form-container {
    background-color: rgba(var(--bg-secondary-rgb), 0.4);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(var(--border-color), 0.2);
    margin-top: 40px;
}

body.dark-mode .comment-form-container {
    background-color: rgba(var(--bg-secondary-rgb), 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Social Share Buttons on Post Detail */
.social-share-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Comment List & Items */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.comment-item {
    display: flex;
    gap: 15px;
    background-color: rgba(var(--bg-secondary-rgb), 0.4);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(var(--border-color), 0.2);
    align-items: flex-start;
}

body.dark-mode .comment-item {
    background-color: rgba(var(--bg-secondary-rgb), 0.3);
}

.comment-content-wrapper {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.comment-avatar::before {
    content: attr(data-initial);
}

.comment-author {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-primary);
}

.comment-meta {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.comment-body {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.comment-body p {
    margin-bottom: 0; /* Remove default p margin inside comments */
}

.reply-btn i {
    margin-right: 5px;
}

.reply-btn {
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Reply Form */
.reply-form {
    background-color: rgba(var(--bg-secondary-rgb), 0.2);
    border-radius: 8px;
    border: 1px solid rgba(var(--border-color), 0.15);
    /* Properties for slide animation */
    overflow: hidden;
    max-height: 0;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out, margin-top 0.5s ease-out;
}

.reply-form.open {
    max-height: 500px; /* A value large enough to show the form content */
    padding-top: 15px;
    padding-bottom: 20px;
    margin-top: 20px;
}

body.dark-mode .reply-form {
    background-color: rgba(var(--bg-secondary-rgb), 0.2);
}

.reply-form h6 {
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Nested Replies (Threads) */
.replies {
    margin-top: 15px;
    padding-left: 55px; /* Align with the start of the parent comment's content */
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Post Detail Styles */
.post-detail-title {
    font-size: 48px;
    font-family: 'Baloo 2', cursive;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.2;
}

.post-detail-meta {
    color: var(--text-secondary) !important;
    }
    body.dark-mode .post-detail-meta, body.dark-mode .post-detail-meta span {
        color: var(--text-primary) !important;
    margin-bottom: 30px;
}

.post-detail-meta span {
    margin-right: 20px;
}

.post-detail-img {
    margin-bottom: 40px;
}

.post-detail-img img {
    width: 100%;
    border-radius: 10px;
}

.post-detail-content {
    line-height: 1.8;
    font-size: 17px;
    color: var(--text-primary);
}

/* Styles for content generated by CKEditor */
.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4 {
    font-family: 'Baloo 2', cursive;
    color: var(--text-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    text-indent: 0 !important;
}

.post-detail-content h2 { font-size: 2em; }
.post-detail-content h3 { font-size: 1.75em; }
.post-detail-content h4 { font-size: 1.5em; }

/* Universal paragraph styling - catch all text blocks */
.post-detail-content p,
.post-detail-content div:not(.featured-post-img-link):not(.social-share-wrapper) {
    display: block !important;
    margin-bottom: 1.5em !important;
    margin-left: 0 !important;
    text-indent: 2em !important;
    text-align: justify !important;
    line-height: 1.8 !important;
}

/* Remove indentation from first element and elements after headings */
.post-detail-content > :first-child,
.post-detail-content h2 + *,
.post-detail-content h3 + *,
.post-detail-content h4 + * {
    text-indent: 0 !important;
}

.post-detail-content a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-detail-content a:hover {
    color: var(--secondary);
}

.post-detail-content ul,
.post-detail-content ol {
    padding-left: 2em;
    margin-bottom: 1.5em;
}

.post-navigation-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 40px 0;
}

.post-detail-content blockquote {
    font-style: italic;
    font-size: 1.1em;
    color: var(--text-secondary);
    border-left: 4px solid var(--accent);
    padding-left: 1.5em;
    margin: 2em 0;
}

.post-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5em 0;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.post-detail-content .image-style-side {
    max-width: 50%;
    float: right;
    margin-left: 1.5em;
}

.share-title {
    font-family: 'Baloo 2', cursive;
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook { background-color: #3b5998; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.linkedin { background-color: #0077b5; }
.share-btn.whatsapp { background-color: #25d366; }
.share-btn.instagram {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

/* Post Navigation (Next/Previous) */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous, .nav-next {
    flex: 1;
    max-width: 50%;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(var(--bg-secondary-rgb), 0.5);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.nav-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
    border-color: var(--primary);
}

.nav-arrow {
    font-size: 24px;
    color: var(--primary);
}

.nav-text {
    display: flex;
    flex-direction: column;
}

.nav-previous .nav-text { margin-left: 15px; }
.nav-next .nav-text { margin-right: 15px; text-align: right; }

.nav-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.nav-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.nav-link:hover .nav-title {
    color: var(--secondary);
}

/* Instagram Share Modal */
.share-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.share-modal-content {
    background-color: var(--bg-primary);
    margin: 15% auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 25px var(--shadow-color);
    position: relative;
    text-align: center;
}

.close-modal-btn {
    color: var(--text-secondary);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal-btn:hover { color: var(--text-primary); }

.copy-link-container {
    display: flex;
    margin-top: 20px;
}

.copy-link-container input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.copy-link-container .vs-btn {
    border-radius: 0 5px 5px 0;
    padding: 10px 20px;
}

/* Theme-aware T&C modal styles */
#terms-modal .modal-content, #terms-modal .modal-header, #terms-modal .modal-body {
    background: #fff;
    color: #222;
}
#terms-modal .modal-title,
#terms-modal .modal-body h2,
#terms-modal .modal-body h3,
#terms-modal .modal-body h4 {
    color: #222;
    background: transparent;
}
#terms-modal .modal-body p, #terms-modal .modal-body ul, #terms-modal .modal-body li {
    color: #222;
    background: #fff;
}
@media (prefers-color-scheme: dark) {
    #terms-modal .modal-content, #terms-modal .modal-header, #terms-modal .modal-body {
        background: #181a20;
        color: #e0e6f0;
    }
    #terms-modal .modal-title,
    #terms-modal .modal-body h2,
    #terms-modal .modal-body h3,
    #terms-modal .modal-body h4 {
        color: #e0e6f0;
        background: transparent;
    }
    #terms-modal .modal-body p, #terms-modal .modal-body ul, #terms-modal .modal-body li {
        color: #e0e6f0;
        background: #181a20;
    }
}

/* Enhance T&C checkbox and link visibility */
#id_terms {
    width: 1.5em;
    height: 1.5em;
    accent-color: #1976d2;
}

/* Checkbox hover effect */
#id_terms:hover {
    box-shadow: 0 0 0 2px #1976d2;
    outline: none;
    border-color: #1976d2;
    cursor: pointer;
}

/* T&C link hover effect */
.terms-label a {
    color: #1976d2;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}
.terms-label a:hover {
    color: #1565c0;
    text-decoration: underline wavy;
    background: #e3f2fd;
}

/* Match footer email link color */
.footer-email-link, .terms-label a {
    color: #1976d2 !important;
}