/*
Theme Name: Maldives Anthropological Society
Description: A professional academic theme for the Maldives Anthropological Society
Version: 1.0
Author: AhmedIkram/WiseWayPvtLtd
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=EB+Garamond:wght@400;500;600;700&display=swap');
/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #334155;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to right, #1e293b, #1e3a8a);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.site-header.scrolled {
    background: linear-gradient(to right, #1e293b, #1e3a8a);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0; /* Reduced from 1rem → ~10px top/bottom */
}

.site-logo {
    display: flex;
    height: 100%; /* Ensures vertical centering */
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid #fbbf24;
    object-fit: cover;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-decoration: none;
    color: white;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding-bottom: 0.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    color: #fde68a;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Hero Section — unchanged */
.hero-section {
  height: 100vh;
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(30, 58, 138, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Fluid, intelligent padding — perfect as-is */
.hero-content {
  max-width: 64rem;
  width: 100%;
  box-sizing: border-box;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

/* Title Typography — simplified padding */
.hero-title {
  font-family: 'EB Garamond', serif;
  /*font-size: clamp(1.75rem, 2.4rem + 2vw, 3.75rem);*/
  font-size: clamp(1.8rem, calc(2.4rem+2vw),3.75rem)
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  white-space: normal;
  text-wrap: balance;

  /* ✂️ REMOVED: title-specific padding — let .hero-content handle it */

  /* Keep centered & constrained */
  max-width: min(900px, 100%); /* ← safer than fixed 900px */
  
  margin-inline: auto;
  box-sizing: border-box;

  /* Samsung A04 / low-end device fixes */
  overflow-wrap: anywhere;
  word-break: keep-all;
  max-width: min(900px, calc(100% - 1px)); /* ← Key fix */
  margin-inline: auto;
  box-sizing: border-box;

  /* Enable automatic hyphenation */
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;

  /* Optional: improve break behavior */
  overflow-wrap: normal;
  word-wrap: normal;
}


/* Mobile: maintain full-screen feel */
@media (max-width: 640px) {
  .hero-section {
    height: auto;
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Ultra-small devices */
@media (max-width: 320px) {
  /* No need for title padding override if we removed it */
  /* But ensure font-size doesn't get too large */
  .hero-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
  }
}

/* Description & Buttons — unchanged */
.hero-description {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: #fbbf24;
    color: #1e293b;
}

.btn-primary:hover {
    background-color: #f59e0b;
    color: #1e293b;
}

.btn-outline {
    background-color: white;
    color: #1e293b;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: #fbbf24;
    color: white;
    border-color: #fbbf24;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-white {
    background-color: white;
}

.section-gray {
    background-color: #f8fafc;
}

.section-title {
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    color: #1e293b;
    margin-bottom: 3rem;
}

.section-divider {
    width: 4rem;
    height: 0.25rem;
    background-color: #fbbf24;
    margin: 0 auto 3rem;
    border-radius: 9999px;
}

/* About Section */
.about-card {
    max-width: 64rem;
    margin: 0 auto;
    background: linear-gradient(to bottom right, #dbeafe, #f1f5f9);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border: none;
}

.about-quote {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-style: italic;
    color: #475569;
    line-height: 1.75;
    text-align: center;
}

/* Research Projects Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: none;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.research-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.research-card:hover .research-image {
    transform: scale(1.05);
}

.research-content {
    padding: 1.5rem;
}

.research-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.research-description {
    color: #64748b;
    line-height: 1.75;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(to right, #1e293b, #1e3a8a);
    color: white;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    margin: 0 1.5rem;
}

.cta-title {
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
    }
}

.btn-cta-primary {
    background-color: #fbbf24;
    color: #1e293b;
}

.btn-cta-primary:hover {
    background-color: #f59e0b;
    color: #1e293b;
}

.btn-cta-outline {
    border: 2px solid white;
    color: white;
    background-color: transparent;
}

.btn-cta-outline:hover {
    background-color: white;
    color: #1e293b;
}

/* Site footer styling */
.site-footer {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 3rem 0 2rem;
    margin-top: auto; /* Ensures footer sticks to the bottom if content is short */
}

/* Container for content */
/* Ensure this global container is correctly wrapping content inside the footer */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Footer navigation styles */
.footer-nav {
    margin-bottom: 2rem;
}

/* The DIV generated by wp_nav_menu as the flex container */
.footer-menu-items {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap onto the next line on smaller screens */
    justify-content: center; /* Centers the navigation links */
    gap: 2rem; /* Spacing between the navigation links */
    padding: 0;
    margin: 0;
    list-style: none; /* Good practice, though not strictly needed for a div */
}

/* Individual navigation links (the <a> tags) */
.footer-menu-item {
    color: #cbd5e1; /* Default link color */
    text-decoration: none; /* Remove default underline */
    font-weight: 500;
    font-size: 0.95rem;
    padding-bottom: 0.25rem; /* Space for the underline animation */
    position: relative; /* Essential for positioning the ::after pseudo-element */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    cursor: pointer;
    /* Since these are anchor tags acting as flex items, they don't need 'display: block' unless you want them to fill their flex space fully. They naturally behave well as inline-block for sizing. */
}

/* Hover effects for navigation links */
.footer-menu-item:hover {
    color: #fde68a; /* Lighter yellow on hover */
    transform: translateY(-2px); /* Slight lift effect on hover */
}

/* Underline animation for navigation links */
.footer-menu-item::after {
    content: '';
    position: absolute;
    bottom: -4px; /* Position below the link text */
    left: 0;
    width: 0; /* Starts with no width */
    height: 2px;
    background-color: #fbbf24; /* Yellow underline color */
    transition: width 0.3s ease; /* Animate only the width */
}

.footer-menu-item:hover::after {
    width: 100%; /* Expands to full width on hover */
}

/* Divider styles */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #475569, transparent);
    margin: 2rem 0;
}

/* Copyright styles */
.footer-copyright {
    text-align: center;
    margin-top: 2rem;
}

.footer-copyright p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .footer-menu-items { /* Target the div containing the links */
        flex-direction: column; /* Stack links vertically on small screens */
        gap: 1rem; /* Adjust gap for vertical stacking */
    }

    .site-footer {
        padding: 2rem 0 1.5rem; /* Adjust padding for smaller screens */
    }
}

/* REMOVE these rules if they are still present from previous attempts, as they target <ul>/<li> which aren't being generated: */
/*
.footer-nav ul,
.footer-menu { ... }
.footer-nav li,
.footer-menu-item { ... } (if it also had display: flex/wrap for the li itself)
.site-footer ul { ... }
.site-footer li { ... }
.site-footer li::marker,
.site-footer *::marker { ... }
*/


/* Mobile Navigation Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(to right, #1e293b, #1e3a8a);
        padding: 1rem;
    }
    
    .main-navigation.active ul {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Additional styles for single posts and pages */
.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-meta {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-meta span {
    margin-right: 1rem;
}

.post-featured-image,
.research-featured-image {
    margin-bottom: 2rem;
    text-align: center;
}

.featured-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-content,
.research-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.125rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.post-tags h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #64748b;
}

.post-tags ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.post-tags li {
    background-color: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: #fbbf24;
}

.research-description-meta {
    background: linear-gradient(to bottom right, #dbeafe, #f1f5f9);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid #fbbf24;
}

.research-description-meta h2 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #fbbf24;
    color: white;
    border-color: #fbbf24;
}

.pagination .current {
    background-color: #1e293b;
    color: white;
    border-color: #1e293b;
}

.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #64748b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .post-content,
    .research-content {
        font-size: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.site-logo svg {
    width: 250px;      /* Default size */
    height: auto;      /* Maintain aspect ratio */
}
@media (max-width: 768px) {
    .site-logo svg {
        width: 180px;  /* Smaller on mobile */
    }
#mas-form-messages {max-width: 800px;
        margin: 0 auto 2rem;
        padding: 1rem;
        border-radius: 0.5rem;
    }
    .message-content {
        padding: 1rem;
    }
    .success-message {
        background: #d1fae5;
        color: #065f46;
        border-left: 4px solid #10b981;
    }
    .error-message {
        background: #fee2e2;
        color: #b91c1c;
        border-left: 4px solid #ef4444;
    }
    .honeypot-field {
        position: absolute;
        left: -9999px;
    }
	/* Ensure form row is a flex container */
.form-row {
    display: flex;
    gap: 20px; /* Adjust spacing between fields */
    margin-bottom: 15px; /* Space between rows */
}

/* Make form groups take equal width */
.form-group.half-width {
    flex: 1; /* Each takes 50% width */
    min-width: 0; /* Fix flexbox overflow issues */
}

/* Consistent input styling */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box; /* Prevents padding from increasing width */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Align labels properly */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}
	@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}
	/* Ensures text inside inputs aligns the same way */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
	input[type="subject"],
	input[type="message"]
    textarea,
    select {
    height: 44px; /* Match all input heights */
    line-height: 1.5; /* Vertical centering */
    padding: 10px 12px; /* Consistent padding */
    vertical-align: middle; /* Fixes slight offset */
    input {border: 1px solid red !important; /* Highlights misalignment */
}
   }
	
    <div class="form-group">
    <label for="name">Full Name*</label>
    <input type="text" id="name" name="name" required minlength="2" maxlength="50" 
           style="height: 44px; padding: 10px 12px; line-height: 1.5; box-sizing: border-box; width: 100%;">
</div>
<div class="form-group">
    <label for="email">Email*</label>
    <input type="email" id="email" name="email" required 
           style="height: 44px; padding: 10px 12px; line-height: 1.5; box-sizing: border-box; width: 100%;">
</div>
}

/* --- WooCommerce / Publications Sales Page Styles --- */

/* MAIN FIX: Use auto-fill instead of auto-fit to prevent empty columns */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; /* Changed from auto-fit to auto-fill */
    gap: 2rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* CRITICAL: Remove all pseudo-elements that might interfere */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
    content: none !important;
}

/* Individual product card styling */
.woocommerce ul.products li.product {
    /* Reset all WooCommerce defaults */
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    clear: none !important;
    
    /* Ensure proper grid behavior */
    grid-column: auto !important;
    grid-row: auto !important;
    
    /* Your existing card styles */
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    padding: 1.5rem;
    box-sizing: border-box;
    position: relative;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce ul.products li.product img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    display: block;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title:hover {
    color: #fbbf24;
}

/* Product Price */
.woocommerce ul.products li.product .price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 1rem;
    display: block;
}

.woocommerce ul.products li.product .price del {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.9em;
}

.woocommerce ul.products li.product .price ins {
    color: #fbbf24;
    text-decoration: none;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #1e3a8a;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.woocommerce ul.products li.product .button:hover {
    background-color: #1a2a6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Out of Stock notice */
.woocommerce ul.products li.product .out-of-stock {
    color: #dc2626;
    font-weight: 600;
    margin-top: 0.5rem;
    display: block;
}

/* IMPORTANT: Override any WooCommerce classes that might cause positioning issues */
.woocommerce ul.products li.product.first,
.woocommerce ul.products li.product.last {
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Basic styling for single publication pages */
.single-publication .entry-summary {
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    font-size: 1.125rem;
    color: #334155;
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background-color: #e0f2f7;
    color: #0c4a6e;
    border-left: 5px solid #0ea5e9;
}

.woocommerce-message a.button {
    background-color: #0ea5e9;
    color: white;
}

/* Form styling */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #334155;
    background-color: white;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: #fbbf24;
    color: #1e293b;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #f59e0b;
    transform: translateY(-2px);
}

/* Single product page price styling */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    color: #94a3b8;
    font-size: 0.7em;
    font-weight: 400;
    margin-right: 0.5rem;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
    color: #fbbf24;
    text-decoration: none;
}

/* Quantity input */
.woocommerce .quantity .qty {
    width: 4em;
    height: 2.8em;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

/* Hide only the specific navigation list */
ul[role="navigation"] {
    display: none;
}

/* ==========================================================================
   PUBLICATIONS PAGE STYLES
   ========================================================================== */

/* Page Header */
.publications-page {
    padding: 2rem 0 4rem;
    background-color: #f8fafc;
    min-height: 80vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.page-description {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Filter Section */
.publication-filters {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
    border: 1px solid #e2e8f0;
}

.publication-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #374151;
    background-color: white;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.filter-group input::placeholder {
    color: #9ca3af;
}

/* Publications Grid */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Publication Item Cards */
.publication-item {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.publication-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    border-color: #fbbf24;
}

/* Publication Thumbnail */
.publication-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.publication-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.publication-item:hover .publication-thumbnail img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.publication-icon {
    font-size: 3rem;
    opacity: 0.6;
}

/* Publication Badge */
.publication-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-free {
    background-color: #10b981;
    color: white;
}

.badge-paid {
    background-color: #f59e0b;
    color: white;
}

/* Publication Content */
.publication-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.publication-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.publication-type {
    background-color: #e0f2f7;
    color: #0c4a6e;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.publication-date {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.publication-title {
    margin-bottom: 0.75rem;
}

.publication-title a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    transition: color 0.3s ease;
}

.publication-title a:hover {
    color: #fbbf24;
}

.publication-author {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.publication-excerpt {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.publication-identifier {
    margin-bottom: 1.5rem;
}

.publication-identifier small {
    color: #6b7280;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Publication Actions */
.publication-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.purchase-options {
    margin-bottom: 1rem;
}

.price-range {
    color: #059669;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

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

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-download {
    background-color: #10b981;
    color: white;
}

.btn-download:hover {
    background-color: #059669;
    color: white;
}

.btn-purchase {
    background-color: #f59e0b;
    color: white;
}

.btn-purchase:hover {
    background-color: #d97706;
    color: white;
}

.btn-details {
    background-color: #6366f1;
    color: white;
}

.btn-details:hover {
    background-color: #4f46e5;
    color: white;
}

.btn-icon {
    font-size: 1rem;
}

/* No Publications Message */
.no-publications {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
    font-size: 1.125rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .publications-page {
        padding: 1rem 0 2rem;
    }
    
    .page-header {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }
    
    .publication-filters {
        padding: 1.5rem;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .publication-content {
        padding: 1rem;
    }
    
    .publication-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .publications-grid {
        gap: 1rem;
    }
    
    .publication-filters {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
}

/* Loading State (optional) */
.publications-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.publications-grid.loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #64748b;
    font-weight: 600;
}

/* Animation for filtered items */
.publication-item {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Focus states for accessibility */
.filter-group select:focus,
.filter-group input:focus,
.btn:focus,
.publication-title a:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .publication-filters,
    .publication-actions {
        display: none;
    }
    
    .publications-grid {
        display: block;
    }
    
    .publication-item {
        break-inside: avoid;
        margin-bottom: 2rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ==========================================================================
   SINGLE PUBLICATION PAGE STYLES
   ========================================================================== */

/* Main container for the single publication page */
.single-publication .site-main {
    padding: 3rem 0; /* Add padding top and bottom */
    background-color: #f8fafc; /* Light background from your main page */
    min-height: 70vh; /* Ensure it takes up enough vertical space */
}

/* Container for the article content */
.single-publication article {
    max-width: 900px; /* Max width for readability */
    margin: 0 auto; /* Center the content */
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 2.5rem 3rem; /* Generous padding inside the card */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

/* Page title (Publication title) */
.single-publication .entry-title {
    font-size: clamp(2rem, 4vw, 2.8rem); /* Responsive font size */
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-family: 'Cinzel', serif; /* Consistent with page header */
    text-align: center;
    line-height: 1.3;
}

/* Publication Meta (Author, Date, Type, ISBN/DOI) */
.single-publication .publication-meta {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    justify-content: center; /* Center meta items */
    gap: 1.5rem; /* Space between meta items */
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0; /* Separator line */
    text-align: center; /* Center text within each meta item */
}

.single-publication .publication-meta p {
    margin: 0; /* Remove default paragraph margin */
    font-size: 0.95rem;
    color: #475569;
    font-weight: 500;
}

.single-publication .publication-meta .author,
.single-publication .publication-meta .date,
.single-publication .publication-meta .type {
    /* Specific styling for these meta elements if needed, or inherit from general P */
}

.single-publication .publication-meta .isbn-doi {
    font-family: 'Courier New', monospace;
    background-color: #f1f5f9; /* Lighter background */
    padding: 0.3rem 0.8rem;
    border-radius: 0.3rem;
    font-size: 0.85rem;
    color: #525f75;
}

/* Main Content Area */
.single-publication .entry-content {
    line-height: 1.7;
    color: #374151;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.single-publication .entry-content p {
    margin-bottom: 1.2em; /* Space between paragraphs */
}

.single-publication .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin: 1.5rem 0; /* Space around images */
    display: block; /* Ensures images behave as blocks */
    margin-left: auto; /* Center images */
    margin-right: auto;
}

/* Actions (Download/Purchase buttons) */
.single-publication .publication-actions-single {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap */
    gap: 1rem; /* Space between buttons */
    justify-content: center; /* Center the action buttons */
    margin-top: 2rem; /* Space above buttons */
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0; /* Separator line */
}

/* Specific button styles (reusing your existing .btn, .btn-download, .btn-purchase) */
.single-publication .btn.single-download {
    background-color: #10b981;
    color: white;
}
.single-publication .btn.single-download:hover {
    background-color: #059669;
}

.single-publication .btn.single-purchase {
    background-color: #f59e0b;
    color: white;
}
.single-publication .btn.single-purchase:hover {
    background-color: #d97706;
}

.single-publication .purchase-options-single .price-range {
    color: #059669;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0.75rem;
    width: 100%; /* Ensure price range takes full width above purchase links */
}

.single-publication .purchase-options-single {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content within purchase options */
    gap: 0.75rem;
}


/* Back to Publications Link */
.single-publication .entry-content p:last-child a {
    display: block;
    text-align: center;
    margin-top: 2rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.single-publication .entry-content p:last-child a:hover {
    color: #4f46e5;
    text-decoration: underline;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .single-publication article {
        padding: 2rem;
        margin: 0 1rem; /* Add horizontal margin on smaller screens */
    }

    .single-publication .entry-title {
        font-size: 1.8rem;
    }

    .single-publication .publication-meta {
        flex-direction: column; /* Stack meta items vertically */
        align-items: flex-start; /* Align left */
        gap: 0.75rem;
        padding-bottom: 1rem;
    }

    .single-publication .publication-meta p {
        text-align: left;
    }

    .single-publication .publication-actions-single {
        flex-direction: column;
        align-items: center; /* Center buttons when stacked */
    }
}

@media (max-width: 480px) {
    .single-publication article {
        padding: 1.5rem;
    }

    .single-publication .entry-title {
        font-size: 1.5rem;
    }

    .single-publication .entry-content {
        font-size: 1rem;
    }
}


.news-event-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.news-event-meta span {
    font-size: 0.95rem;
    color: #64748b;
}
.registration-link {
    @extend .btn;
    @extend .btn-primary;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-row input[type="text"],
.filter-row select,
.filter-row button {
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.btn-filter {
    background-color: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn-filter:hover {
    background-color: #005b8f;
}

.live-search-container {
    margin-bottom: 20px;
    position: relative;
}

#publication-live-search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
}

#search-results {
    position: absolute;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 999;
}

#search-results ul {
    margin: 0;
    padding: 0;
}

#search-results li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#search-results li:hover {
    background-color: #f0f0f0;
}

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

/* Make entire research card clickable */
.research-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 2rem;
}
.research-card-link .research-content * {
    pointer-events: none; /* Ensures clicks go to link, not text */
}
.research-card-link:hover .research-card {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}


/* Search form in header */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}
.search-field {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 14px;
    width: 180px;
    transition: border-color 0.2s;
}
.search-field:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}
.search-submit {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
}
.search-submit:hover {
    color: #3b82f6;
}

/* Hide search on very small screens if needed */
@media (max-width: 768px) {
    .search-form {
        display: none;
    }
}

/* Search toggle button */
.search-toggle {
    background: none;
    border: none;
    color: #1e293b;
    font-size: 18px;
    cursor: pointer;
    margin-left: 1.5rem; /* More breathing room */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.search-toggle:hover {
    background-color: #f1f5f9;
}

/* Search overlay */
.search-overlay {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 1rem;
    display: none;
    z-index: 100;
}
.search-overlay.active {
    display: block;
}

/* Expanded search form */
.search-form-expanded {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}
.search-form-expanded .search-field {
    flex: 1;
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 14px;
}
.search-form-expanded .search-post-type {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 14px;
}
.search-form-expanded .search-submit,
.search-form-expanded .search-close {
    background-color: #fbbf24;
    color: #1e293b;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
}
.search-form-expanded .search-close {
    background-color: #e2e8f0;
    color: #64748b;
}

/* Hide search on very small screens if needed */
@media (max-width: 768px) {
    .search-overlay {
        max-width: none;
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
    }
}

.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 0;
    position: relative;
    color: white;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for readability */
    z-index: 1;
}

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

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

