/* ========== COLOR PALETTE ==========
   Dark Blue:    #0E3746
   Beige:        #EAE8DC
   Off White:    #F4F2EC
   Accent Red:   #BE2623
*/

:root {
    --dark-blue: #0E3746;
    --beige: #EAE8DC;
    --off-white: #F4F2EC;
    --accent-red: #BE2623;

    --text-color: #1a1a1a;
    --bg-color: var(--beige);
    --card-bg: var(--off-white);
    --active-tab-bg: var(--beige);
    --active-tab-text: var(--accent-red);
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header.page-header {
    background-color: var(--dark-blue);
    color: white;
    padding: 0.5rem 1rem;
}

.logo-tabs-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    height: 70px;
    max-width: 100%;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.2));
}

body.dark .logo-container img {
    filter: brightness(1.2) drop-shadow(0 0 3px rgba(255,255,255,0.3));
}

.date-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: var(--dark-blue);
    border-bottom: 2px solid var(--accent-red);
    gap: 0.5rem;
    padding: 0.5rem;
    overflow: hidden;
}

.date-tabs button {
    background: none;
    border: none;
    color: var(--off-white);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.date-tabs button.active {
    background-color: var(--active-tab-bg);
    color: var(--active-tab-text);
    border-radius: 5px 5px 0 0;
    font-weight: bold;
}

.region-tabs {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    background-color: var(--off-white);
    gap: 1rem;
    border-bottom: 1px solid #ccc;
}

.region-tabs::-webkit-scrollbar {
    display: none;
}

.region-tabs button {
    background: none;
    border: none;
    padding: 1rem 1rem;
    font-weight: bold;
    color: var(--dark-blue);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.region-tabs button.active {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.pharmacy-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    min-height: 220px;
}

@media (min-width: 768px) {
    .logo-tabs-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .date-tabs {
        justify-content: center;
        flex-wrap: nowrap;
        padding: 0.5rem 0;
    }

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

/* Force 1-column pharmacy cards on mobile */
@media (max-width: 767.98px) {
    .pharmacy-list {
        grid-template-columns: 1fr !important;
    }
    .pharmacy-card {
        max-width: 98vw;
        margin: 0 auto;
    }
    .date-tabs, .region-tabs {
        font-size: 1.07rem;
        padding: 0.5rem 0.2rem;
        gap: 0.2rem;
    }
    .date-tabs button, .region-tabs button {
        padding: 0.7rem 0.5rem;
        font-size: 1rem;
    }
}

/* Make nav/tabs more readable on very small screens */
@media (max-width: 430px) {
    .date-tabs, .region-tabs {
        font-size: 0.97rem;
    }
    .date-tabs button, .region-tabs button {
        padding: 0.6rem 0.2rem;
        font-size: 0.95rem;
    }
}


@media (min-width: 1024px) {
    .pharmacy-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pharmacy-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    content-visibility: auto;
    contain-intrinsic-size: 400px; /* estimate of how big each card will be */
}

/* Styles for the Nearest Pharmacy Carousel */
.nearest-pharmacies-scroll-container {
  position: relative; /* Needed for absolute positioning of arrows */
  margin: 0 auto; /* Center if needed */
  padding: 0 20px; /* Add space for arrows */
}

.nearest-pharmacies-scroll {
  display: flex;
  overflow-x: auto;
  gap: 15px; /* Space between cards */
  padding-bottom: 10px; /* Space below cards, adjust as needed */

  /* Scroll Snapping */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.nearest-pharmacies-scroll::-webkit-scrollbar {
  height: 8px; /* Adjust scrollbar height */
}

.nearest-pharmacies-scroll::-webkit-scrollbar-thumb {
  background: #ccc; /* Scrollbar thumb color */
  border-radius: 4px;
}

.nearest-pharmacies-scroll::-webkit-scrollbar-track {
  background: #f0f0f0; /* Scrollbar track color */
}

.nearest-pharmacies-scroll-container > .scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(30, 30, 30, 0.7); /* Darker, more opaque background */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle border */
    border-radius: 50%;
    padding: 0; /* Reset padding */
    margin: 0; /* Reset margin */
    font-size: 20px; /* Size of the arrow character */
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box; /* Include padding and border in total width/height */
    -webkit-appearance: none; /* Remove default iOS styling */
    -moz-appearance: none;    /* Remove default Firefox styling */
    appearance: none;         /* Remove default browser styling */
    display: flex;            /* Use flex for robust centering */
    align-items: center;      /* Vertically center content */
    justify-content: center;  /* Horizontally center content */
}

.nearest-pharmacies-scroll-container > .scroll-arrow:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}

.nearest-pharmacies-scroll-container > .scroll-arrow.prev {
    left: 10px;
}

.nearest-pharmacies-scroll-container > .scroll-arrow.next {
    right: 10px;
}

.pharmacy-info h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--accent-red);
    font-size: 1.1rem;
}

