/* ========================================
   Dive Melbourne - Styles
   Mobile-first, Melbourne coastal palette
   ======================================== */

/* ========================================
   CSS Variables - Blue-Grey Coastal Palette
   ======================================== */
:root {
    /* Primary Colors - Blue-Grey */
    --color-primary: #455A64;
    --color-primary-light: #607D8B;
    --color-primary-dark: #263238;

    /* Accent Colors - Cool Blues */
    --color-accent: #5C9EAD;
    --color-accent-light: #88BCC7;
    --color-sand: #E8EAF6;
    --color-seafoam: #B0BEC5;

    /* Neutrals */
    --color-text: #1A2332;
    --color-text-light: #4A5568;
    --color-bg: #FFFFFF;
    --color-bg-accent: #F7FAFC;
    --color-border: #E2E8F0;

    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Georgia', serif;

    /* Compact Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-xxl: 2rem;

    /* Layout */
    --container-max: 1200px;
    --border-radius: 8px;
    --transition: 0.3s ease;

    /* Wix-inspired enhancements */
    --transition-smooth: cubic-bezier(0.37, 0, 0.63, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-base);
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFC 100%);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary-dark);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

/* ========================================
   Layout Components
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.content-section {
    padding: var(--spacing-lg) 0;
}

/* Horizontal layout container for top sections */
.top-info-sections {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto 20px auto;
    padding: 0 var(--spacing-sm);
    align-items: flex-start; /* Align top edges so titles are level */
}

/* When placed at bottom of page, add top margin for spacing */
.top-info-sections.bottom-info-sections {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

/* Override container behavior inside horizontal sections */
.top-info-sections .container {
    max-width: none;
    margin: 0;
    /* padding removed - set individually per section */
}

.water-temp-section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    flex: 0 0 auto; /* Auto width to fit content */
    min-width: 0; /* Allow natural sizing */
}

.water-temp-section h2 {
    margin-bottom: var(--spacing-sm);
    margin-top: 0; /* Match forecast section */
    font-size: 1.05rem;
}

/* Split title into two lines */
.water-temp-section h2 .title-main {
    display: block;
}

.water-temp-section h2 .title-sub {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.8;
}

.water-temp-section .container {
    width: fit-content; /* Container matches title width */
    padding-top: 15px;
    margin-top: 0;
}

.water-temp-section .source-reference {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.7rem;
}

.forecast-top-section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    flex: 1 1 auto; /* Fill remaining space */
    min-width: 0;
}

.forecast-top-section .container {
    width: 100%;
    padding-top: 15px;
}

.forecast-top-section h2 {
    margin-bottom: var(--spacing-sm);
    margin-top: 0;
}

.bg-accent {
    background-color: var(--color-bg-accent);
}

/* ========================================
   Header & Navigation
   ======================================== */
.site-header {
    background-color: rgba(69, 90, 100, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s var(--transition-smooth);
}

.site-header:hover {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    font-family: var(--font-heading);
}

.nav-brand a:hover {
    color: var(--color-accent-light);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    font-weight: 500;
    padding: var(--spacing-xs);
}

.nav-menu a:hover {
    color: var(--color-accent-light);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: var(--spacing-md) var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    color: white;
}

.hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Time Window Selector */
.time-window-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.time-window-label {
    font-size: 0.85rem;
    opacity: 0.95;
    margin: 0 0 var(--spacing-sm) 0;
    text-align: left;
}

.time-window-inputs {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    align-items: flex-end;
    padding-bottom: 0.15rem;
}

.time-input-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 0 1 auto;
    align-items: flex-start;
}

.time-input-row label {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.9;
    height: 1rem;
    line-height: 1rem;
    margin-bottom: 0;
    display: block;
}

.time-input-pair {
    display: flex;
    gap: 0.25rem;
    align-items: flex-start;
}

.button-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

.time-input-pair input[type="date"],
.time-input-pair input[type="text"],
.time-input-pair select {
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: none;
    background-color: white;
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    font-weight: 500;
    width: auto;
    height: 2.5rem;
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
    font-family: var(--font-base);
}

.time-input-pair input[type="date"]:hover,
.time-input-pair input[type="text"]:hover,
.time-input-pair select:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.time-input-pair input[type="date"],
.time-input-pair input[type="text"] {
    max-width: 150px;
}

.time-input-pair select {
    max-width: 95px;
}

.time-input-pair input[type="date"]:focus,
.time-input-pair select:focus {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: white;
    padding: 0 2rem;
    height: 2.5rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.5;
    transition: transform 0.6s var(--transition-smooth), box-shadow 0.6s var(--transition-smooth);
    white-space: nowrap;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    margin-left: 0;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--transition-smooth), height 0.6s var(--transition-smooth);
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Donate Button */
.donate-section {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    align-self: flex-end;
}

.donate-label {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
}

