/* Updated styles.css with all fixes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    box-sizing: border-box;
}

:root {
    --container-color: #1a1e21;
    --second-color: #4de4ff;
    --text-color: #172317;
    --bg-color: #fff;
    --hover-color: #3bc5e0;
    --dark-color: #111;
}

::selection {
    color: var(--bg-color);
    background: var(--second-color);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

button {
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn {
    transition: all 0.3s ease;
}

li {
    list-style: none;
}

img {
    width: 100%;
}

section {
    padding: 3rem 0 2rem;
}

.container {
    max-width: 800px;
    margin: auto;
    width: 100%;
}

a {
    color: var(--dark-color);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 21000;
    transition: all 0.4s ease;
    background: var(--container-color);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 19999;  /* Sidebar (20000) ke theek neeche */
    display: none;
    transition: all 0.4s ease;
    cursor: pointer;
}

.nav-overlay.active {
    display: block;
}

header.shadow {
    background: var(--bg-color);
    box-shadow: 0 1px 4px hsl(0 4% 14% / 10%);
}

header.shadow .logo,
header.shadow .nav-link,
header.shadow .menu-toggle i,
header.shadow .profile-icon i,
header.shadow .notification-icon i {
    color: var(--text-color);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bg-color);
    transition: all 0.3s ease;
}

