/* Home page specific styles */
.main-container {
    margin-top: 80px;
    padding: 0;
    background: white;
}

/* Ensure no background images on home page */
body {
    background: white !important;
}

body::before {
    display: none !important;
}

/* White footer for home page */
.footer {
    background: white !important;
    color: #1E0E62 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-left h3 {
    color: #ff6b35 !important;
}

.footer-left p {
    color: #1E0E62 !important;
    opacity: 1 !important;
}

.footer-right p {
    color: #1E0E62 !important;
    opacity: 1 !important;
}

.social-links a {
    color: #1E0E62 !important;
}

.social-links a:hover {
    color: #ff6b35 !important;
}

/* Header enhancements */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background: transparent;
}

.search-btn {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #f7931e;
}

.login-btn {
    background: #ff6b35;
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #f7931e;
    transform: translateY(-2px);
}

/* User dropdown styles */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.user-dropdown-toggle:hover {
    background: #f7931e;
    transform: translateY(-2px);
}

.user-dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-dropdown.active .user-dropdown-toggle i {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #ff6b35;
}

.dropdown-item i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0.5rem 0;
}

.logout-btn:hover {
    background: #fee;
    color: #e74c3c !important;
}

/* Hero section */
.hero {
    padding: 4rem 0 2rem 0;
    text-align: center;
    background: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #ff6b35;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Services section */
.services {
    padding: 2rem 0 4rem 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    padding: 0 2rem;
}

.service-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: #ff6b35;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.service-card:hover .service-icon {
    color: #ff6b35;
}

.service-card h3 {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.cta-section {
    text-align: center;
}

.btn-large {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
}

/* Recommendations Section */
.recommendations {
    padding: 4rem 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: #1E0E62;
    margin-bottom: 3rem;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1.5rem;
    width: max-content;
    /* Ensure smooth transitions for infinite carousel */
    will-change: transform;
}

.recommendation-card {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

/* Optional: Visual indicator for cloned cards during development */
/*
.recommendation-card[data-clone="start"] {
    opacity: 0.8;
    border-left: 3px solid #ff6b35;
}

.recommendation-card[data-clone="end"] {
    opacity: 0.8;
    border-right: 3px solid #ff6b35;
}
*/

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 180px;
    width: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
}

.card-image i {
    font-size: 3.5rem;
    color: white;
}

.card-content {
    padding: 1.5rem;
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.card-badge {
    position: absolute;
    top: -20px;
    right: 20px;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-badge i {
    color: #ff6b35;
    font-size: 1.2rem;
}

.card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1E0E62;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    height: 3.2rem;
    /* Use webkit-box for consistent line clamping */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    align-items: flex-start;
}

.card-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.5rem;
}

.contact-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
}

.contact-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.carousel-btn {
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.carousel-btn:hover {
    background: #ff6b35;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.carousel-btn:hover i {
    color: white;
}

.carousel-btn i {
    font-size: 1.2rem;
    color: #666;
    transition: color 0.3s ease;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: white;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-btn:disabled:hover i {
    color: #666;
}

/* Services Grid Section */
.services-grid-section {
    padding: 4rem 0;
    background: white;
}

.services-paginated-grid {
    position: relative;
    min-height: 520px; /* Adjust as needed for 2 rows of 3 cards each, plus spacing */
    margin-bottom: 3rem;
}

#paginationContainer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.services-page {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.services-page.active {
    display: grid;
}

.service-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.service-item .service-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.service-item .service-content p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    max-width: 220px;
    margin-bottom: 1.2rem;
}

.service-item .service-content .service-contact-btn {
    margin-top: auto;
    align-self: flex-end;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-image {
    height: 160px;
    background-color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.service-image img {
  border-radius: 16px 16px 0 0;
}

.service-image i {
    font-size: 3rem;
    color: white;
}

.service-content {
    padding: 1.5rem;
    position: relative;
}

.service-badge {
    position: absolute;
    top: -20px;
    right: 20px;
    background: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.service-badge i {
    color: #ff6b35;
    font-size: 1rem;
}

.service-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1E0E62;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.service-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.service-contact-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    width: 100%;
}

.service-contact-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.pagination-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.pagination-btn.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    border-color: #e0e0e0;
    color: #666;
}

/* Global overflow prevention */
html, body {
    overflow-x: hidden;
    width: 100%;
}

.main-container {
    overflow-x: hidden;
    width: 100%;
}

/* Mobile hamburger menu styles */
/* Removed duplicate mobile-menu-toggle styles - using the correct ones at the end of file */

.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 2rem 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-top: 3px solid #ff6b35;
}