.donate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #0070BA;
    color: white;
    padding: 0 1.5rem;
    height: 2.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.donate-button:hover {
    background: #005ea6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

.donate-paypal-icon {
    height: 18px;
    width: 18px;
    flex-shrink: 0;
}

.donate-text-short {
    display: none;
}

/* ========================================
   Tabs
   ======================================== */
.dive-sites-section {
    padding-top: 0 !important;
}

.tabs-container {
    margin-top: 0;
}

.tab-buttons {
    display: flex;
    gap: var(--spacing-xs);
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.tab-button {
    background: transparent;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    bottom: -2px;
    font-family: var(--font-base);
}

.tab-button:hover {
    color: var(--color-primary);
    background: rgba(10, 77, 104, 0.05);
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-accent);
}

.tab-content-container {
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Cards & Grid
   ======================================== */
.grid {
    display: grid;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: transform 0.6s var(--transition-smooth), box-shadow 0.6s var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.badge {
    display: inline-block;
    background-color: var(--color-seafoam);
    color: var(--color-primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--spacing-xs);
}

.info-grid {
    display: grid;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.info-card {
    background: white;
    padding: var(--spacing-md);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--border-radius);
}

.info-card h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

/* ========================================
   Ad Container
   ======================================== */
.ad-container {
    max-width: var(--container-max);
    margin: var(--spacing-md) auto;
    padding: 0 var(--spacing-sm);
    text-align: center;
    min-height: 0;
}

/* Style the AdSense ins element to prevent excessive space reservation */
.ad-container .adsbygoogle {
    display: block;
    min-height: 0 !important;
}

/* When ad container is empty (no ad loaded), collapse it */
.ad-container:empty,
.ad-container .adsbygoogle[data-ad-status="unfilled"] {
    display: none;
}

/* Reduce ad container spacing on mobile and limit height */
@media (max-width: 768px) {
    .ad-container {
        margin: var(--spacing-xs) auto;
        max-height: 120px;
        overflow: hidden;
    }

    .ad-container .adsbygoogle {
        max-height: 100px !important;
    }
}

#header-ad {
    min-height: 90px;
    background-color: var(--color-bg-accent);
    border: 1px dashed var(--color-border);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

#header-ad::before {
    content: 'Advertisement';
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background-color: var(--color-primary-dark);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--color-accent-light);
    margin-bottom: var(--spacing-sm);
}

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

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: white;
    opacity: 0.9;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--color-accent-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Footer developed-by line styling */
.footer-developed-by {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-developed-by a {
    color: #88BCC7;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.footer-developed-by .praply-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
}

/* Mobile footer - prevent awkward text wrapping */
@media (max-width: 480px) {
    .footer-bottom p:first-child {
        font-size: 0.75rem;
    }

    .footer-developed-by {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .footer-developed-by .praply-logo {
        height: 16px;
    }

    .footer-developed-by .abn-text {
        white-space: nowrap;
    }
}

/* Water Temperature Display */
.water-temp-section h2 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    color: var(--color-primary);
}

.water-temps-display {
    display: flex;
    flex-direction: row; /* Single horizontal row */
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth);
    min-height: 130px; /* Taller box (80px + 50px) for better vertical spacing */
}

.water-temps-display:hover {
    box-shadow: var(--shadow-md);
}

.temp-location {
    display: flex;
    flex-direction: column; /* Vertical: label above value */
    align-items: center;
    gap: 4px;
    padding: 0 5px; /* Add horizontal padding to make box wider */
    background: transparent;
    flex: 1;
    min-width: 75px; /* Increased from 70px to 75px */
    justify-content: center;
}

.location-name {
    font-size: 0.7rem; /* Compact label size */
    color: var(--color-text-light);
    font-weight: 600;
    white-space: nowrap;
}

.temp-value {
    font-size: 1.05rem; /* Slightly larger value */
    font-weight: bold;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.source-reference {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: var(--spacing-xs);
    margin-bottom: 0;
}

.forecast-top-section .source-reference {
    margin-top: var(--spacing-xs);
}

.source-reference a {
    color: var(--color-accent);
    text-decoration: underline;
}

.forecast-note {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background-color: var(--color-bg-accent);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
}

.forecast-top-section h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    font-weight: 600;
}

.hourly-forecast-container {
    margin-bottom: 0;
    margin-top: 0; /* Remove top margin */
    background: white;
    padding: 8px 12px; /* Reduced top/bottom padding for tighter layout */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth);
}

.hourly-forecast-container:hover {
    box-shadow: var(--shadow-md);
}

#forecast-loading {
    padding: 0 var(--spacing-md) var(--spacing-md);
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
}

/* Forecast Current Display */
.forecast-current-display {
    margin-top: var(--spacing-sm);
}

.forecast-time-display {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-light);
    opacity: 0.85;
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.forecast-data-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px; /* Reduced from var(--spacing-sm) for compact layout */
    padding: var(--spacing-sm) 0;
}

.forecast-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.item-label {
    font-size: 0.8rem; /* Slightly smaller for compact layout */
    color: var(--color-text-light);
    font-weight: 600;
}

.item-value {
    font-size: 0.9rem; /* Slightly smaller for compact layout */
    font-weight: bold;
    color: var(--color-primary-dark);
}

