/**
 * Cruise Port Page Styling
 */

/* Hero Banner */
.cruise-port-banner {
  position: relative;
  width: 100%;
  margin-bottom: 0;
  background: #f5f5f5;
  z-index: 1;
}

.cruise-port-banner__inner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: #f5f5f5;
  z-index: 1;
}

.cruise-port-banner img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

/* Ensure all wrappers have full height and don't interfere with positioning */
.cruise-port-banner .field--name-field-mt-srv-banner-image-media,
.cruise-port-banner .field--name-field-teaser-image,
.cruise-port-banner .field__items,
.cruise-port-banner .field__item,
.cruise-port-banner .media,
.cruise-port-banner .field--name-field-media-image {
  position: static !important;
  height: 100%;
  display: block;
}

/* Show only the first hero image if there are multiple */
.cruise-port-banner .field--name-field-mt-srv-banner-image-media .field__item:not(:first-child) {
  display: none;
}

/* Overlaid title on hero banner */
.cruise-port-banner__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  padding: 40px 0 30px;
  z-index: 2;
}

.cruise-port-banner__title {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cruise-port-banner__subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Remove field wrapper styling for country in banner */
.cruise-port-banner__subtitle .field {
  display: inline;
}

.cruise-port-banner__subtitle .field__item {
  display: inline;
}

/* Image credit (appears on hover) */
.cruise-port-banner__credit {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.cruise-port-banner:hover .cruise-port-banner__credit {
  opacity: 1;
}

/* Introduction Section with Reasons to Visit */
.port-introduction-wrapper {
  padding: 60px 0;
  border-bottom: 1px solid #e5e7eb;
}

.port-introduction-reasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.port-introduction__content {
  padding-right: 20px;
}

.port-introduction__content .section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
  text-align: left;
}

.port-introduction__text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #374151;
}

/* Reasons to Visit Sidebar (2x2 Grid) */
.reasons-to-visit-sidebar {
  position: relative;
}

