/* Ajie Tide Tables CSS Stylesheet */

/* --- CSS Variables / Design System (Premium Light Theme) --- */
:root {
  --font-primary: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette (Clean Light Theme) */
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --bg-color: #f8fafc;
  --bg-card: #ffffff;
  --border-card: rgba(15, 23, 42, 0.08);
  --bg-card-hover: #ffffff;
  --border-card-hover: rgba(15, 23, 42, 0.16);
  
  --text-main: #334155;     /* Slate-700 */
  --text-muted: #64748b;    /* Slate-500 */
  --text-bright: #0f172a;   /* Slate-900 */
  
  /* Interactive Accent Colors */
  --accent-color: #0f62fe;   /* IBM Cobalt Blue */
  --accent-glow: rgba(15, 98, 254, 0.1);
  
  /* Tide Specific Colors */
  --high-tide-bg: rgba(15, 98, 254, 0.04);
  --high-tide-border: rgba(15, 98, 254, 0.15);
  --high-tide-text: #0f62fe;
  
  --low-tide-bg: rgba(217, 119, 6, 0.04);
  --low-tide-border: rgba(217, 119, 6, 0.15);
  --low-tide-text: #b45309;  /* Amber-700 */

  /* Shadows & Radius */
  --box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  
  --max-width: 1440px;
}

/* --- Base Reset & Typography --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  opacity: 0.85;
}

/* --- Layout Elements --- */
.content-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

.page-padding {
  padding-top: 1rem;
}

/* Breadcrumbs */
.breadcrumb-container {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-card);
  padding: 0.8rem 0;
}

.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--text-bright);
}

.breadcrumbs .divider {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.breadcrumbs .current {
  color: var(--text-bright);
  font-weight: 500;
}

/* --- Glassmorphic Card Helper (Light Variant) --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow);
  padding: 1.8rem;
  transition: all 0.2s ease-in-out;
}

/* --- Main Header / Navigation --- */
.main-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-bright);
}

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-area:hover .logo-img {
  transform: scale(1.1) rotate(5deg);
}

.footer-logo-img {
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5rem;
  margin-top: -3px;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: block;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
}

.nav-item {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-bright);
}

.lang-switch-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-card);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.lang-switch-btn:hover {
  background: #e2e8f0;
}

/* --- Hero Banner & Home Page --- */
.hero-banner {
  background: radial-gradient(circle at center, rgba(15, 98, 254, 0.05) 0%, rgba(248, 250, 252, 0) 75%);
  padding: 4.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-card);
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
  letter-spacing: -0.8px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Geolocation Card */
.geo-box {
  max-width: 500px;
  margin: 2.5rem auto 0 auto;
  text-align: left;
}

.geo-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  color: var(--text-bright);
}

.geo-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.nearest-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.geo-station-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.geo-station-card:hover {
  background: #f1f5f9;
}

.geo-dist {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 700;
}

.action-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #0052cc;
}

.hidden {
  display: none !important;
}

/* --- Browse Regions & Station Cards --- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
  color: var(--text-bright);
}

.regions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.region-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--box-shadow);
}

.region-heading {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.6rem;
  font-weight: 700;
}

.station-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.station-link-card {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.station-link-card:hover {
  background: #ffffff;
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(15, 98, 254, 0.15);
}

.station-name-text {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 1rem;
}

.station-meta-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Favorites Section spacing */
.favorites-section-area {
  margin-bottom: 2.5rem;
}