/* Responsive scaling for mobile */
@media (max-width: 480px) {
    .item-label {
        font-size: 0.75rem;
    }

    .item-value {
        font-size: 0.85rem;
    }

    /* Larger touch targets for mobile */
    .time-ruler-slider {
        height: 6px;
    }

    .time-ruler-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }

    .time-ruler-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }

    .ruler-labels {
        font-size: 0.65rem;
    }
}

/* Time Ruler Slider */
.forecast-ruler {
    position: relative;
    padding: var(--spacing-sm) 0;
}

.time-ruler-slider {
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary-light), var(--color-accent));
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.time-ruler-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.time-ruler-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.time-ruler-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.time-ruler-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

.ruler-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xs);
    font-size: 0.7rem;
    color: var(--color-text-light);
}

/* ========================================
   Blog Styles
   ======================================== */
.article-header {
    margin-bottom: var(--spacing-lg);
}

.article-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.article-content {
    max-width: 800px;
}

.article-content h2 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.article-content p {
    margin-bottom: var(--spacing-md);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.article-content li {
    margin-bottom: var(--spacing-xs);
}

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

/* Mobile (below 768px) */
@media (max-width: 767px) {
    /* Mobile: time inputs stack vertically, search + donate share a row */
    .time-window-inputs {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
        justify-content: space-between;
    }

    .time-input-row {
        flex: 0 0 100%;
    }

    .button-row {
        width: auto;
        margin-top: var(--spacing-sm);
    }

    .cta-button {
        padding: 0 1.2rem;
        font-size: 0.9rem;
    }

    .donate-section {
        margin-left: 0;
        margin-top: var(--spacing-sm);
        align-self: flex-end;
    }

    .donate-button {
        padding: 0 0.8rem;
        font-size: 0.85rem;
    }

    .donate-label {
        display: none;
    }

    .donate-text-full {
        display: none;
    }

    .donate-text-short {
        display: inline;
    }

    .time-window-inputs .time-input-row {
        flex: 0 0 100%;
    }

    .time-input-pair {
        flex-wrap: nowrap;
        width: 100%;
        gap: var(--spacing-xs);
    }

    .time-input-pair input[type="date"],
    .time-input-pair input[type="text"],
    .time-input-pair select {
        max-width: none;
        flex: 1 1 50%;
        min-width: 0;
        width: 50%;
    }

    /* Mobile: Keep Water Temp and Forecast side by side */
    .top-info-sections {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 0 var(--spacing-sm);
        align-items: flex-start; /* Align sections at top (titles aligned) */
    }

    .water-temp-section {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        max-width: 140px;
    }

    .forecast-top-section {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: calc(100% - 150px);
    }

    /* Reset all container padding in top-info-sections, then set explicitly */
    .top-info-sections .container {
        padding: 0 !important;
        margin: 0;
    }

    /* Both sections need same top padding for title alignment */
    .water-temp-section .container,
    .forecast-top-section .container {
        padding-top: 8px !important;
        padding-bottom: 6px !important;
    }

    /* Match h2 margins between both sections for horizontal alignment */
    .water-temp-section h2,
    .forecast-top-section h2 {
        margin-top: 0;
        margin-bottom: 4px;
    }

    .water-temp-section h2 {
        font-size: 0.75rem;
        white-space: normal;
        line-height: 1.2;
    }

    /* Split title into two lines via CSS */
    .water-temp-section h2 .title-main {
        display: block;
        font-size: 0.75rem;
    }

    .water-temp-section h2 .title-sub {
        display: block;
        font-size: 0.7rem;
        font-weight: 500;
    }

    .water-temp-section .source-reference {
        display: none;
    }

    .temp-value {
        font-size: 0.7rem;
    }

    .location-name {
        font-size: 0.55rem;
    }

    .water-temps-display {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2px;
        align-items: flex-start;
        min-height: auto;
        padding: 4px 6px;
    }

    .temp-location {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px;
        padding: 1px 0;
        min-width: auto;
        justify-content: space-between;
    }

    .temp-location .location-name {
        order: 1;
        flex: 1 1 auto;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: none;
    }

    .temp-location .temp-value {
        order: 2;
        font-weight: 600;
        flex: 0 0 auto;
        text-align: right;
        white-space: nowrap;
    }

    .forecast-top-section h2 {
        font-size: 0.85rem;
    }

    /* Mobile forecast values - allow two rows, centered */
    .forecast-data-compact {
        justify-content: center;
        gap: 3px 6px;
        flex-wrap: wrap; /* Allow wrapping to two lines */
        overflow: visible;
    }

    .hourly-forecast-container {
        padding: 6px 8px;
        text-align: center;
    }

    .forecast-item {
        flex: 0 0 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .item-label,
    .item-value {
        font-size: 0.6rem;
    }

    .forecast-ruler {
        padding: 4px 0;
    }

    .forecast-time-display {
        font-size: 0.8rem;
    }

    .nav-menu {
        gap: var(--spacing-sm);
        font-size: 0.9rem;
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .hero h1 {
        font-size: clamp(1.1rem, 5vw, 1.75rem);
        white-space: normal;
        line-height: 1.2;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .tab-buttons {
        gap: 0;
        justify-content: space-between;
    }

    .tab-button {
        padding: var(--spacing-sm) var(--spacing-xs);
        font-size: 0.9rem;
        flex: 1;
        text-align: center;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .time-window-inputs {
        flex-direction: row;
    }

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

    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }

    .container {
        padding: 0 var(--spacing-lg);
    }

    .hero-content {
        padding: 0 var(--spacing-lg);
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .hero h1 {
        font-size: 2rem;
    }

    .content-section {
        padding: var(--spacing-xxl) 0;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeInUp 0.6s var(--transition-smooth) both;
}

.content-section:nth-child(1) {
    animation-delay: 0.1s;
}

.content-section:nth-child(2) {
    animation-delay: 0.2s;
}

.content-section:nth-child(3) {
    animation-delay: 0.3s;
}

.content-section:nth-child(4) {
    animation-delay: 0.4s;
}

/* ========================================
   Charter Boat Schedule Styles
   ======================================== */
.dive-sites-section h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 600;
}

.schedule-intro {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    font-size: 0.95rem;
}

.charter-schedule-container {
    background: white;
    border-radius: var(--border-radius);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.date-timeline,
.charter-row {
    display: grid;
    grid-template-columns: 165px repeat(14, minmax(140px, 1fr));
    min-width: 2125px;
    border-bottom: 1px solid var(--color-border);
}

.date-timeline {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.charter-row:last-child {
    border-bottom: none;
}

.charter-name-cell {
    padding: var(--spacing-md);
    background: var(--color-bg-accent);
    border-right: 2px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: sticky;
    left: 0;
    z-index: 5;
}

/* Schedule title in header row */
.charter-name-cell.schedule-title {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    justify-content: center;
    align-items: flex-start;
    z-index: 11;
}

.charter-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.charter-link:hover {
    opacity: 0.8;
}

.charter-logo {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* Crop Scubabo logo to remove excess whitespace */
.scubabo-logo {
    object-fit: cover;
    object-position: center;
    height: 70px;
    max-width: 140px;
}

.charter-name-cell strong {
    font-size: 0.9rem;
    color: var(--color-primary);
}

.price-tag {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
}

.date-cell {
    padding: var(--spacing-sm);
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

.tour-cell {
    padding: var(--spacing-sm);
    border-right: 1px solid var(--color-border);
    min-height: 60px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.tour-cell.empty {
    background: var(--color-bg-accent);
}

.tour-item {
    font-size: 0.75rem;
    line-height: 1.3;
    padding: 0.35rem;
    background: var(--color-sand);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
    color: var(--color-text);
}

.tour-item.booked {
    background: #f0f0f0;
    border-left-color: #999;
    opacity: 0.6;
}

.tour-item .spots {
    display: block;
    font-size: 0.7rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-top: 0.15rem;
}

.tour-item.booked .spots {
    color: #666;
}

.tour-item.in-window {
    background: #E8F5E9;
    border-left-color: #4CAF50;
    box-shadow: 0 0 0 2px #4CAF50;
    animation: pulse 2s ease-in-out infinite;
}

.tour-item.in-window .spots {
    color: #2E7D32;
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px #4CAF50;
    }
    50% {
        box-shadow: 0 0 0 4px #4CAF50;
    }
}

.schedule-legend {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-box {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border-left: 3px solid;
}

.legend-box.available {
    background: var(--color-sand);
    border-left-color: var(--color-accent);
}

.legend-box.in-window {
    background: #E8F5E9;
    border-left-color: #4CAF50;
}

.legend-box.booked {
    background: #f0f0f0;
    border-left-color: #999;
    opacity: 0.6;
}

.schedule-note {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--color-bg-accent);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
}

/* Desktop responsiveness for charter schedules (768px and up) */
@media (min-width: 768px) {
    .date-timeline,
    .charter-row {
        grid-template-columns: 200px repeat(14, minmax(140px, 1fr));
        min-width: 2160px;
    }

    .charter-logo {
        max-width: 180px;
    }

    .scubabo-logo {
        height: 80px;
        max-width: 180px;
    }
}

/* Mobile responsiveness for charter schedules */
@media (max-width: 767px) {
    .charter-schedule-container {
        margin-left: calc(-1 * var(--spacing-sm));
        margin-right: calc(-1 * var(--spacing-sm));
        border-radius: 0;
    }

    .date-timeline,
    .charter-row {
        grid-template-columns: 155px repeat(14, 120px);
    }

    .charter-name-cell {
        padding: var(--spacing-sm);
    }

    .charter-logo {
        width: 100%;
        max-width: 140px;
    }

    .scubabo-logo {
        height: 60px;
        max-width: 140px;
    }

    .charter-name-cell strong {
        font-size: 0.8rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .legend-box {
        width: 25px;
        height: 18px;
    }
}

/* ========================================
   Shore Dives Three-Column Layout
   ======================================== */
.shore-dives-layout {
    padding-top: 0 !important;
}

.shore-dives-layout h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 600;
}

.shore-dives-layout .three-column-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Right content stack: Tide + Site Details vertically */
.right-content-stack {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Tide Conditions Section */
.tide-conditions-full {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth);
}

.tide-conditions-full:hover {
    box-shadow: var(--shadow-md);
}

.tide-conditions-full h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* Hide location badge when empty */
.location-badge:empty {
    display: none;
}

.location-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #546E7A;
    background: rgba(33, 150, 243, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Left Sidebar: Dive Sites List */
.dive-sites-sidebar {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth);
    max-height: calc(100vh - 340px); /* Fallback for older browsers */
    max-height: calc(100dvh - 340px); /* Dynamic viewport - reduced height by ~30% */
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    position: sticky;
    top: var(--spacing-lg);
}

.dive-sites-sidebar:hover {
    box-shadow: var(--shadow-md);
}

.dive-sites-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-border);
}

.filter-controls {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: space-between;
}

.dive-sites-sidebar h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.sites-count {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 600;
    background: var(--color-bg-accent);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* Search and Filter Controls */
.dive-sites-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.dive-search-input {
    width: 100%;
    padding: 0.4rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-family: var(--font-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dive-search-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(92, 158, 173, 0.1);
}

.dive-search-input::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

.category-filter {
    width: auto;
    min-width: 110px;
    max-width: 130px;
    padding: 0.3rem 0.4rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 0.7rem;
    font-family: var(--font-base);
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-filter:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(92, 158, 173, 0.1);
}

.category-filter:hover {
    border-color: var(--color-primary-light);
}

/* Dive Sites List */
.dive-sites-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dive-site-item {
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.15rem;
    background: var(--color-bg-accent);
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.site-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.dive-site-item:hover {
    border-color: var(--color-accent);
    background: var(--color-sand);
}

.dive-site-item.active {
    background: #E8F5E9;
    border-color: #4CAF50;
    font-weight: 600;
}

.dive-site-item.suitable {
    background: #E8F5E9;
    border-color: #4CAF50;
    animation: pulse-green 2s ease-in-out infinite;
}

.dive-site-item.no-ideal-time {
    opacity: 0.4;
    color: #999;
}

.dive-site-item.no-ideal-time:hover {
    opacity: 0.6;
}

/* Recommendation Score Badge */
.rec-score {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.score-excellent {
    background: #4CAF50;
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.score-good {
    background: #8BC34A;
    color: white;
    box-shadow: 0 2px 4px rgba(139, 195, 74, 0.3);
}

/* Ideal dive minutes score (for overlap calculation demo) */
.rec-score.ideal-minutes {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
    font-weight: 600;
    line-height: 1.3;
    display: inline-block;
    text-align: center;
    max-width: 85px;
}

/* Suitability highlighting for dive site items */
.dive-site-item.suitable-excellent {
    background: #E8F5E9;
    border-color: #4CAF50;
}

.dive-site-item.suitable-good {
    background: #F1F8E9;
    border-color: #8BC34A;
}

/* Non-recommended sites (score < 60) shown grayed out for transparency */
.dive-site-item.suitable-not-recommended {
    opacity: 0.5;
    background: #F5F5F5;
    border-color: #BDBDBD;
}

.dive-site-item.suitable-not-recommended:hover {
    opacity: 0.7;
}

.site-name {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.2;
}

.site-category {
    font-size: 0.65rem;
    color: var(--color-accent);
    font-weight: 600;
    display: inline-block;
    line-height: 1;
}

.site-level {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* Loading and Error States */
.loading-message,
.no-results,
.error-message {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
}

.error-message {
    color: #d32f2f;
    background: #ffebee;
    border-radius: 6px;
    border-left: 3px solid #d32f2f;
}

/* Middle Section: Site Details */
.site-details {
    background: white !important;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth);
    /* min-height removed - was causing empty space on mobile */
    /* Desktop will auto-size based on content */
}

.site-details:hover {
    box-shadow: var(--shadow-md);
}

.site-details-content {
    background: white !important;
}

.site-content-display {
    background: white !important;
}

#site-details {
    background: white !important;
}

#site-content {
    background: white !important;
}

#site-title {
    background: white !important;
}

.site-details h3 {
    margin-top: 0;
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
}

.select-site-message {
    color: var(--color-text-light);
    font-style: italic;
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: white !important;
}

/* Comprehensive Dive Site Detail Styles */
.site-card {
    background: white !important;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.site-details .site-card {
    background: white !important;
}

.site-card:hover {
    border-color: #2a5298;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.15);
    transform: translateY(-2px);
}

.site-card .site-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
    background: white;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: inherit;
    padding: 0;
    box-shadow: none;
    position: static;
    z-index: auto;
}

.site-card .site-header-left {
    flex: 1;
}

.site-card .site-header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.site-card .site-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2a5298;
    margin-bottom: 5px;
}

/* Inline coordinates within site title */
.site-card .site-title .inline-coords {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: normal;
    color: #28a745;
    margin-left: 8px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-card .site-title .inline-coords:hover {
    color: #1e7e34;
    text-decoration: underline;
}

.site-location-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    align-items: center;
}

.gps-coords {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #28a745;
    text-decoration: none;
    padding: 3px 8px;
    background: #e8f5e9;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #c8e6c9;
    transition: all 0.2s;
    user-select: all;
}

/* Desktop: Show full GPS coordinates, hide short version */
.gps-coords .gps-full {
    display: inline;
}

.gps-coords .gps-short {
    display: none;
}

.gps-coords:hover {
    background: #c8e6c9;
    border-color: #28a745;
    color: #1b5e20;
}

.tide-ref {
    font-size: 0.75rem;
    font-weight: 400;
    color: #546E7A;
    background: #E3F2FD;
    padding: 4px 10px;
    border-radius: 4px;
    border-left: 3px solid #2196F3;
    cursor: help;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tide-ref:hover {
    background: #BBDEFB;
    color: #1565C0;
}

.tide-ref-external {
    font-size: 0.75rem;
    font-weight: 400;
    color: #5D4E37;
    background: #FFF8DC;
    padding: 4px 10px;
    border-radius: 4px;
    border-left: 3px solid #DAA520;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tide-ref-external:hover {
    background: #FFE4B5;
    color: #8B4513;
    border-left-color: #B8860B;
}

.tide-ref-external::after {
    content: '↗';
    font-size: 0.8em;
    opacity: 0.7;
}

.site-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #333 !important;
    text-transform: uppercase;
}

/* Desktop: Hide mobile badge, show desktop badge */
.site-type-mobile {
    display: none;
}

.site-type-desktop {
    display: inline-block;
}

.type-shore { background: #a8e6a3; }
.type-reef { background: #a3dde8; }
.type-wreck { background: #f8b4b4; }
.type-pier { background: #ffe89f; }
.type-bommie { background: #d4b5f0; }
.type-wall { background: #ffc99f; }

.site-card .site-meta {
    display: flex;
    gap: 8px;
    margin: 2px 0 8px 0; /* Reduced top margin to 2px for tighter spacing */
    flex-wrap: wrap;
    font-size: 0.8rem;
    align-items: center;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    padding-left: 8px;
}

/* Add pipe separator before meta-item */
.meta-item::before {
    content: "|";
    position: absolute;
    left: -4px;
    color: #dee2e6;
    font-weight: 400;
}

.meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.meta-value {
    color: #495057;
    font-weight: 500;
    font-size: 0.75rem;
    position: relative;
    padding-left: 8px;
}

/* Inline value (no separator, used with labels) */
.meta-value-inline {
    color: #495057;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Add pipe separator before meta values (except first one) */
.meta-value:not(:first-of-type)::before {
    content: "|";
    position: absolute;
    left: -4px;
    color: #dee2e6;
    font-weight: 400;
}

.site-link {
    display: inline-block;
    padding: 5px 12px;
    background: #2a5298;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.site-link:hover {
    background: #1e3c72;
}

.site-link::after {
    content: " →";
}

.site-description {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #495057;
    white-space: pre-line;
    background: white !important;
}

.site-description p {
    margin: 0.5em 0;
    background: white !important;
}

.ideal-conditions {
    background: #e7f3ff;
    border-left: 4px solid #2a5298;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.ideal-conditions h4 {
    color: #546E7A;
    margin: 0 0 8px 0;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ideal-conditions h4::before {
    content: "☀";
    font-size: 1.2rem;
}

.ideal-conditions p {
    color: #495057;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

.section-group {
    margin-top: 20px;
    background: white !important;
}

.info-section {
    background: white !important;
    border-left: 3px solid #6c757d;
    padding: 12px 15px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.info-section h5 {
    font-size: 0.75rem;
    color: #546E7A;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-section p {
    color: #495057;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
    background: white !important;
}

.info-section.parking {
    border-left-color: #28a745;
}

.info-section.parking h5::before {
    content: "🅿 ";
}

.info-section.entry {
    border-left-color: #17a2b8;
}

.info-section.entry h5::before {
    content: "🚪 ";
}

.info-section.facilities {
    border-left-color: #ffc107;
}

.info-section.facilities h5::before {
    content: "🏪 ";
}

.info-section.safety {
    border-left-color: #dc3545;
}

.info-section.safety h5::before {
    content: "⚠ ";
}

.info-section.marine {
    border-left-color: #6f42c1;
}

.info-section.marine h5::before {
    content: "🐠 ";
}

.info-section.directions {
    border-left-color: #fd7e14;
}

.info-section.directions h5::before {
    content: "🧭 ";
}

.additional-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    background: white !important;
}

.additional-info h5 {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.additional-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: white !important;
}

.additional-info li {
    padding: 4px 0;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
    background: white !important;
}

.additional-info li::before {
    content: "• ";
    color: #2a5298;
    font-weight: bold;
    margin-right: 5px;
}


/* Legacy Site Info Grid */
.site-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: white !important;
    border-radius: 6px;
}

.info-item {
    font-size: 0.9rem;
    background: white !important;
}

.info-item strong {
    color: var(--color-primary);
}

.site-highlights {
    background: white !important;
}

.site-conditions {
    background: white !important;
}

.site-highlights h4,
.site-conditions h4 {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.highlights-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
    background: white !important;
}

.highlights-list li {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: white !important;
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
    font-size: 0.9rem;
}

.site-conditions p {
    background: white !important;
    padding: var(--spacing-md);
    border-radius: 6px;
    border-left: 3px solid var(--color-accent);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Right Sidebar: Tide Chart */
.tide-chart {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--transition-smooth);
}

.tide-chart:hover {
    box-shadow: var(--shadow-md);
}

.tide-chart h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    font-size: 1.2rem;
}

.tide-loading {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--color-text-light);
    font-style: italic;
}

.tide-chart-container {
    background: var(--color-bg-accent);
    padding: var(--spacing-sm);
    border-radius: 6px;
    margin-bottom: var(--spacing-md);
}

#tideCanvas {
    width: 100%;
    height: auto;
}

.tide-locations-legend {
    background: var(--color-bg-accent);
    padding: var(--spacing-md);
    border-radius: 6px;
}

.tide-locations-legend h4 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    font-size: 0.95rem;
}

.tide-locations-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tide-locations-legend li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
    font-size: 0.85rem;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Tide Location Selector */
.tide-location-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tide-dropdown {
    min-width: 120px;
    max-width: 150px;
    padding: 0.3rem 0.4rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 0.7rem;
    font-family: var(--font-base);
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.tide-dropdown:focus {
    outline: none;
    border-color: var(--color-accent);
}

.selected-locations {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 16px;
    font-size: 0.75rem;
    border: 1px solid #ddd;
}

.location-tag .color-dot {
    width: 10px;
    height: 10px;
}

.location-tag .remove-btn {
    cursor: pointer;
    font-weight: bold;
    color: #666;
    font-size: 1rem;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.2s;
}

.location-tag .remove-btn:hover {
    color: #333;
}

/* Mobile Responsiveness for Three-Column Layout */
@media (max-width: 1024px) {
    .shore-dives-layout .three-column-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Mobile reordering: Tide → Site Details → Dive Sites List */
    .right-content-stack {
        order: -1; /* Move tide + details above dive sites */
    }

    .dive-sites-sidebar {
        order: 1; /* Move dive sites to bottom */
        max-width: 100%;
        position: static;
        max-height: 500px; /* Limit height so users can scroll past it */
        margin-bottom: var(--spacing-lg);
    }

    .tide-chart {
        max-width: 100%;
        position: static;
        max-height: none;
    }

    /* Remove min-height on tablet/mobile to prevent empty space */
    .site-details {
        min-height: auto;
    }

    .highlights-list {
        grid-template-columns: 1fr;
    }

    .site-detail-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .dive-sites-sidebar,
    .site-details,
    .tide-chart {
        padding: var(--spacing-sm);
    }

    /* Compact Diving Conditions section on mobile - match Site Details styling */
    .tide-conditions-full {
        padding: 10px !important;
    }

    .tide-conditions-full h3 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    /* Match "Click on a dive site" message styling between both sections */
    .tide-loading {
        padding: 8px 0 !important;
        text-align: left !important;
    }

    .tide-loading .select-site-message {
        font-size: 0.8rem !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        text-align: left !important;
    }

    /* Compact Site Details section on mobile - before site selection */
    .site-details {
        min-height: auto !important;
        padding: 10px !important;
    }

    .site-details h3 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .site-details .select-site-message {
        padding: 8px 0 !important;
        font-size: 0.8rem !important;
        text-align: left !important;
    }

    /* Compact graph section titles on mobile */
    .graph-subsection-title {
        font-size: 9px;
        padding: 1px 5px;
        top: 4px;
        left: 50px;
    }

    .dive-sites-controls {
        grid-template-columns: 1fr;
    }

    .dive-sites-header {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-xs);
    }

    .dive-sites-header h3 {
        margin: 0;
        white-space: nowrap;
    }

    .dive-sites-header .filter-controls {
        flex: 1;
        justify-content: flex-end;
    }

    .dive-sites-header .filter-controls select {
        font-size: 0.8rem;
        padding: 0.2rem 0.3rem;
    }

    .sites-count {
        align-self: flex-end;
    }

    .site-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .site-type-badge {
        align-self: flex-start;
    }

    .site-detail-info {
        grid-template-columns: 1fr;
    }

    .site-info-grid {
        grid-template-columns: 1fr;
    }

    .site-name {
        font-size: 0.9rem;
    }

    .site-category {
        font-size: 0.7rem;
    }

    #tideCanvas {
        width: 100%;
    }

    /* Mobile: Compact dive site details layout */
    .site-card .site-header {
        flex-direction: column; /* Stack vertically on mobile */
        align-items: stretch;
        gap: 8px;
    }

    .site-card .site-header-left {
        order: 1;
    }

    .site-card .site-header-right {
        order: 2;
        justify-content: space-between; /* Badge left, button right on mobile */
    }

    .site-card .site-title {
        font-size: 1.05rem;
        margin-bottom: 6px;
    }

    /* Location badges container on mobile */
    .site-location-badges {
        display: flex;
        flex-wrap: nowrap; /* Prevent wrapping - keep on one line */
        gap: 2px; /* Reduced from 4px */
        margin-top: 6px;
        align-items: center;
        overflow-x: auto; /* Allow horizontal scroll if necessary */
        -webkit-overflow-scrolling: touch;
    }

    /* Make GPS coords, tide refs compact on mobile */
    .gps-coords {
        font-size: 0.65rem; /* Reduced from 0.7rem */
        padding: 2px 4px; /* Reduced from 3px 6px */
        line-height: 1.2; /* Match tide ref height */
        flex-shrink: 0; /* Prevent compression */
    }

    .tide-ref,
    .tide-ref-external {
        font-size: 0.65rem; /* Reduced from 0.7rem */
        padding: 3px 4px; /* Increased vertical padding to match GPS coords */
        white-space: nowrap;
        line-height: 1.2;
        flex-shrink: 0; /* Prevent compression */
    }

    /* Two-column grid for site metadata on mobile */
    .site-card .site-meta {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        margin: 2px 0 8px 0; /* Reduced top margin to 2px for tighter spacing */
        font-size: 0.75rem;
    }

    /* Mobile: Show mobile badge in header, hide desktop badge in metadata */
    .site-type-mobile {
        display: inline-block;
        font-size: 0.65rem;
        padding: 2px 8px;
        margin-right: auto; /* Push button to the right */
    }

    .site-type-desktop {
        display: none;
    }

    .meta-value {
        padding-left: 0;
        font-size: 0.7rem;
    }

    .meta-value::before {
        display: none; /* Remove pipe separator on mobile */
    }

    .meta-item {
        padding-left: 0;
        font-size: 0.7rem;
    }

    .meta-item::before {
        display: none; /* Remove pipe separator on mobile */
    }

    .meta-label {
        font-size: 0.6rem;
    }

    .meta-value-inline {
        font-size: 0.7rem;
    }

    /* Compact site link button on mobile */
    .site-link {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    /* Adjust site card padding on mobile */
    .site-card {
        padding: 12px;
    }

    .site-card .site-header {
        margin-bottom: 10px;
        gap: 6px;
    }
}

/* ========================================
   Interesting Now Page Styles
   ======================================== */

/* Section Title Styling */
.section-title {
    color: var(--color-primary);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-accent);
}

/* Three Column Section */
.three-column-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.column-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.column-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.column-card h3 {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin: 0 0 var(--spacing-sm) 0;
    font-weight: 600;
}

.column-card p {
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
}

/* Subscribe Form */
.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.subscribe-form input[type="email"] {
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-family: var(--font-base);
    transition: border-color 0.3s ease;
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(92, 158, 173, 0.1);
}

.subscribe-form input[type="email"]:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.subscribe-form button {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: var(--color-primary-light);
}

.subscribe-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.subscribe-form button:disabled:hover {
    background: #ccc;
    transform: none;
}

.coming-soon-note {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--spacing-xs);
    text-align: center;
}

/* Contact Info */
.contact-info {
    margin-top: var(--spacing-sm);
}

.contact-info p {
    margin: var(--spacing-xs) 0;
    font-size: 0.95rem;
}

.contact-info strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* Donate Section - Ko-fi Button */
.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--spacing-sm);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    justify-content: center;
}

.kofi-button:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.kofi-icon {
    height: 20px;
    width: 20px;
    animation: kofi-wiggle 3s infinite;
}

@keyframes kofi-wiggle {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
    30% { transform: rotate(-10deg); }
    40% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
}

/* PayPal Donation Button */
.paypal-form {
    margin-top: var(--spacing-sm);
    width: 100%;
}

.paypal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #0070BA;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    font-family: var(--font-base);
}

.paypal-button:hover {
    background: #005ea6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.paypal-icon {
    height: 20px;
    width: 20px;
    fill: white;
}

.donate-note {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--spacing-sm);
}

/* Responsive Design for Three Column Section */
@media (max-width: 1024px) {
    .three-column-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 767px) {
    .section-title {
        font-size: 1.5rem;
    }

    .column-card {
        padding: var(--spacing-md);
    }

    .column-card h3 {
        font-size: 1.1rem;
    }
}

/* ========================================
   Privacy Policy Styles
   ======================================== */
.policy-title {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* Policy section list bullet points - blue-grey markers */
#about ul li::marker {
    color: var(--color-primary);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .site-header,
    .site-footer,
    .ad-container,
    .cta-button {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    a {
        text-decoration: underline;
    }
}