.reasons-to-visit-sidebar .reasons-to-visit-container {
  padding: 0;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .view-header {
  text-align: left;
  margin-bottom: 2rem;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .icon-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .header-highlight {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .header-highlight .highlight {
  color: #667eea;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .view-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .views-row {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.reasons-to-visit-sidebar .place-to-stay-slideshow .views-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.reasons-to-visit-sidebar .field-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.reasons-to-visit-sidebar .subheader-body {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #6b7280;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 32px;
  text-align: center;
}

.section-icon {
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 8px;
}

.section-highlight {
  display: block;
}

.section-highlight .highlight {
  color: #667eea;
}

/* Reasons to Visit Section */
.reasons-to-visit {
  padding: 80px 0;
  border-bottom: 1px solid #e5e7eb;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.reason-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reason-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.reason-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.reason-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.reason-card__description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #6b7280;
}

/* Choosing Right Cruise Section */
.choosing-right-cruise {
  padding: 80px 0;
}

.cruise-lines-carousel {
  margin-top: 48px;
}

/* Splide Slider Styling */
.splide {
  padding: 0;
}

.splide .view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.splide .view-header-inner {
  flex: 1;
}

.splide__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.splide__arrows {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.splide__arrow {
  background: #667eea;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.splide__arrow:hover {
  background: #5568d3;
  transform: scale(1.1);
}

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

.splide__arrow::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.splide__arrow--prev::before {
  transform: rotate(-135deg);
  margin-left: 3px;
}

.splide__arrow--next::before {
  transform: rotate(45deg);
  margin-right: 3px;
}

.my-slider-progress-wrapper {
  width: 100px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.my-slider-progress-bar-total {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #e5e7eb;
}

.my-slider-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #667eea;
  width: 0;
  transition: width 0.3s ease;
}

.splide__track {
  overflow: visible;
}

.splide__list {
  display: flex;
}

.splide__slide {
  flex-shrink: 0;
}

.splide__slide .slide-wrapper {
  padding: 1rem;
}

.splide__pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.splide__pagination__page {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.splide__pagination__page.is-active {
  background: #667eea;
  width: 24px;
  border-radius: 5px;
}

/* View-specific styling */
.views-row .choosing-title-body,
.views-row .title-subheader-body-wrapper {
  margin-top: 1rem;
}

.views-row .choosing-title,
.views-row .field-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.views-row .choosing-title a,
.views-row .field-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.views-row .choosing-title a:hover,
.views-row .field-title a:hover {
  color: #667eea;
}

.views-row .choosing-body,
.views-row .subheader-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #6b7280;
}

.views-row .views-field-field-cover-image {
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

.views-row .views-field-field-cover-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.views-row:hover .views-field-field-cover-image img {
  transform: scale(1.05);
}

/* Reasons to Visit - View styling */
.reasons-to-visit-container {
  padding: 0;
}

.place-to-stay-slideshow .view-header {
  text-align: center;
  margin-bottom: 3rem;
}

.place-to-stay-slideshow .icon-header {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.place-to-stay-slideshow .header-highlight {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
}

.place-to-stay-slideshow .header-highlight .highlight {
  color: #667eea;
}

.place-to-stay-slideshow .view-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.place-to-stay-slideshow .views-row {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.place-to-stay-slideshow .views-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Cruise Line Cards */
.cruise-line-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cruise-line-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cruise-line-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}

.cruise-line-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cruise-line-card:hover .cruise-line-card__image img {
  transform: scale(1.05);
}

.cruise-line-card__content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cruise-line-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.cruise-line-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cruise-line-card__title a:hover {
  color: #667eea;
}

.cruise-line-card__description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #6b7280;
  flex: 1;
}

/* Grid layout for cruise lines if not using carousel */
.cruise-lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .cruise-port-banner__inner {
    height: 350px;
  }

  .port-introduction-reasons-grid {
    gap: 40px;
  }

  .reasons-to-visit-sidebar .place-to-stay-slideshow .view-content {
    gap: 1.25rem;
  }

  .reasons-to-visit-sidebar .place-to-stay-slideshow .views-row {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 768px) {
  .cruise-port-banner__inner {
    height: 300px;
  }

  .cruise-port-banner__title {
    font-size: 2rem;
  }

  .cruise-port-banner__subtitle {
    font-size: 1.125rem;
  }

  .cruise-port-banner__overlay {
    padding: 30px 0 20px;
  }

  .port-introduction-wrapper {
    padding: 40px 0;
  }

  .port-introduction-reasons-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .port-introduction__content .section-title {
    font-size: 1.75rem;
  }

  .reasons-to-visit-sidebar .place-to-stay-slideshow .header-highlight {
    font-size: 1.5rem;
  }

  .reasons-to-visit-sidebar .place-to-stay-slideshow .view-content {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .choosing-right-cruise {
    padding: 60px 0;
  }

  .reasons-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cruise-lines-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cruise-port-banner__inner {
    height: 250px;
  }

  .cruise-port-banner__title {
    font-size: 1.5rem;
  }

  .cruise-port-banner__subtitle {
    font-size: 1rem;
  }

  .cruise-port-banner__overlay {
    padding: 20px 0 15px;
  }

  .cruise-port-banner__credit {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .port-introduction-wrapper {
    padding: 32px 0;
  }

  .port-introduction__content .section-title {
    font-size: 1.5rem;
  }

  .reasons-to-visit-sidebar .place-to-stay-slideshow .header-highlight {
    font-size: 1.25rem;
  }

  .reasons-to-visit-sidebar .place-to-stay-slideshow .view-content {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .choosing-right-cruise {
    padding: 48px 0;
  }
}

/* Admin-specific fixes */
.cruise-port-banner .contextual {
  z-index: 100 !important;
}

.cruise-port-banner .contextual-region {
  position: static !important;
}

/* Ensure media entity displays properly when logged in */
.cruise-port-banner .media--view-mode-cruise-port-hero {
  position: static !important;
  height: 100%;
  display: block;
}

/* Ensure image is visible even with admin elements */
body.toolbar-fixed .cruise-port-banner img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Port Cruise Lines Grid - Using teaser cards */
.choosing-right-cruise .port-cruise-lines-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.choosing-right-cruise .port-cruise-lines-grid > li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

@media (max-width: 1024px) {
  .choosing-right-cruise .port-cruise-lines-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
}

@media (max-width: 640px) {
  .choosing-right-cruise .port-cruise-lines-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Style the view header */
.choosing-right-cruise .view-header {
  margin-bottom: 2rem;
}

.choosing-right-cruise .view-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

/* Ensure cards fill the grid cells */
.choosing-right-cruise .cruise-line-card {
  height: 100%;
}