.pharmacy-info p {
    margin: 0.3rem 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

.pharmacy-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pharmacy-actions .btn {
    background-color: var(--dark-blue);
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
    transition: background-color 0.2s;
}

.pharmacy-actions .btn:hover {
    background-color: #0a2833; /* Darker shade of dark blue */
}

.find-nearest-btn {
    margin: 1rem auto;
    padding: 12px 20px !important;
    background: #d32f2f !important; /* Main red color */
    color: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s;
    box-shadow: none;
}

.find-nearest-btn:hover {
    background: #b71c1c !important;
    color: #fff !important;
}

.find-nearest-btn:focus {
    background: #b71c1c !important;
    color: #fff !important;
}

.pulsing-dot {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
    animation: pulse-dot 1.2s infinite;
    border: 2px solid #d32f2f;
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255,255,255, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255,255,255, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255,255,255, 0);
    }
}

.map-skeleton {
    width: 100%;
    height: 200px; /* Or aspect-ratio: 16/9; */
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.map-container .map-embed-placeholder {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.map-container .map-embed-placeholder .skeleton-animation {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.map-container {
    position: relative;
    min-height: 200px;
}

.map-container iframe,
.map-embed-placeholder {
    position: relative;
    z-index: 3;
}

.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    min-height: 200px;
}

.map-embed-placeholder {
    width: 100%;
    height: 200px; /* Default fixed height */
    background-color: #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-style: italic;
    border-radius: 8px;
    cursor: pointer; /* Indicate it's clickable */
}

@media (max-width: 600px) {
    .map-embed-placeholder {
        height: 150px; /* Smaller height on small screens */
    }
}

.map-container iframe {
    border-radius: 8px;
    border: none;
    width: 100%;
    height: 100%;
    min-height: 200px; /* Ensure a minimum height */
}

.pharmacy-card-skeleton {
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.skeleton-block {
    background: #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.skeleton-map {
    height: 150px;
    width: 100%;
}

.skeleton-title {
    width: 60%;
    height: 1.5rem;
    background: #e0e0e0;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.skeleton-lines {
    width: 90%;
    height: 3rem;
    background: #e0e0e0;
    border-radius: 6px;
}

.nearest-arrow {
    background: #fff;
    border: 2px solid #d32f2f;
    color: #d32f2f;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nearest-arrow:hover {
    background: #d32f2f;
    color: #fff;
    transform: scale(1.1);
}

.nearest-arrow.prev {
    margin-right: 0.5em;
}

.nearest-arrow.next {
    margin-left: 0.5em;
}

.pharmacy-distance-list {
  list-style: none;
  padding: 0;
  margin: 1em 0 0 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.pharmacy-distance-list-item {
  padding: 0.5em 1em;
  border-bottom: 1px solid #eee;
  font-size: 1.1em;
  color: #222;
}
.pharmacy-distance-list-item:last-child {
  border-bottom: none;
}

/* Carousel for nearest pharmacy */
.nearest-carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2em auto 1em auto;
  gap: 2em;
  max-width: 700px; /* Limit width of overall carousel container */
}

.nearest-carousel-card {
  display: none; /* Hidden by default, JS will show the active one */
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 1.5em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  min-width: 300px; /* Ensure card is not too small */
}

.nearest-carousel-card.active {
  display: block;
}

.nearest-carousel-card h4 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: #BE2623;
}

.carousel-dot-container {
  text-align: center;
  margin-top: 1.5em;
}

.carousel-dot {
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  background-color: #BE2623;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: #ccc;
    border-radius: 50%;
    display: inline-block;
    margin: 0 5px;
    cursor: pointer;
}

.dot.active {
    background-color: #BE2623;
}

.nearest-carousel-card-content {
    margin-bottom: 1em;
}
.nearest-pharmacy-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1em;
}
.carousel-card-number {
  font-size: 1em;
  color: #555;
  margin: 0 1em;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-right: 0.7em;
  vertical-align: middle;
}
.nearest-carousel-card h4, .nearest-carousel-card .pharmacy-title {
  display: inline-block;
  vertical-align: middle;
  margin-top: 0;
}
.nearest-carousel-card {
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  min-width: 350px;
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5em 1.2em 1.5em 1.2em;
  position: relative;
}
.distance-info {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  margin-top: 1.2em;
  font-size: 1.1em;
}
.distance-mode {
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.icon-car::before {
  content: '\1F697'; /* 🚗 */
  font-size: 1.3em;
  margin-right: 0.2em;
}
.icon-walk::before {
  content: '\1F6B6'; /* 🚶 */
  font-size: 1.3em;
  margin-right: 0.2em;
}
.carousel-card-number {
  position: absolute;
  bottom: 10px;
  right: 18px;
  background: rgba(20,60,70,0.9); /* header color, semi-transparent */
  color: #fff;
  font-size: 1.1em;
  padding: 0.25em 0.7em;
  border-radius: 14px;
  font-weight: bold;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  z-index: 3;
}

/* EN YAKIN ECZANE LİSTESİ TASARIMI */
.nearest-list-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem 1rem 1rem 1rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(20,60,70,0.10), 0 1.5px 4px rgba(0,0,0,0.09);
    position: relative;
}
.nearest-list-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.35rem;
    text-align: center;
    color: #BE2623;
}
.nearest-list-container .carousel-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    background: #E84C3D;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.09);
    transition: background 0.2s;
}
.nearest-list-container .carousel-close-btn:hover {
    background: #b71c1c;
}
.nearest-list-card {
    margin: 1.2rem auto;
    max-width: 520px;
    background: #F4F2EC;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(20,60,70,0.08);
    padding: 1.2rem 1.2rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: box-shadow 0.2s;
}
.nearest-list-card:hover {
    box-shadow: 0 6px 24px rgba(20,60,70,0.13);
}
.nearest-list-card .pharmacy-info h4 {
    color: #BE2623;
    margin-bottom: 0.3rem;
}
.nearest-list-card .map-container {
    margin-top: 0.4rem;
    border-radius: 9px;
    overflow: hidden;
    min-height: unset;
}
.nearest-list-card .map-container img {
    border-radius: 9px;
    min-height: 120px;
    max-height: 180px;
    object-fit: cover;
}
.nearest-list-card .distance-info {
    margin-top: 0.4rem;
    display: flex;
    gap: 1.5rem;
    font-size: 1.01rem;
    color: #143C46;
    font-weight: 500;
    align-items: center;
}
@media (min-width: 900px) {
  .nearest-list-container {
    padding: 2.5rem 2rem 2rem 2rem;
  }
  .nearest-list-card {
    max-width: 48%;
    margin-left: 1%;
    margin-right: 1%;
    display: inline-block;
    vertical-align: top;
  }
  .nearest-list-container {
    text-align: left;
  }
}
@media (max-width: 600px) {
  .nearest-list-container {
    padding: 0.7rem 0.2rem 1rem 0.2rem;
  }
  .nearest-list-card {
    max-width: 100%;
    padding: 0.9rem 0.6rem 0.8rem 0.6rem;
  }
}

