/* ========================================
   BASKIN ROBBINS NEPAL - OUTLET LOCATOR
   Fully Responsive CSS for All Devices
   ======================================== */

:root {
  --br-pink: #ff7bac;
  --br-pink-dark: #e5559c;
  --br-blue: #0360b0;
  --br-brown: #6b4423;
  --br-cream: #fff9f5;
  --br-white: #ffffff;
  --br-gray: #f5f5f5;
  --br-text: #2d2d2d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  background: linear-gradient(135deg, var(--br-cream) 0%, #ffe8f0 100%);
  color: var(--br-text);
  min-height: 100vh;
  padding-bottom: 60px;
  overflow-x: hidden;
}

/* ========================================
   HEADER SECTION
   ======================================== */

.header {
  background: linear-gradient(
    135deg,
    #ff1f8e 0%,
    #ff1f8e 100%
  );
  padding: 50px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.header::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-20px) translateX(20px);
  }
}

.logo-section {
  position: relative;
  z-index: 20;
  margin-bottom: 10px;
}

.logo-text {
  font-family: "Fredoka", sans-serif;
  /* Reduced font size from 56px to 48px */
  font-size: 48px;
  font-weight: 700;
  color: var(--br-white);
  margin-bottom: 5px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  letter-spacing: 1px;
}

.logo-subtext {
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  letter-spacing: 3px;
}

.header h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 42px;
  color: var(--br-white);
  margin: 30px 0 15px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.header p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