/* --- Station Profile --- */
.station-profile-card {
  margin-bottom: 2rem;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.station-badge {
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid var(--border-card);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.station-title-text {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.5px;
}

.station-meta-location {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Favorite Star Button */
.favorite-star-btn {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.2rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.favorite-star-btn:hover {
  background: #f8fafc;
  border-color: var(--border-card-hover);
}

.favorite-star-btn.active {
  border-color: #ffcc00;
  background: #fffdf5;
}

.favorite-star-btn.active .star-icon {
  color: #ffcc00;
}

/* Profile Details Grid */
.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  border-top: 1px solid var(--border-card);
  padding-top: 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.detail-value {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 1.05rem;
}

/* --- Station 30-Day prediction list --- */
.daily-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.daily-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  gap: 1.2rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.daily-link-row:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(15, 98, 254, 0.15);
  background: #ffffff;
}

.row-date-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 240px;
}

.date-badge {
  display: flex;
  flex-direction: column;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--bg-card);
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.date-badge-top {
  background: linear-gradient(135deg, #0f62fe 0%, #0043ce 100%);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-badge-bottom {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
}

.date-text-wrapper {
  display: flex;
  flex-direction: column;
}

.date-full-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
}

.row-tides-summary {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  flex: 1;
}

.tide-group-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.tide-section-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.tide-section-label .arrow-indicator {
  font-size: 0.75rem;
  font-weight: 700;
}

.tide-group-section.high .tide-section-label .arrow-indicator {
  color: var(--high-tide-text);
}

.tide-group-section.low .tide-section-label .arrow-indicator {
  color: var(--low-tide-text);
}

.tide-pills-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tide-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.tide-pill.high {
  background: rgba(15, 98, 254, 0.04);
  border-color: rgba(15, 98, 254, 0.12);
}

.tide-pill.low {
  background: rgba(217, 119, 6, 0.04);
  border-color: rgba(217, 119, 6, 0.12);
}

.pill-time {
  padding: 0.18rem 0.45rem;
  font-weight: 600;
}

.tide-pill.high .pill-time {
  background: rgba(15, 98, 254, 0.08);
  color: var(--high-tide-text);
}

.tide-pill.low .pill-time {
  background: rgba(217, 119, 6, 0.08);
  color: var(--low-tide-text);
}

.pill-height {
  padding: 0.18rem 0.45rem;
  background: #ffffff;
  color: var(--text-main);
  border-left: 1px solid rgba(15, 23, 42, 0.06);
}

.tide-pill-none {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.row-arrow {
  color: var(--text-muted);
  font-weight: bold;
  opacity: 0.4;
  transition: all 0.2s ease;
}

.daily-link-row:hover .row-arrow {
  transform: translateX(4px);
  color: var(--accent-color);
  opacity: 1;
}

/* --- Daily Page --- */
.daily-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.daily-main-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-bright);
}

.daily-meta-date {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-weight: 500;
}

.daily-actions {
  display: flex;
  gap: 0.8rem;
}

.action-btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.action-btn-outline:hover {
  background: #f8fafc;
  border-color: var(--border-card-hover);
}

/* Answer Box Grid */
.answer-box-section {
  margin-bottom: 2.5rem;
}

.answer-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.extremum-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.8rem;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.extremum-card.high {
  background: #f4f8ff;
  border: 1px solid rgba(15, 98, 254, 0.15);
}

.extremum-card.low {
  background: #fffaf4;
  border: 1px solid rgba(217, 119, 6, 0.15);
}

.card-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.extremum-time {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-bright);
}

.extremum-height {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.height-num {
  font-size: 2.2rem;
  font-weight: 800;
}

.height-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Tidal SVG Chart --- */
.chart-section-area {
  margin-bottom: 2.5rem;
}

.chart-card-wrapper {
  padding: 1.8rem;
}

.chart-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  color: var(--text-bright);
}

.chart-canvas-container {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  overflow: hidden;
}

.tide-chart {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG Elements styling */
#tide-chart-svg {
  width: 100%;
  height: auto;
}

#tide-chart-svg .grid-line {
  stroke: rgba(15, 23, 42, 0.04);
  stroke-width: 1;
}

#tide-chart-svg .grid-line-main {
  stroke: rgba(15, 23, 42, 0.1);
  stroke-width: 1.5;
}

#tide-chart-svg .label-text {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-primary);
  font-weight: 500;
}

#tide-chart-svg .tide-curve {
  stroke: var(--accent-color);
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
}

#tide-chart-svg .tide-area {
  fill: url(#chart-gradient);
  opacity: 0.15;
}

#tide-chart-svg .extrema-point {
  stroke-width: 3;
}

#tide-chart-svg .extrema-point.high {
  fill: #ffffff;
  stroke: var(--high-tide-text);
}

#tide-chart-svg .extrema-point.low {
  fill: #ffffff;
  stroke: var(--low-tide-text);
}

#tide-chart-svg .current-time-line {
  stroke: #ff3366;
  stroke-width: 1.5;
  stroke-dasharray: 4,4;
}

#tide-chart-svg .current-time-circle {
  fill: #ff3366;
  stroke: white;
  stroke-width: 2;
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--accent-color);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 10;
  box-shadow: var(--box-shadow);
}

/* --- Data Table --- */
.table-section-area {
  margin-bottom: 2.5rem;
}

.table-card {
  padding: 1.8rem;
}

.table-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  color: var(--text-bright);
}

.table-responsive {
  overflow-x: auto;
}

.hourly-tide-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.hourly-tide-table th, .hourly-tide-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.hourly-tide-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  background-color: #f8fafc;
}

.hourly-tide-table td {
  font-size: 0.95rem;
  color: var(--text-main);
}

.hourly-height-cell {
  font-weight: 700;
  color: var(--text-bright);
}

.progress-bar-container {
  width: 100%;
  background: rgba(15, 23, 42, 0.04);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  max-width: 140px;
}