/* Styles for Directions Info */
.directions-info {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee; /* Light separator */
    font-size: 0.85rem;
    color: #555; /* Slightly muted text color */
}

.direction-detail {
    margin-bottom: 0.3rem;
    display: flex; /* Align icon and text */
    align-items: center;
}

.direction-detail svg {
    margin-right: 5px; /* Space between icon and text */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.error-text {
    color: var(--accent-red);
    font-style: italic;
}

/* Simple loading dots animation */
.loading-dots::after {
    content: '.';
    animation: loading-dots 1s steps(5, end) infinite;
    display: inline-block; /* Needed for animation */
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 80%, 100% { content: '...'; }
}

.pharmacy-info p {
    margin: 0.3rem 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

/* FOOTER STYLES (Non-Sticky) */
.site-footer {
    width: 100%;
  
    padding: 20px 0; /* Increased padding slightly */
    text-align: center;
    border-top: 2px solid #e0e0e0; /* A light border on top */
    font-family: Arial, sans-serif;
    font-size: 0.9em;
    color: #333;
    margin-top: 30px; /* Added margin to separate from content */
}

.footer-content {
    display: block;
    text-align: center;
    max-width: 960px; /* Max width for content within footer */
    margin: 0 auto; /* Center the content */
    padding: 0 15px; /* Padding on the sides */
}

.footer-logo {
    height: 30px; /* Adjust height as needed */
    width: auto;
    vertical-align: middle;
    margin-bottom: 10px; /* Added space below logo */
}

.footer-content p {
    margin: 5px 0; /* Added vertical margin, kept horizontal at 0 */
}

.footer-content a {
    color: #007bff; /* Standard link color */
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Nearest Pharmacies Carousel Styles */
#nearest-pharmacies-container {
    /* Styles for the main container if needed, e.g., background for the whole section */
    /* background-color: #f0f0f0; Example background */
    padding-top: 15px; /* Add some space above the heading */
}

.nearest-pharmacies-scroll-container {
    position: relative; /* For positioning arrows */
    overflow: hidden; /* Ensures arrows don't cause overall container to expand if they briefly push out */
}

.nearest-pharmacies-scroll {
    display: flex;
    overflow-x: auto; /* Enables horizontal scrolling */
    scroll-snap-type: x mandatory; /* Snaps to cards */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 15px; /* Space for scrollbar if visible, and content */
    gap: 15px; /* Space between cards */
}

/* Hide scrollbar for a cleaner look, but still allow scrolling */
.nearest-pharmacies-scroll::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Opera */
}
.nearest-pharmacies-scroll {
    -ms-overflow-style: none;  /* For IE and Edge */
    scrollbar-width: none;  /* For Firefox */
}

.nearest-pharmacy-card {
    background-color: #ffffff; /* White background */
    border: 1px solid #e0e0e0; /* Light border */
    border-radius: 8px; /* Rounded corners */
    padding: 15px;
    min-width: 280px; /* Minimum width for each card */
    max-width: 320px; /* Maximum width for each card */
    flex: 0 0 auto; /* Prevent cards from shrinking/growing */
    scroll-snap-align: start; /* Snap to the start of each card */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-sizing: border-box; /* Ensure padding and border are included in width/height */
}

.nearest-pharmacy-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--dark-blue, #0E3746);
}