.logo span {
    color: var(--second-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}
/* Home icon styles that work with scroll */
.logo-home-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-icon {
    color: var(--bg-color); /* White by default */
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.home-icon:hover {
    color: var(--second-color); /* Teal color on hover */
    transform: scale(1.1);
}

header.shadow .home-icon {
    color: var(--text-color); /* Dark color when header is white */
}
.nav-link {
    color: var(--bg-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--second-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle i {
    font-size: 1.8rem;
    color: var(--bg-color);
    transition: all 0.3s ease;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
    display: inline-block;
    z-index: 22000;
}

.profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--second-color);
    color: var(--bg-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-icon i {
    font-size: 1.2rem;
}

.profile-icon:hover {
    background: var(--hover-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(77, 228, 255, 0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--bg-color);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 23000;
}

.profile-dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

/* Notification Icon Styles */
.notification-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--bg-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-icon i {
    font-size: 1.5rem;
}

.notification-icon:hover {
    color: var(--second-color);
    transform: translateY(-3px);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--second-color);
    color: var(--bg-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Notification Dropdown */
.notification-dropdown {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 350px;
    max-height: 500px;
    overflow-y: auto;
    background: var(--bg-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 15px;
    z-index: 22000;
    display: none;
}

.notification-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.notification-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: rgba(77, 228, 255, 0.1);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-text {
    flex: 1;
    font-size: 0.9rem;
}

.notification-text a {
    color: var(--second-color);
    font-weight: 600;
}

.notification-time {
    font-size: 0.7rem;
    color: #777;
    margin-top: 5px;
}

.view-all-notifications {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--second-color);
    font-weight: 500;
    margin-top: 10px;
    border-top: 1px solid #eee;
    transition: all 0.3s ease;
}

.view-all-notifications:hover {
    background: rgba(77, 228, 255, 0.1);
}

/* Fix for notification and profile dropdown interaction */
.notification-dropdown.active ~ .profile-dropdown .dropdown-content,
.profile-dropdown.active ~ .notification-dropdown {
    display: none;
     z-index: 999;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: var(--dark-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: rgba(77, 228, 255, 0.1);
    color: var(--second-color);
    padding-left: 20px;
}

/* Home Section */
.home {
    width: 100%;
    min-height: 50vh; /* Further reduced from 70vh per user request */
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1352&q=80');
    background-size: cover;
    background-position: center;
    display: grid;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.home-text {
    color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.home-title {
    font-size: 2rem; /* Further reduced from 2.5rem per user request */
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: capitalize;
}

.home-subtitle {
    display: block; /* Ensure it behaves as a block for flex centering */
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.explore-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--second-color);
    color: var(--bg-color);
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease;
    margin-top: 1rem; /* Reduced from 1.5rem */
}

.explore-btn:hover {
    background: var(--hover-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(77, 228, 255, 0.3);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--bg-color);
    font-size: 2rem;
}

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

/* About Section */
.about {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.about .contentBx {
    max-width: 50%;
    width: 50%;
    text-align: left;
    padding-right: 40px;
}

.titleText {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.title-text {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about .imgBx {
    position: relative;
    min-width: 50%;
    width: 50%;
    min-height: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
}

.about .imgBx img {
    transition: transform 0.5s ease;
}

.about .imgBx:hover img {
    transform: scale(1.05);
}

.btn2 {
    position: relative;
    display: inline-block;
    margin-top: 30px;
    padding: 12px 35px;
    background: var(--bg-color);
    border: 2px solid var(--second-color);
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.5s ease;
    border-radius: 30px;
    font-weight: 600;
    overflow: hidden;
    z-index: 1;
}

.btn2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--second-color);
    z-index: -1;
    transition: width 0.5s ease;
}

.btn2:hover {
    color: var(--bg-color);
}

.btn2:hover::before {
    width: 100%;
}

/* Post Filter */
.post-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    row-gap: 1rem;
}

.filter-item {
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.filter-item:hover {
    background: rgba(77, 228, 255, 0.2);
}

.active-filter {
    background: var(--second-color);
    color: var(--bg-color);
    box-shadow: 0 5px 15px rgba(77, 228, 255, 0.3);
}

/* Blog Posts Grid */
.post {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.3rem;
    margin-top: 3rem;
    justify-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.post::-webkit-scrollbar {
    display: none;
}

.post-box {
    background: var(--bg-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 0.8rem;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 350px;
    width: 100%;
    margin: 0%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-box:active {
    transform: scale(0.97);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}
.post-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.post-img-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-box:hover .post-overlay {
    opacity: 1;
}

.read-more {
    color: var(--bg-color);
    background: var(--second-color);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: var(--hover-color);
    transform: translateY(-3px);
}

.category {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--second-color);
    margin: 1rem 0 0.5rem;
    display: inline-block;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0.5rem 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-title:hover {
    color: var(--second-color);
}

.post-date {
    display: flex;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 400;
    color: #777;
}

.post-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 10px 0 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #555;
    white-space: pre-wrap; /* Preserves newlines and empty lines */
}

.post-description div,
.post-description p {
    margin-bottom: 0.2rem;
    display: inline; /* Keep inline for the line-clamp to work correctly in summary */
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--second-color);
    transition: transform 0.3s ease;
}

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

.profile-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
}

/* Newsletter Section - Updated Styles */
.newsletter {
    background: linear-gradient(135deg, #4de4ff, #3bc5e0);
    padding: 4rem 2rem;
    margin: 5rem 0;
    border-radius: 15px;
    color: var(--bg-color);
    text-align: center;
    box-shadow: 0 10px 30px rgba(77, 228, 255, 0.3);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: white;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input[type="email"]:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--dark-color);
    color: var(--bg-color);
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Subscribed State Styles */
.subscribed-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 0 auto;
    max-width: 500px;
}

.subscribed-message p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
}

.unsubscribe-btn {
    padding: 12px 25px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.unsubscribe-btn:hover {
    background: #c82333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Error Message Styles */
.newsletter-form .error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Footer */
footer {
    position: relative;
    width: 100%;
    height: auto;
    padding: 80px 100px 50px;
    background: var(--dark-color);
    display: flex;
    font-family: sans-serif;
    justify-content: space-between;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: row;
}

.footer-container .sec {
    margin-right: 30px;
    margin-bottom: 40px;
    width: calc(33% - 30px);
}

.footer-container h2 {
    position: relative;
    color: var(--bg-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.footer-container h2::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--second-color);
}

footer p {
    color: #999;
    line-height: 1.8;
    margin-bottom: 20px;
}

.sci {
    margin: 20px 0;
    display: flex;
}

.sci li a {
    display: inline-block;
    width: 45px;
    height: 45px;
    background: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sci li a:hover {
    background: var(--second-color);
    transform: translateY(-5px);
}

.sci li a i {
    color: var(--bg-color);
    font-size: 1.2rem;
}

.quicklinks ul li a {
    color: #ccc;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.quicklinks ul li a:hover {
    color: var(--second-color);
    transform: translateX(5px);
}

.contactBx .info li {
    display: flex !important;
    margin-bottom: 20px;
    align-items: flex-start;
}

.contactBx .info li span:nth-child(1) {
    color: var(--second-color);
    font-size: 1.3rem;
    margin-right: 15px;
    margin-top: 3px;
}

.contactBx .info li span {
    color: #ccc;
    line-height: 1.6;
}

.contactBx .info li a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow-wrap: break-word; /* Fix for long email overflow */
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

.contactBx .info li a:hover {
    color: var(--second-color);
}

.copyright {
    background: #000;
    text-align: center;
    padding: 15px 0;
    color: #999;
    font-size: 0.9rem;
}

/* Notifications Page Styles */
.notifications-section {
    margin-top: 100px;
    padding: 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    text-align: center;
}

.notifications-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
}

.no-notifications {
    text-align: center;
    color: #777;
    padding: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.pagination .btn {
    padding: 8px 20px;
    background: var(--second-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination .btn:hover {
    background: var(--hover-color);
}

.pagination .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#page-info {
    font-weight: 500;
    color: var(--dark-color);
}

/* Notification item unread state */
.notification-item.unread {
    background: rgba(77, 228, 255, 0.05);
    border-left: 3px solid var(--second-color);
}

/* Notification actions */
.notification-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.notification-action {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-action:hover {
    color: var(--second-color);
}

.notification-action i {
    font-size: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 1060px) {
    .container {
        width: 95%;
    }

    .home-text {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 5px 0; /* Further shrunk from 8px */
    }

    section {
        padding: 1rem 0 !important; /* Further shrunk from 1.5rem */
    }

    .home {
        min-height: 60vh; /* Further shrunk from 70vh */
    }

    .home-title {
        font-size: 1.5rem; /* Further shrunk from 2rem */
    }

    .home-subtitle {
        font-size: 0.85rem; /* Further shrunk from 0.95rem */
    }

    .btn {
        padding: 8px 16px; /* Further shrunk padding */
        font-size: 0.8rem; /* Further shrunk font */
    }

    .titleText {
        font-size: 1.4rem; /* Further shrunk from 1.6rem */
    }

    .newsletter h2 {
        font-size: 1.8rem;
    }

    .post {
        grid-template-columns: repeat(2, 1fr);
    }

    .notification-dropdown {
        width: 300px;
        right: 20px;
        z-index: 1000;
    }

    .about {
        flex-direction: column;
    }

    .about .contentBx,
    .about .imgBx {
        max-width: 100%;
        width: 100%;
    }

    .about .contentBx {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    /* Responsive Adjustments for Newsletter */
    .newsletter {
        padding: 3rem 1.5rem;
        margin: 3rem 0;
    }
    
    .subscribed-message {
        padding: 1.2rem;
    }
}

@media (max-width: 570px) {
    .home-title {
        font-size: 1.4rem; /* Further shrunk from 1.8rem */
    }

    .home-subtitle {
        font-size: 0.8rem; /* Further shrunk from 0.9rem */
    }

    .filter-item {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    .newsletter-form input {
        margin-bottom: 15px;
    }

    .post {
        grid-template-columns: 1fr;
    }

    .newsletter-form button {
        width: 100%;
    }

    .notification-dropdown {
        width: 280px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .newsletter {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }
    
    .newsletter h2 {
        font-size: 1.5rem;
    }
    
    .unsubscribe-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 396px) {
    .home-title {
        font-size: 1.25rem; /* Further shrunk from 1.6rem */
    }

    .home-subtitle {
        font-size: 0.75rem; /* Further shrunk from 0.85rem */
    }

    .logo {
        font-size: 1.5rem;
    }

    .post-box {
        padding: 12px;
    }

    footer {
        padding: 50px 20px 30px;
    }

    .notification-dropdown {
        width: 250px;
        right: 10px;
    }
}

/* Post Image Styling */
.post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.post-box {
    overflow: hidden;
    border-radius: 0.8rem;
}

/* Ensure post-container shows grid correctly */
.post-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 columns */
    gap: 0.8rem; /* Reduced spacing between post cards */
    justify-items: center;
    padding: 1rem 0;
}

/* ✅ Responsive fallback (already in your code but rechecked) */
@media (max-width: 992px) {
    .post-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .post-container {
        grid-template-columns: 1fr;
    }
}

/* Additional styles for read more functionality */
#moreText {
    display: none;
    margin-top: 15px;
    transition: all 0.3s ease;
}

/* Success message for newsletter */
.subscribe-success {
    color: #28a745;
    font-size: 1rem;
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* 🌟 Search bar styling */
.nav-search-form {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
    gap: 5px;
}

.nav-search-input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
}
.nav-search-btn {
    background: var(--second-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-search-btn:hover {
    background: var(--hover-color);
}
/* Search Results Page */
.search-results {
    margin-top: 100px;
}

.search-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.search-meta p {
    font-size: 1.1rem;
    color: #555;
}

/* Responsive Search */
@media (max-width: 768px) {
    .nav-search-form {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
        max-width: 100%;
    }
    
    .nav-search-input {
        flex-grow: 1;
    }
}

@media (max-width: 480px) {
    .nav-search-form select.nav-search-input {
        max-width: 100px;
    }
}
/* Post Location Styling */
.post-location {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #555;
    margin-top: 8px;
    font-weight: 400;
}

.post-location i {
    margin-right: 5px;
    color: var(--second-color);
}

/* Search Form Enhancements */
.nav-search-form select.nav-search-input {
    padding: 8px 10px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    background: #f5f5f5;
    color: var(--text-color);
    outline: none;
    cursor: pointer;
}

.nav-search-form select.nav-search-input:focus {
    background: #fff;
    box-shadow: 0 0 5px rgba(77, 228, 255, 0.2);
}

/* Responsive Search Form */
@media (max-width: 768px) {
    .nav-search-form {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 0;
        width: 100%;
    }

    .nav-search-form input,
    .nav-search-form select,
    .nav-search-form button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Ensure filter item consistency */
.filter-item[data-filter="location"] {
    transition: background 0.3s ease;
}

.filter-item[data-filter="location"]:hover {
    background: rgba(77, 228, 255, 0.2);
}

.filter-item[data-filter="location"].active-filter {
    background: var(--second-color);
    color: var(--bg-color);
}
/* Search Results Specific Styles */
.search-results .post-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.search-results .post-box {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding: 15px;
}

.search-results .post-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.search-meta {
    text-align: center;
    margin-bottom: 2rem;
}

.search-meta h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.search-meta p {
    color: #666;
    font-size: 1.1rem;
}

.search-results .read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--second-color);
    color: white;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-results .read-more:hover {
    background: var(--hover-color);
    transform: translateY(-3px);
}

.no-results {
    text-align: center;
    color: #777;
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

.error {
    text-align: center;
    color: #dc3545;
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

/* Nav Search Form Styles */
.nav-search-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-search-input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
}

.nav-search-btn {
    background: var(--second-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-search-btn:hover {
    background: var(--hover-color);
}

/* Responsive Adjustments */


/* Forced Desktop Mode Overrides - Fix for Overlap and "Ajib" Nav Bar */
.nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    max-width: 800px !important; /* Updated from 1200px to match standard */
    min-width: 800px !important; /* Updated from 1024px to prevent cutoff */
    margin: 0 auto !important;
    padding: 10px 15px !important;
    flex-wrap: nowrap !important;
}



.logo-home-container {
    flex-shrink: 0 !important;
    margin-right: 20px !important;
}


.logo {
    font-size: 1.1rem !important; /* Shrunk further */
    white-space: nowrap !important;
    font-weight: 800 !important;
}



.nav-search-form {
    display: flex !important;
    flex-grow: 0 !important;
    max-width: 200px !important;
    margin: 0 auto 0 20px !important; /* Shifting search left-ish and pushing icons to the far right */
}



.nav-right {
    display: flex !important;
    position: static !important;
    width: auto !important;
    flex-grow: 1 !important; /* Allow this container to take up remaining space */
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
    gap: 0.8rem !important;
    flex-direction: row !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    justify-content: flex-end !important;
}


.nav-link {
    color: var(--bg-color) !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    border: none !important;
    padding: 0 !important;
}

header.shadow .nav-link {
    color: var(--text-color) !important;
}

.menu-toggle, .nav-overlay {
    display: none !important;
}

.notification-dropdown, .dropdown-content {
    position: absolute !important;
    display: none; /* Controlled by JS active class */
}

.profile-dropdown.active .dropdown-content,
.notification-dropdown.active {
    display: block !important;
}

/* Post Grid Fix for Desktop View on Mobile - 2 Column Layout */
.post-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 columns for tablets/small desktops */
    width: 800px !important;
    min-width: 800px !important;
    margin: 0 auto !important;
}

@media screen and (max-width: 800px) {
    .post-container {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns for mobile phones */
    }
}

/* Footer and Copyright Fix for Forced Desktop Mode */
footer, .copyright {
    width: 800px !important;
    min-width: 800px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

footer {
    padding: 60px 50px 40px !important; /* Slightly reduced padding to fit content better */
}

/* Smooth Transitions & Performance Optimizations */
.post-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.nav-link:hover {
    color: var(--second-color) !important;
    transform: translateY(-2px);
}

/* Skeleton Loading Shimmer */
.skeleton {
    background: #f6f7f8;
    background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    display: inline-block;
    position: relative;
    animation: placeholderShimmer 1.5s linear infinite forwards;
}

@keyframes placeholderShimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Optimize AOS performance */
[data-aos] {
    pointer-events: none;
}
[data-aos].aos-animate {
    pointer-events: auto;
}