.mobile-nav.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}



.mobile-nav .nav-link,
.mobile-nav .user-dropdown {
    width: 100%;
    text-align: center;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-user-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.mobile-user-info .user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.mobile-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.mobile-dropdown-menu .dropdown-item:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
}

.mobile-dropdown-menu .dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.mobile-logout-btn:hover {
    background: #e74c3c !important;
    color: white !important;
}

/* Touch-friendly button improvements */
.contact-btn,
.service-contact-btn,
.btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Better carousel touch support */
.carousel-track {
    touch-action: pan-x;
}

/* Ensure carousel buttons are visible on desktop */
.carousel-btn {
    display: flex;
}



/* Desktop layout safeguards */
@media (min-width: 769px) {
    .recommendation-card {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
        flex-shrink: 0;
    }
    
    .carousel-wrapper {
        overflow: hidden;
    }
    
    .carousel-track {
        gap: 1.5rem;
    }
}

/* Improved responsive design */
@media (max-width: 768px) {
    /* Mobile header improvements */
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 1rem;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        order: 4; /* Put hamburger on the right */
        min-width: 30px;
        min-height: 30px;
        flex-shrink: 0;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    .mobile-back-btn {
        display: flex; /* Show back button on mobile */
        order: 1; /* Put back button on the left */
    }
    
    .logo {
        display: none; /* Hide logo on mobile */
    }
    
    .search-container {
        display: flex; /* Always show search on mobile */
        order: 2; /* Put search in the middle */
        flex: 1;
        margin: 0 0.5rem;
        max-width: none;
        min-width: 0; /* Allow shrinking */
        padding: 0.3rem;
        background: white;
        border-radius: 25px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .search-input {
        flex: 1;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
    
    .search-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .nav {
        display: none;
    }
    
    /* Fix publication-info address and city layout on mobile */
    .publication-title-section > div {
        position: static !important;
        min-height: auto !important;
        margin-bottom: 1.5rem !important;
    }
    
    .publication-title-section .meta-label {
        position: static !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
        font-weight: 600 !important;
        color: #040404 !important;
    }
    
    .publication-title-section span[style*="position: absolute"] {
        position: static !important;
        display: block !important;
        margin-bottom: 1rem !important;
        padding-left: 0 !important;
    }
    
    .publication-title-section div[style*="display: flex"] {
        display: block !important;
        height: auto !important;
        margin-top: 1rem !important;
    }
    
    .publication-title-section div[style*="display: flex"] span {
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    
    .publication-title-section div[style*="display: flex"] span:not(.meta-label) {
        display: inline !important;
        margin-bottom: 0 !important;
    }
    
    /* Fix email and contact fields overflow on mobile */
    .publication-contact .meta-row,
    .publication-meta .meta-row {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 1rem !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .publication-contact .meta-label,
    .publication-meta .meta-label {
        margin-bottom: 0.3rem !important;
        flex-shrink: 0 !important;
    }
    
    .publication-contact .meta-row span:not(.meta-label),
    .publication-meta .meta-row span:not(.meta-label) {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    /* Specific fix for email field */
    #pubEmail {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
    }
    
    /* Hero section mobile improvements */
    .hero {
        padding: 2rem 0 1.5rem 0;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    /* Services grid mobile improvements */
    .services {
        padding: 1.5rem 0 3rem 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
        max-width: none;
    }
    
    .service-card {
        padding: 1.2rem 0.8rem;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .service-icon {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }
    
    .service-card h3 {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    /* Recommendations mobile improvements */
    .recommendations {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .carousel-container {
        flex-direction: column;
        gap: 0;
        padding: 0 1rem;
    }
    
    .carousel-wrapper {
        overflow-x: scroll;
        overflow-y: hidden;
        border-radius: 15px;
        position: relative;
        /* Enable smooth scrolling for full-width cards on mobile */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        /* Hide scrollbar for cleaner look */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .carousel-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    /* Add visual hint for swipe on mobile */
    .carousel-wrapper::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: 4px;
        height: 30px;
        background: linear-gradient(to bottom, transparent, rgba(255, 107, 53, 0.3), transparent);
        border-radius: 2px;
        pointer-events: none;
    }
    
    .carousel-track {
        gap: 0;
        will-change: transform;
    }
    
    .carousel-btn {
        display: none; /* Hide carousel buttons on mobile - users can swipe instead */
    }
    
    .recommendation-card {
        width: 70vw;
        min-width: 70vw;
        max-width: 70vw;
        margin: 0 2vw;
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .card-image {
        height: 160px;
    }
    
    .card-content {
        padding: 1.2rem;
    }
    
    .card-content h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
        /* Fix line clamping for mobile */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: auto;
        min-height: 2.4rem;
        line-height: 1.2;
        align-items: flex-start;
    }
    
    .card-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* Services Grid mobile improvements */
    .services-grid-section {
        padding: 2rem 0;
    }
    
    .services-grid-section .container {
        padding: 0 1rem;
    }
    
    .services-page {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        max-width: none;
    }
    
    .service-item {
        max-width: none;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
    
    .service-image {
        background-color: #ffffff !important;
        height: 160px;
    }
    
    .service-image i {
        font-size: 2.5rem;
    }
    
    .service-content {
        padding: 1.2rem;
    }
    
    .service-content h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .service-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .service-contact-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Pagination mobile improvements */
    .pagination {
        flex-wrap: wrap;
        gap: 0.4rem;
        justify-content: center;
        padding: 0 1rem;
    }
    
    .pagination-btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Footer mobile improvements */
    .footer .container {
        padding: 0 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-right {
        order: 1;
    }
    
    .footer-left {
        order: 2;
    }
}

@media (max-width: 480px) {
    /* Very small mobile screens optimization */
    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .service-card {
        padding: 1rem 0.6rem;
        min-height: 120px;
    }
    
    .service-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .service-card h3 {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .carousel-container {
        padding: 0 0.5rem;
    }
    
    .recommendation-card {
        width: 70vw;
        min-width: 70vw;
        max-width: 70vw;
        margin: 0 1.5vw;
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .card-image {
        height: 140px;
    }
    
    .card-image i {
        font-size: 2.2rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-content h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        /* Fix line clamping for small mobile */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: auto;
        min-height: 2.3rem;
        line-height: 1.2;
        align-items: flex-start;
    }
    
    .card-content p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    
    .contact-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    /* Services Grid for very small mobile */
    .services-grid-section .container {
        padding: 0 0.5rem;
    }
    
    .services-page {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-image {
        background-color: #ffffff !important;
        height: 140px;
    }
    
    .service-image i {
        font-size: 2.2rem;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .service-content h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .service-content p {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
    .service-contact-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .pagination {
        padding: 0 0.5rem;
        gap: 0.3rem;
    }
    
    .pagination-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 40px;
    }
    
    /* Search container improvements for very small screens */
    .search-container {
        margin: 0 0.3rem;
        padding: 0.2rem;
    }
    
    .search-input {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .search-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    /* Mobile navigation improvements for small screens */
    .mobile-nav {
        padding: 0.8rem;
    }
    

    
    .mobile-dropdown-menu .dropdown-item {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .mobile-user-info {
        padding: 0.8rem;
    }
    
    .mobile-user-info .user-name {
        font-size: 1rem;
    }
}



/* Removed redundant .recommendation-card h3 styles - now handled by .card-content h3 with proper mobile breakpoints */

.recommendation-card p {
    font-size: 0.95rem;
    color: #444;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
    max-width: 100%;
}

/* Publication Badges */
.publication-badge.gold {
  background: linear-gradient(90deg, #FFD700 0%, #FFC300 100%);
  color: #7c5a00;
  border: 1px solid #ffe066;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}
.publication-badge.diamond {
  background: linear-gradient(90deg, #fff 0%, #e0e7ef 100%);
  color: #2a3a4d;
  border: 1px solid #b8c6db;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.10);
}
.publication-badge.diamond::before {
  content: '\f3a5'; /* fa-gem */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 0.5em;
  color: #5e72e4;
}

/* Ensure image containers are relative for badge positioning */
.card-image, .service-image {
  position: relative;
}

.publication-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 0.3em 1em;
  border-radius: 16px;
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.5px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  margin: 0;
}

.publication-info-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.publication-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.publication-image-section {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.publication-carousel {
  width: 100%;
  max-width: 700px;
  position: relative;
  margin-bottom: 1rem;
}
.carousel-images {
  width: 100%;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: #f8f9fa;
  position: relative;
}
.carousel-images img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ff6b35;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s;
}
.carousel-arrow:hover {
  background: #ff6b35;
  color: #fff;
}
.carousel-arrow.left {
  left: 10px;
}
.carousel-arrow.right {
  right: 10px;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active {
  background: #ff6b35;
}
.publication-main-image {
  display: none; /* Hide old single image style */
}
.publication-details-section {
  flex: 2 1 340px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.publication-details-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.publication-details-section p {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1rem;
}
.publication-meta {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1.1rem;
}
.meta-label {
  font-weight: 600;
  color: #222;
  min-width: 120px;
  margin-right: 1em;
}

@media (max-width: 480px) {
  .meta-label {
    min-width: 80px;
    font-size: 0.9rem;
  }
}
.publication-contact {
  background: #f1f3f6;
  border-radius: 12px;
  padding: 1rem 1.5rem;
}
#backBtn {
  margin-bottom: 1.5rem;
  background: #f8f9fa;
  color: #ff6b35;
  border: 1px solid #ff6b35;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
#backBtn:hover {
  background: #ff6b35;
  color: #fff;
}
@media (max-width: 900px) {
  .publication-card {
    flex-direction: column;
    align-items: center;
  }
  .publication-image-section, .publication-details-section {
    min-width: 0;
    max-width: 100%;
  }
  .publication-main-image {
    max-width: 100%;
    height: 180px;
  }
}
.section-subtitle {
  color: #ff6b35;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 1.2rem;
}
#pubTitle {
  color: #ff6b35;
}

.search-page-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.search-filters-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.filters-title {
  font-weight: 700;
  color: #222;
  letter-spacing: 1px;
  font-size: 1.1rem;
}
.filters-btn {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.5em 1em;
  font-size: 1.1rem;
  color: #ff6b35;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filters-btn:hover {
  background: #ff6b35;
  color: #fff;
}
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.publication-card-search {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.5rem 2rem;
  align-items: flex-start;
  position: relative;
}
.publication-card-image {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.publication-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.publication-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.publication-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ff6b35;
  margin-bottom: 0.2rem;
}
.publication-card-desc {
  font-size: 1rem;
  color: #444;
  margin-bottom: 0.5rem;
  max-width: 600px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.publication-card-meta {
  font-size: 0.98rem;
  color: #222;
  margin-bottom: 0.3rem;
}
.publication-card-btn {
  margin-top: 0.7rem;
  align-self: flex-end;
  background: #ff6b35;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6em 1.3em;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.publication-card-btn:hover {
  background: #f7931e;
}
#searchPagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
#searchPagination .pagination-btn {
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #222;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#searchPagination .pagination-btn.active, #searchPagination .pagination-btn:hover {
  background: #ff6b35;
  color: #fff;
  border-color: #ff6b35;
}

/* --- White navbar/header for index page --- */
.header {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Mobile-only elements (hidden on desktop) */
.mobile-only {
    display: none;
}

/* Mobile Back Button */
.mobile-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    flex-grow: 0;
    border: none;
}

.mobile-back-btn:hover {
    background: #f7931e;
    transform: scale(1.05);
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #ff6b35;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 80px; /* Match header height */
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-links {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    color: #ff6b35;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-user-name {
    color: #ff6b35;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-left: 1rem;
}

.mobile-dropdown-item:hover {
    background: #f8f9fa;
    color: #ff6b35;
}

.mobile-dropdown-item i {
    width: 20px;
    text-align: center;
}