/* GFT Static Site - Base Styles */
/* Following daytrips site pattern */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy: #1a2744;
    --ocean: #2563eb;
    --ocean-dark: #1d4ed8;
    --sky: #e0f2fe;
    --sand: #fef3c7;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --content-width: 800px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--gray-900); line-height: 1.7; background: var(--white); }

/* Skip to content */
.skip-to-content {
    position: absolute; left: -9999px; top: 0;
    background: var(--ocean); color: white; padding: 0.5rem 1rem;
    z-index: 1000;
}
.skip-to-content:focus { left: 0; }

/* Header */
.site-header {
    background: var(--navy);
    color: var(--white);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}
.site-logo span { color: var(--sky); }

/* Nav toggle (mobile) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block; background: white; height: 2px; width: 24px;
    position: relative; transition: 0.3s;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after { content: ''; position: absolute; }
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { top: 7px; }

.site-nav ul {
    list-style: none; display: flex; gap: 0.25rem;
}
.site-nav a {
    color: var(--gray-200);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
}
.site-nav a:hover, .site-nav a:focus-visible {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav-toggle-label { display: block; }
    .site-nav {
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--navy);
        max-height: 0; overflow: hidden;
        transition: max-height 0.3s;
    }
    .nav-toggle:checked ~ .site-nav { max-height: 400px; }
    .site-nav ul { flex-direction: column; padding: 0.5rem 1.5rem 1rem; }
    .site-nav a { display: block; padding: 0.75rem; }
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--ocean-dark) 100%);
    color: var(--white);
    padding: 4rem 1.5rem;
    text-align: center;
}
.hero-home {
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 380px;
}
.hero-overlay {
    background: linear-gradient(to bottom, rgba(26,39,68,0.4) 0%, rgba(26,39,68,0.85) 100%);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}
.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Resources box */
.gft-resources-box {
    background: var(--sky);
    border-left: 4px solid var(--navy);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.gft-resources-box .resources-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--navy);
    margin: 0 0 0.75rem 0;
}
.gft-resources-box ul {
    margin: 0;
    padding: 0 0 0 1.25rem;
    line-height: 1.9;
}
.gft-resources-box li {
    margin-bottom: 0.25rem;
}
.gft-resources-box a {
    color: var(--ocean);
    text-decoration: underline;
}
.gft-resources-box a:hover {
    color: var(--ocean-dark);
}
.home-resources {
    padding: 1.5rem 0 0;
}
.home-intro {
    padding: 2rem 0;
}
.home-content {
    max-width: var(--content-width);
    margin: 0 auto;
}
.home-content h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    color: var(--navy);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.5rem;
}
.home-content p { margin-bottom: 1rem; }
.home-content ul { margin: 0 0 1.5rem 1.5rem; }
.home-content li { margin-bottom: 0.4rem; }
.home-content a { color: var(--ocean); text-decoration: underline; }
.home-content a:hover { color: var(--ocean-dark); }
.home-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}
.home-content iframe {
    max-width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin: 1rem 0;
}

/* Sections */
.home-categories, .home-routes, .home-editorial {
    padding: 3rem 0;
}
.home-categories { background: var(--gray-50); }
.home-categories h2, .home-routes h2, .home-editorial h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Category grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}
.category-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--gray-900);
    transition: box-shadow 0.2s, transform 0.2s;
}
.category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--ocean-dark);
}
.category-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--gray-900);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.card-body { padding: 1.25rem; }
.card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}
.card-body p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* Footer */
.site-footer {
    background: var(--navy);
    color: var(--gray-300);
    padding: 2.5rem 1.5rem;
    text-align: center;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}
.footer-tagline { font-size: 0.9rem; margin-bottom: 1rem; }
.footer-nav ul {
    list-style: none; display: flex; flex-wrap: wrap;
    justify-content: center; gap: 1rem; margin-bottom: 1rem;
}
.footer-nav a { color: var(--gray-300); text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; color: var(--gray-500); }

/* Back to top */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem;
    background: var(--ocean); color: white;
    border: none; border-radius: 50%;
    width: 44px; height: 44px;
    cursor: pointer; opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* === Route Pages === */