.progress-bar-fill {
  background: var(--accent-color);
  height: 100%;
  border-radius: 3px;
}

/* Datum description Box */
.datum-description-area {
  margin-bottom: 2.5rem;
  background: #fffbf5;
  border-color: rgba(217, 119, 6, 0.1);
}

.datum-title {
  color: var(--low-tide-text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.datum-text {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Source & Accuracy Box */
.source-accuracy-area {
  margin-bottom: 2.5rem;
  background: #f0f6ff;
  border-color: rgba(15, 98, 254, 0.1);
}

.source-title {
  color: var(--accent-color);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.source-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Daily navigation buttons */
.daily-navigation-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.nav-arrow-btn {
  background: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.nav-arrow-btn:hover {
  background: #f8fafc;
  border-color: var(--border-card-hover);
  color: var(--text-bright);
}

/* --- Footer (Contrasting Dark Theme for Premium Branded Look) --- */
.main-footer {
  background: #0f172a;       /* Slate-900 */
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4.5rem 1.5rem 2.5rem 1.5rem;
  margin-top: auto;
  font-size: 0.88rem;
  color: #94a3b8;            /* Slate-400 */
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .footer-sections {
    grid-template-columns: 1.2fr 0.8fr 2fr;
  }
}

.footer-section h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-section p {
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.6rem;
}

.footer-section ul li a {
  color: #94a3b8;
}

.footer-section ul li a:hover {
  color: #ffffff;
}

.disclaimer-text {
  font-size: 0.82rem;
  opacity: 0.85;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.8;
}

/* --- Section header centered --- */
.section-header-centered {
  text-align: center;
  margin-bottom: 3.5rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.page-title-main {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1rem;
  letter-spacing: -0.8px;
}

.section-subtitle-main {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* --- Print Media Styles --- */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .no-print, .main-header, .main-footer, .daily-navigation-row, .daily-actions {
    display: none !important;
  }

  .breadcrumb-container, .datum-description-area, .source-accuracy-area {
    display: none !important;
  }
  
  #print-area {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .content-container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .glass-card, .extremum-card {
    background: none !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    color: black !important;
  }
  
  .extremum-card.high {
    border-left: 5px solid #1a8cff !important;
  }
  
  .extremum-card.low {
    border-left: 5px solid #ff8000 !important;
  }
  
  .extremum-time, .height-num {
    color: black !important;
  }
  
  .hourly-tide-table {
    border: 1px solid #ccc !important;
  }
  
  .hourly-tide-table th {
    background-color: #f2f2f2 !important;
    color: black !important;
    border-bottom: 1px solid #ccc !important;
  }
  
  .hourly-tide-table td {
    border-bottom: 1px solid #eee !important;
    color: black !important;
  }
  
  .hourly-height-cell {
    color: black !important;
  }
  
  .progress-bar-container {
    display: block !important;
    background: #e2e8f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .progress-bar-fill {
    background: #0f62fe !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* --- Search Input & Dropdown Styling --- */
.header-search-box {
  flex: 1;
  max-width: 380px;
  margin: 0 1.5rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-btn-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
  pointer-events: none;
}

#header-search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: #f1f5f9;
  color: var(--text-bright);
  font-family: var(--font-primary);
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease-in-out;
}

#header-search-input:focus {
  background: #ffffff;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--box-shadow);
  max-height: 360px;
  overflow-y: auto;
  z-index: 1000;
  padding: 0.4rem 0;
}

.search-result-item {
  padding: 0.7rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
}

.search-result-item:hover, .search-result-item.focused {
  background: #f1f5f9;
  color: var(--accent-color);
}

.result-name {
  font-weight: 600;
  color: var(--text-bright);
}

.search-result-item:hover .result-name, .search-result-item.focused .result-name {
  color: var(--accent-color);
}

.result-region {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* --- Hero Search Box on Homepage --- */
.hero-search-box {
  margin: 2.5rem auto 0 auto;
  max-width: 680px;
  width: 100%;
}

.hero-search-box #header-search-input {
  padding: 1rem 1.5rem 1rem 3.2rem !important;
  font-size: 1.15rem !important;
  border-radius: 99px !important; /* Pill-shaped search bar looks extremely premium and modern */
  box-shadow: 0 10px 30px -10px rgba(15, 98, 254, 0.12), 0 1px 3px rgba(0,0,0,0.02) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
  height: auto !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hero-search-box #header-search-input:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 98, 254, 0.18), 0 0 0 4px var(--accent-glow) !important;
  transform: translateY(-2px);
}

.hero-search-box .search-btn-icon {
  font-size: 1.35rem;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
}

.hero-search-box .search-results-dropdown {
  background: #ffffff;
  border-color: var(--border-card);
  border-radius: 16px;
  margin-top: 8px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  padding: 0.6rem 0;
}

/* --- Footer Language Switch --- */
.footer-lang-switch {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-lang-switch .lang-switch-label {
  opacity: 0.8;
}

.footer-lang-switch .lang-switch-link {
  color: #38bdf8 !important; /* Sky-400 */
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease-in-out;
}

.footer-lang-switch .lang-switch-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3);
}

/* --- Header Collapsible Menu (Responsive) --- */
.header-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: flex-end;
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
  }
  
  .hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-bright);
    border-radius: 2px;
    transition: all 0.2s ease-in-out;
  }
  
  .menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    z-index: 99;
  }
  
  .header-menu.active {
    display: flex;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1rem;
  }
  
  .header-search-box {
    margin: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* --- Country Title Links --- */
.country-title-link {
  color: var(--text-bright);
  transition: all 0.2s ease-in-out;
  border-bottom: 2px solid transparent;
}

.country-title-link:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* --- Continent & Country Portal Cards --- */
.continent-section {
  margin-bottom: 3.5rem;
}

.continent-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 2px solid var(--border-card);
  padding-bottom: 0.5rem;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.country-portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--box-shadow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
}

