/**
 * @file
 * Cruise Line page styles
 */

/* =============================================================================
   Hero Banner Section
   ========================================================================== */

.cruise-line-banner {
  position: relative;
  width: 100%;
  margin-bottom: 3rem;
  background: #f5f5f5;
  z-index: 1;
}

.cruise-line-banner__inner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.cruise-line-banner__inner img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.cruise-line-banner__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  padding: 3rem 0 2rem;
  z-index: 2;
}

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

/* Simple header fallback (no banner image) */
.cruise-line-header {
  background: linear-gradient(135deg, #2d5a3f 0%, #437e59 100%);
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.cruise-line-header__title {
  color: #ffffff;
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

/* =============================================================================
   General Utilities
   ========================================================================== */

.section-padding {
  padding: 1.5rem 0;
  margin-bottom: 0.5rem;
}

/* Reduce space above section titles */
.cruise-line-content .section-title {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Reduce spacing for introduction section specifically */
.cruise-line-introduction.section-padding {
  padding: 1.4rem 0 1rem 0;
  margin-bottom: 0.5rem;
}

/* Close gap below brochures to footer */
.cruise-line-content > section:last-child,
.cruise-line-brochures:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0.5rem !important;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 2rem;
  line-height: 1.2;
}

/* =============================================================================
   Introduction Section - Two Column Grid
   ========================================================================== */

.cruise-line-introduction {
  border-bottom: 1px solid #e5e7eb;
}

/* Intro text styling - now full width without grid */

.cruise-line-intro-text {
  font-size: 1.063rem;
  line-height: 1.7;
  color: #374151;
  max-width: 100%;
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
  .cruise-line-introduction .row {
    flex-direction: column !important;
  }

  .cruise-line-introduction .col-md-4,
  .cruise-line-introduction .col-md-8 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Desktop: ensure row direction */
@media (min-width: 768px) {
  .cruise-line-introduction .row {
    flex-direction: row !important;
  }
}

.cruise-line-intro-text p {
  margin-bottom: 1.25rem;
}

.cruise-line-website {
  margin-top: 1.5rem;
}

.cruise-line-website a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #437e59 0%, #5a9d75 100%);
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.cruise-line-website a:hover {
  background: #0c7e52;
}

/* =============================================================================
   Fleet/Ships Carousel Section
   ========================================================================== */

.cruise-line-ships {
  border-bottom: 1px solid #e5e7eb;
}

/* Tighten spacing for fleet section */
.cruise-line-ships.section-padding {
  padding: 1rem 0 1rem 0;
  margin-bottom: 0.5rem;
}

.cruise-line-ships .section-title {
  text-align: left;
}

/* Make the view content act like a Bootstrap row */
.cruise-line-ships .view-content {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

/* Hide the duplicate "Ships" header from the view */
.cruise-line-ships .view-header {
  display: none;
}

.cruise-ships-carousel {
  position: relative;
}

.cruise-ship-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.cruise-ship-card__image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #f5f5f5;
}

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

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

.cruise-ship-card__content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cruise-ship-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.cruise-ship-card__title a {
  color: #1e3a8a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.cruise-ship-card__title a:hover {
  color: #437e59;
}

.cruise-ship-card__description {
  font-size: 0.938rem;
  line-height: 1.6;
  color: #6b7280;
  margin: 0;
}

/* Ship Facts Styling */
.ship-facts {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.ship-fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.ship-fact:last-child {
  margin-bottom: 0;
}

.ship-fact .fact-label {
  color: #6b7280;
  font-weight: 500;
}

.ship-fact .fact-value {
  color: #1e3a8a;
  font-weight: 600;
}

.ship-title-wrapper a {
  color: #1e3a8a;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.ship-title-wrapper a:hover {
  color: #437e59;
}

/* Splide customization for ships carousel */
#cruise-ships-splide .splide__arrow {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #1e3a8a;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  opacity: 1;
  transition: all 0.3s ease;
}

#cruise-ships-splide .splide__arrow:hover {
  background: #1e3a8a;
  border-color: #1e3a8a;
}

#cruise-ships-splide .splide__arrow svg {
  fill: #1e3a8a;
  transition: fill 0.3s ease;
}

#cruise-ships-splide .splide__arrow:hover svg {
  fill: #ffffff;
}

#cruise-ships-splide .splide__pagination {
  bottom: -2.5rem;
}