.store-count {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  padding: 10px 25px;
  border-radius: 30px;
  margin-top: 20px;
  font-weight: 600;
  font-size: 16px;
  color: white;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.search-container {
  max-width: 1200px;
  /* Adjusted margin from -40px auto 40px to -30px auto 40px to match shorter header */
  margin: -30px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.search-box {
  background: var(--br-white);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(255, 123, 172, 0.2);
  display: flex;
  gap: 15px;
  align-items: center;
  transition: all 0.3s ease;
}

.search-box:hover {
  box-shadow: 0 15px 50px rgba(255, 123, 172, 0.3);
  transform: translateY(-2px);
}

.search-icon {
  font-size: 24px;
  color: var(--br-pink);
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  font-family: "DM Sans", sans-serif;
  color: var(--br-text);
  font-weight: 500;
  min-width: 0;
}

#searchInput::placeholder {
  color: #999;
}

.clear-search {
  background: #ff1f8e;;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.clear-search:hover {
  background: var(--br-pink-dark);
  transform: scale(1.05);
}

.clear-search:active {
  transform: scale(0.98);
}

/* ========================================
   OUTLETS GRID
   ======================================== */

.outlets-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.outlets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.outlet-card {
  background: var(--br-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.outlet-card:nth-child(1) {
  animation-delay: 0.1s;
}
.outlet-card:nth-child(2) {
  animation-delay: 0.2s;
}
.outlet-card:nth-child(3) {
  animation-delay: 0.3s;
}
.outlet-card:nth-child(4) {
  animation-delay: 0.4s;
}
.outlet-card:nth-child(5) {
  animation-delay: 0.5s;
}
.outlet-card:nth-child(6) {
  animation-delay: 0.6s;
}
.outlet-card:nth-child(7) {
  animation-delay: 0.1s;
}
.outlet-card:nth-child(8) {
  animation-delay: 0.2s;
}
.outlet-card:nth-child(9) {
  animation-delay: 0.3s;
}
.outlet-card:nth-child(10) {
  animation-delay: 0.4s;
}
.outlet-card:nth-child(11) {
  animation-delay: 0.5s;
}
.outlet-card:nth-child(12) {
  animation-delay: 0.6s;
}

.outlet-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(255, 123, 172, 0.2);
}

.outlet-card.hidden {
  display: none;
}

/* ========================================
   MAP CONTAINER
   ======================================== */

.map-container {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
  background: var(--br-gray);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ========================================
   OUTLET INFO
   ======================================== */

.outlet-info {
  padding: 25px;
}

.outlet-name {
  font-family: "Fredoka", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--br-pink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.outlet-number {
  background: linear-gradient(135deg, var(--br-blue) 0%, #0280d5 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.outlet-location {
  color: var(--br-text);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
  display: flex;
  align-items: start;
  gap: 8px;
}

.location-icon {
  color: var(--br-pink);
  margin-top: 3px;
  flex-shrink: 0;
}

.outlet-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.feature-tag {
  background: linear-gradient(135deg, #ffe8f0 0%, #ffd4e5 100%);
  color: var(--br-pink);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.outlet-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 14px;
  color: #333;
}

.phone-icon {
  font-size: 16px;
}

.outlet-phone a {
  color: #ff1f8e;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.outlet-phone a:hover {
  color: #e01b7f;
  text-decoration: underline;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination-container {
  max-width: 1200px;
  margin: 50px auto 0;
  padding: 0 20px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.pagination button {
  background: var(--br-white);
  color: var(--br-text);
  border: 2px solid #e5e5e5;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "DM Sans", sans-serif;
  min-width: 50px;
}

.pagination button:hover:not(:disabled) {
  background: var(--br-pink);
  color: white;
  border-color: var(--br-pink);
  transform: translateY(-2px);
}

.pagination button:active:not(:disabled) {
  transform: translateY(0);
}

.pagination button.active {
  background: #ff1f8e;;
  color: white;
  border-color: #ff1f8e;;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .prev-btn,
.pagination .next-btn {
  padding: 12px 24px;
  font-weight: 700;
}

.pagination .dots {
  background: transparent;
  border: none;
  cursor: default;
  padding: 12px 8px;
  min-width: auto;
}

.pagination .dots:hover {
  background: transparent;
  transform: none;
  border: none;
}

/* ========================================
   NO RESULTS
   ======================================== */

.no-results {
  text-align: center;
  padding: 80px 20px;
  display: none;
}

.no-results.show {
  display: block;
}

.no-results-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.no-results h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 28px;
  color: var(--br-text);
  margin-bottom: 10px;
}

.no-results p {
  color: #666;
  font-size: 16px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  background: rgba(255, 255, 255, 0.5);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer p {
  color: var(--br-brown);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.footer-flavors {
  font-family: "Fredoka", sans-serif;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--br-pink) 0%, var(--br-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 15px 0;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   Devices between 768px and 1024px
   ======================================== */

@media (max-width: 1024px) and (min-width: 769px) {
  .outlets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .header {
    /* Reduced padding from 50px 20px 70px to 40px 20px 60px */
    padding: 40px 20px 60px;
  }

  .logo-text {
    /* Reduced font size from 48px to 42px */
    font-size: 42px;
  }

  .header h1 {
    font-size: 36px;
  }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE & SMALL TABLET
   Devices up to 768px
   ======================================== */

@media (max-width: 768px) {
  body {
    padding-bottom: 40px;
  }

  .header {
    /* Reduced padding from 40px 15px 60px to 30px 15px 50px */
    padding: 30px 15px 50px;
  }

  .header::before,
  .header::after {
    width: 250px;
    height: 250px;
  }

  .logo-text {
    /* Reduced font size from 38px to 34px */
    font-size: 34px;
    letter-spacing: 0.5px;
  }

  .logo-subtext {
    font-size: 14px;
    letter-spacing: 2px;
  }

  .header h1 {
    font-size: 28px;
    margin: 20px 0 10px;
  }

  .header p {
    font-size: 16px;
    padding: 0 10px;
  }

  .store-count {
    padding: 8px 20px;
    font-size: 14px;
    margin-top: 15px;
  }

  /* Search Box Mobile */
  .search-container {
    /* Adjusted margin from -30px auto 30px to -20px auto 30px */
    margin: -20px auto 30px;
    padding: 0 15px;
  }

  .search-box {
    flex-direction: column;
    padding: 20px;
    gap: 12px;
  }

  .search-icon {
    font-size: 20px;
    align-self: flex-start;
  }

  #searchInput {
    width: 100%;
    font-size: 16px;
  }

  .clear-search {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
  }

  /* Outlets Grid Mobile */
  .outlets-container {
    padding: 0 15px;
  }

  .outlets-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .outlet-card {
    border-radius: 16px;
  }

  .map-container {
    height: 220px;
  }

  .outlet-info {
    padding: 20px;
  }

  .outlet-name {
    font-size: 20px;
    gap: 6px;
  }

  .outlet-number {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .outlet-location {
    font-size: 14px;
  }

  .feature-tag {
    padding: 5px 12px;
    font-size: 12px;
  }

  /* Pagination Mobile */
  .pagination-container {
    margin: 40px auto 0;
    padding: 0 15px;
  }

  .pagination {
    gap: 6px;
    padding: 5px 0;
  }

  .pagination button {
    padding: 10px 14px;
    font-size: 14px;
    min-width: 42px;
    border-radius: 8px;
  }

  .pagination .prev-btn,
  .pagination .next-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .pagination .dots {
    padding: 10px 6px;
  }

  /* No Results Mobile */
  .no-results {
    padding: 60px 20px;
  }

  .no-results-icon {
    font-size: 60px;
  }

  .no-results h3 {
    font-size: 24px;
  }

  .no-results p {
    font-size: 15px;
  }

  /* Footer Mobile */
  .footer {
    padding: 30px 15px;
    margin-top: 40px;
  }

  .footer p {
    font-size: 13px;
  }

  .footer-flavors {
    font-size: 36px;
  }
}

/* ========================================
   RESPONSIVE DESIGN - EXTRA SMALL MOBILE
   Devices up to 480px
   ======================================== */

@media (max-width: 480px) {
  .logo-text {
    /* Reduced font size from 32px to 28px */
    font-size: 28px;
  }

  .logo-subtext {
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .header h1 {
    font-size: 24px;
  }

  .header p {
    font-size: 15px;
  }

  .store-count {
    font-size: 13px;
    padding: 7px 16px;
  }

  .search-box {
    padding: 18px;
  }

  #searchInput {
    font-size: 15px;
  }

  .clear-search {
    font-size: 14px;
    padding: 12px 20px;
  }

  .outlets-grid {
    gap: 16px;
  }

  .outlet-card {
    border-radius: 14px;
  }

  .map-container {
    height: 200px;
  }

  .outlet-info {
    padding: 18px;
  }

  .outlet-name {
    font-size: 18px;
  }

  .outlet-number {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .outlet-location {
    font-size: 13px;
  }

  .feature-tag {
    padding: 4px 10px;
    font-size: 11px;
  }

  .pagination button {
    padding: 9px 12px;
    font-size: 13px;
    min-width: 38px;
  }

  .pagination .prev-btn,
  .pagination .next-btn {
    padding: 9px 14px;
    font-size: 12px;
  }

  .footer-flavors {
    font-size: 28px;
  }

  .footer p {
    font-size: 12px;
  }
}

/* ========================================
   RESPONSIVE DESIGN - LARGE DESKTOP
   Devices above 1440px
   ======================================== */

@media (min-width: 1441px) {
  .outlets-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
  }

  .header {
    /* Reduced padding from 70px 20px 90px to 60px 20px 80px */
    padding: 60px 20px 80px;
  }

  .logo-text {
    /* Reduced font size from 64px to 56px */
    font-size: 56px;
  }

  .logo-subtext {
    font-size: 20px;
  }

  .header h1 {
    font-size: 48px;
  }

  .header p {
    font-size: 20px;
  }

  .store-count {
    font-size: 18px;
    padding: 12px 30px;
  }

  .search-box {
    padding: 35px;
  }

  #searchInput {
    font-size: 19px;
  }

  .clear-search {
    font-size: 17px;
    padding: 14px 28px;
  }

  .map-container {
    height: 280px;
  }

  .outlet-info {
    padding: 28px;
  }

  .outlet-name {
    font-size: 24px;
  }

  .outlet-number {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .outlet-location {
    font-size: 16px;
  }

  .feature-tag {
    padding: 7px 16px;
    font-size: 14px;
  }

  .footer-flavors {
    font-size: 56px;
  }
}

/* ========================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ======================================== */

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .pagination button {
    min-height: 44px;
    min-width: 44px;
  }

  .clear-search {
    min-height: 48px;
  }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--br-pink);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .outlet-card {
    border: 2px solid var(--br-text);
  }

  .pagination button {
    border-width: 3px;
  }
}

/* Print styles */
@media print {
  .header::before,
  .header::after {
    display: none;
  }

  .search-container,
  .pagination-container {
    display: none;
  }

  .outlet-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .outlets-grid {
    display: block;
  }

  .outlet-card {
    margin-bottom: 20px;
  }
}