.country-portal-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(15, 98, 254, 0.18);
  background: #ffffff;
}

.country-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  width: 60px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  flex-shrink: 0;
}

.country-portal-card:hover .country-card-icon {
  background: #f1f5f9;
  border-color: var(--accent-color);
}

.country-flag-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}



.country-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.country-card-name {
  font-weight: 700;
  color: var(--text-bright);
  font-size: 1.1rem;
}

.country-portal-card:hover .country-card-name {
  color: var(--accent-color);
}

.country-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Related Recommendations Sections --- */
.nearby-stations-section {
  margin-top: 3.5rem;
}

.nearby-stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.nearby-station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--box-shadow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
}

.nearby-station-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(15, 98, 254, 0.18);
  background: #ffffff;
  opacity: 1; /* Override links default hover opacity */
}

.ns-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.ns-name {
  font-weight: 700;
  color: var(--text-bright);
  font-size: 1.05rem;
}

.nearby-station-card:hover .ns-name {
  color: var(--accent-color);
}

.ns-distance {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-color);
  background: var(--accent-glow);
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

.ns-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ns-card-tides-preview {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
  border-top: 1px dashed var(--border-card);
  padding-top: 0.5rem;
}

.ns-tide-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.ns-tide-badge.high {
  background: var(--high-tide-bg);
  border: 1px solid var(--high-tide-border);
  color: var(--high-tide-text);
}

.ns-tide-badge.low {
  background: var(--low-tide-bg);
  border: 1px solid var(--low-tide-border);
  color: var(--low-tide-text);
}

/* --- Weekend Tide Forecasts --- */
.weekend-forecast-section {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.weekend-forecast-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.weekend-btn {
  flex: 1;
  max-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: var(--box-shadow);
  transition: all 0.2s ease-in-out;
  text-align: center;
  color: var(--text-main);
}

.weekend-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -6px rgba(15, 98, 254, 0.15);
  background: #ffffff;
  opacity: 1;
}

.weekend-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.weekend-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-bright);
}

.weekend-btn.active .weekend-label {
  color: var(--accent-color);
}

.weekend-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.weekend-btn.active .weekend-date {
  color: var(--accent-color);
  opacity: 0.8;
}

/* --- Info Pages (About, Contact, Privacy) --- */
.info-page-wrapper {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  padding: 2.5rem;
}

.info-page-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-card);
  padding-bottom: 1rem;
}

.info-article section {
  margin-bottom: 2rem;
}

.info-article h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1rem;
}

.info-article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 1.2rem 0 0.6rem 0;
}

.info-article p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.info-article ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.info-article ul li {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.info-disclaimer-box {
  background: var(--low-tide-bg);
  border-left: 4px solid var(--low-tide-text);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 2rem;
}

.info-disclaimer-box h3 {
  color: var(--low-tide-text);
  margin-top: 0 !important;
  margin-bottom: 0.6rem !important;
}

.info-disclaimer-box p {
  color: var(--low-tide-text) !important;
  font-size: 0.88rem !important;
  margin-bottom: 0 !important;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-gradient);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin: 1rem 0;
}

.contact-icon {
  font-size: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
}

.contact-details strong {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-details a {
  font-size: 1.1rem;
  font-weight: 700;
}

/* --- Footer Bottom Links --- */
.footer-disclaimer-links {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-disclaimer-links a {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-disclaimer-links a:hover {
  color: #ffffff;
}

.footer-disclaimer-links .divider {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  user-select: none;
}