.nearest-pharmacy-card p {
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.4;
}

.nearest-pharmacies-scroll-container > .scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(30, 30, 30, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nearest-pharmacies-scroll-container > .scroll-arrow:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}

.nearest-pharmacies-scroll-container > .scroll-arrow.prev {
    left: 10px;
}

.nearest-pharmacies-scroll-container > .scroll-arrow.next {
    right: 10px;
}

.map-image-container img {
    border-radius: 6px;
    display: block;
}

.warning-message {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 6px;
    font-size: 0.9em;
}

/* Styles for individual details within the card, like phone, email */
.nearest-pharmacy-card .contact-link {
    color: var(--accent-red, #BE2623);
    text-decoration: none;
}

.nearest-pharmacy-card .contact-link:hover {
    text-decoration: underline;
}

.pager {
    font-weight: bold;
    color: var(--dark-blue, #0E3746);
    margin-right: 5px;
}

/* Responsive adjustments for nearest pharmacy cards on mobile */
@media (max-width: 575.98px) { /* Target extra small to small screens (Bootstrap's sm breakpoint) */
  #nearest-pharmacies-container {
    position: relative; /* Needed for the left/transform centering trick */
    left: 50%;
    transform: translateX(-50%);
    width: 100vw; /* Full viewport width */
    max-width: 100vw; /* Ensure it doesn't exceed viewport */
    padding-left: 0 !important;  /* Override inline style for horizontal padding */
    padding-right: 0 !important; /* Override inline style for horizontal padding */
    /* Vertical padding (1rem top/bottom) is maintained by its inline style */
    box-sizing: border-box;
    /* overflow-x: hidden; /* May not be needed with 100vw but good to keep in mind */
  }
  .nearest-pharmacies-scroll-container {
    width: 100%; /* This will now be 100% of 100vw */
    box-sizing: border-box;
  }
  .nearest-pharmacies-scroll {
    gap: 0; 
    width: 100%; 
    box-sizing: border-box;
    /* Add a small padding so cards don't sit directly under the absolute positioned arrows */
    padding-left: 5px; 
    padding-right: 5px;
  }
  .nearest-pharmacy-card {
    width: 100%; 
    max-width: 100%; 
    /* box-sizing: border-box; is inherited from base style */
    /* Card's own internal padding (15px) will provide content spacing */
  }
  .email-subscribe-section {
    padding: 18px 6px;
    margin: 18px 0;
    max-width: 99vw;
  }
  .email-subscribe-section h3 {
    font-size: 1.1rem;
  }
  .email-subscribe-form input[type=email],
  .email-subscribe-form button[type=submit] {
    font-size: 1rem;
    padding: 10px 10px;
  }
}

/* Email Subscription Section Styles - moved from index.php and enhanced */
.email-subscribe-section {
  background-color: #f0f8ff;
  padding: 32px 24px;
  margin: 36px auto;
  max-width: 520px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  border: 1px solid #e3eaf2;
}
.email-subscribe-section h3 {
  color: #0056b3;
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.email-subscribe-form input[type=email] {
  width: 100%;
  max-width: 420px;
  padding: 13px 16px;
  margin-bottom: 17px;
  border: 1.5px solid #b3c8e6;
  border-radius: 6px;
  font-size: 1.08rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.email-subscribe-form input[type=email]:focus {
  border-color: #0056b3;
  background: #f8fbff;
}
.email-subscribe-form button[type=submit] {
  background-color: #28a745;
  color: #fff;
  padding: 13px 28px;
  border: none;
  border-radius: 6px;
  font-size: 1.08rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(40,167,69,0.07);
  margin-top: 2px;
}
.email-subscribe-form button[type=submit]:hover,
.email-subscribe-form button[type=submit]:focus {
  background-color: #218838;
  outline: none;
}
.subscribe-message {
  padding: 11px 13px;
  margin-top: 13px;
  border-radius: 6px;
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: center;
}
.subscribe-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.subscribe-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.subscribe-message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