/* Route hero with background image */
.route-hero {
    position: relative;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.route-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(26,39,68,0.3) 0%, rgba(26,39,68,0.8) 100%);
    display: flex; align-items: flex-end;
    padding-bottom: 1.5rem;
}
.route-hero-plain {
    background: var(--navy);
    padding: 1.5rem 0;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--gray-300);
}
.breadcrumbs a {
    color: var(--sky);
    text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep {
    margin: 0 0.4rem;
    opacity: 0.5;
}

/* Route article body */
.route-article {
    padding: 2.5rem 0 3rem;
}
.route-content {
    max-width: var(--content-width);
}
.route-content h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    color: var(--navy);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.5rem;
}
.route-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-700);
}
.route-content p {
    margin-bottom: 1rem;
}
.route-content ul, .route-content ol {
    margin: 0 0 1rem 1.5rem;
}
.route-content li {
    margin-bottom: 0.4rem;
}
.route-content a {
    color: var(--ocean);
    text-decoration: underline;
}
.route-content a:hover {
    color: var(--ocean-dark);
}

/* Ferry schedule tables (from generated HTML) */
.route-content table,
.route-content .ferry-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}
.route-content table th,
.route-content table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}
.route-content table th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
}
.route-content table tr:hover td {
    background: var(--gray-50);
}

/* At-a-glance box */
.route-content .ferry-at-a-glance {
    background: var(--sky);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.route-content .ferry-at-a-glance h3 {
    margin-top: 0;
    color: var(--navy);
}
.route-content .ferry-at-a-glance ul {
    margin-left: 0;
    list-style: none;
}
.route-content .ferry-at-a-glance li {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.route-content .ferry-at-a-glance li:last-child {
    border-bottom: none;
}

/* Booking CTA box */
.route-content .ferry-booking-cta {
    border-radius: 8px !important;
    margin: 1.5rem 0 !important;
}
.route-content .ferry-booking-cta a {
    color: #fff !important;
}

/* Ferryhopper embed */
.route-content iframe {
    max-width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin: 1rem 0;
}

/* Related routes sidebar */
.related-routes {
    background: var(--gray-50);
    padding: 2.5rem 0;
    border-top: 1px solid var(--gray-200);
}
.related-routes .container {
    max-width: var(--content-width);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 600px) {
    .related-routes .container {
        grid-template-columns: 1fr;
    }
}
.related-group h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}
.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.related-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.related-list li:last-child { border-bottom: none; }
.related-list a {
    color: var(--ocean);
    text-decoration: none;
    font-size: 0.9rem;
}
.related-list a:hover { text-decoration: underline; }

/* Responsive images in route content */
.route-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* === Editorial Pages === */

.editorial-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--ocean-dark) 100%);
    color: var(--white);
    padding: 2rem 0 2.5rem;
}
.editorial-header .breadcrumbs { margin-bottom: 1rem; }
.editorial-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    max-width: var(--content-width);
}

.editorial-article { padding: 2.5rem 0 3rem; }
.editorial-content {
    max-width: var(--content-width);
}
.editorial-content h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    color: var(--navy);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.5rem;
}
.editorial-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-700);
}
.editorial-content p { margin-bottom: 1rem; }
.editorial-content ul, .editorial-content ol { margin: 0 0 1rem 1.5rem; }
.editorial-content li { margin-bottom: 0.4rem; }
.editorial-content a { color: var(--ocean); text-decoration: underline; }
.editorial-content a:hover { color: var(--ocean-dark); }
.editorial-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}
.editorial-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}
.editorial-content table th,
.editorial-content table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}
.editorial-content table th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--navy);
}
.editorial-content blockquote {
    border-left: 4px solid var(--ocean);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-radius: 0 6px 6px 0;
    color: var(--gray-700);
}

/* === Category Pages === */

.category-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--ocean-dark) 100%);
    color: var(--white);
    padding: 2rem 0 2.5rem;
}
.category-hero .breadcrumbs { margin-bottom: 1rem; }
.category-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
}
.category-intro {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
}

.category-section { padding: 2.5rem 0; }
.category-section + .category-section { padding-top: 0; }
.category-section h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--navy);
}
.category-editorial { background: var(--gray-50); padding: 2.5rem 0; }