#cruise-ships-splide .splide__pagination__page {
  background: #d1d5db;
  width: 0.75rem;
  height: 0.75rem;
  transition: all 0.3s ease;
}

#cruise-ships-splide .splide__pagination__page.is-active {
  background: #1e3a8a;
  transform: scale(1.3);
}

/* =============================================================================
   Port Map Section
   ========================================================================== */

.cruise-line-ports {
  margin-bottom: 4rem;
}

.cruise-line-ports .section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 2rem;
  text-align: center;
}

.cruise-line-map {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

/* Leaflet popup customization */
.cruise-line-map .leaflet-popup-content-wrapper {
  border-radius: 8px;
  padding: 0;
}

.cruise-line-map .leaflet-popup-content {
  margin: 0;
  min-width: 200px;
}

.cruise-line-map .port-popup {
  padding: 1rem;
}

.cruise-line-map .port-popup h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 0.5rem 0;
}

.cruise-line-map .port-popup a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #437e59;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.cruise-line-map .port-popup a:hover {
  color: #0c7e52;
  text-decoration: underline;
}

/* =============================================================================
   Popular Departure Ports Carousel
   ========================================================================== */

.cruise-line-popular-ports {
  margin-bottom: 4rem;
}

.cruise-line-popular-ports .section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 2rem;
  text-align: center;
}

/* =============================================================================
   USP, Reasons, and FAQ Sections
   ========================================================================== */

.cruise-line-usp,
.cruise-line-reasons,
.cruise-line-faq {
  border-bottom: 1px solid #e5e7eb;
}

.cruise-line-usp-content,
.cruise-line-reasons-content,
.cruise-line-faq-content {
  font-size: 1.063rem;
  line-height: 1.7;
  color: #374151;
}

.cruise-line-usp-content ul,
.cruise-line-reasons-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.cruise-line-usp-content li,
.cruise-line-reasons-content li {
  padding-left: 2rem;
  margin-bottom: 1rem;
  position: relative;
}

.cruise-line-usp-content li:before,
.cruise-line-reasons-content li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.25rem;
}

/* =============================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .cruise-line-banner__title,
  .cruise-line-header__title {
    font-size: 2.5rem;
  }

  .cruise-line-introduction__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cruise-line-introduction__image {
    max-width: 500px;
    margin: 0 auto;
  }
}

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

  .cruise-line-banner__inner img {
    height: 300px;
  }

  .cruise-line-banner__title,
  .cruise-line-header__title {
    font-size: 2rem;
  }

  .cruise-line-banner__overlay {
    padding: 2rem 0 1.5rem;
  }

  .section-padding {
    padding: 2rem 0;
    margin-bottom: 1.5rem;
  }

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

  .cruise-ship-card__image {
    height: 220px;
  }

  #cruise-ships-splide .splide__arrow {
    width: 2.5rem;
    height: 2.5rem;
  }
}

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

  .cruise-line-banner__inner img {
    height: 250px;
  }

  .cruise-line-banner__title,
  .cruise-line-header__title {
    font-size: 1.75rem;
  }

  .cruise-line-introduction__content .intro-text {
    font-size: 1rem;
  }

  .cruise-ship-card__image {
    height: 200px;
  }
}

/* =============================================================================
   Admin-specific fixes
   ========================================================================== */

.cruise-line-banner .contextual {
  z-index: 100 !important;
}

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

body.toolbar-fixed .cruise-line-banner img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
