/* Reset & Variables */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #0066cc;
    --primary-dark: #004d99;
    --secondary: #00a67e;
    --dark: #1a1a2e;
    --gray-900: #212529;
    --gray-700: #495057;
    --gray-500: #6c757d;
    --gray-300: #dee2e6;
    --gray-100: #f8f9fa;
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-100);
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
}
.logo svg { color: var(--primary); }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--gray-700); font-weight: 500; }
.nav a:hover { color: var(--primary); }

/* Lang selector */
.lang-selector { position: relative; }
.lang-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    padding: 6px 12px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.lang-btn:hover { background: var(--gray-300); }
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 80px;
    display: none;
    overflow: hidden;
    margin-top: 4px;
}
.lang-selector:hover .lang-dropdown { display: block; }
.lang-dropdown a {
    display: block;
    padding: 8px 16px;
    color: var(--gray-700);
    font-weight: 500;
}
.lang-dropdown a:hover { background: var(--gray-100); }
.lang-dropdown a.active { background: var(--primary); color: var(--white); }

/* Mobile menu */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-900);
    margin: 5px 0;
    transition: var(--transition);
}

/* Breadcrumb */
.breadcrumb {
    padding: 16px 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
}
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    font-size: 0.875rem;
}
.breadcrumb-list li::after { content: '/'; margin-left: 8px; color: var(--gray-500); }
.breadcrumb-list li:last-child::after { display: none; }
.breadcrumb-list a { color: var(--gray-500); }
.breadcrumb-list a:hover { color: var(--primary); }
.breadcrumb-list li:last-child { color: var(--gray-900); font-weight: 500; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; }
.hero p { font-size: 1.125rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 40px 0;
}
.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header p { opacity: 0.8; }

/* Cards grid */
.section { padding: 48px 0; }
.section-title { font-size: 1.5rem; margin-bottom: 24px; color: var(--dark); }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: 8px; }
.card h3 a { color: var(--gray-900); }
.card h3 a:hover { color: var(--primary); }
.card p { color: var(--gray-500); font-size: 0.875rem; }
.card .count { display: inline-block; background: var(--gray-100); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; color: var(--gray-700); margin-top: 12px; }

/* Tide table */
.tide-table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 24px 0;
}
.tide-table {
    width: 100%;
    border-collapse: collapse;
}
.tide-table th, .tide-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-300);
}
.tide-table th {
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}
.tide-table tr:last-child td { border-bottom: none; }
.tide-table tr:hover td { background: var(--gray-100); }

.tide-high { color: var(--primary); font-weight: 600; }
.tide-low { color: var(--secondary); font-weight: 600; }
.coef-high { background: #fff3cd; color: #856404; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.coef-low { background: #d4edda; color: #155724; padding: 2px 8px; border-radius: 4px; }

/* Content section */
.content-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin: 24px 0;
}
.content-section h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--dark); }
.content-section p { color: var(--gray-700); margin-bottom: 12px; }

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 48px 0 24px;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-brand .logo { color: var(--white); margin-bottom: 12px; }
.footer-brand .logo svg { color: var(--secondary); }
.footer-brand p { font-size: 0.875rem; }
.footer-links h4 { color: var(--white); margin-bottom: 16px; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--gray-500); font-size: 0.875rem; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--gray-700); padding-top: 24px; text-align: center; font-size: 0.875rem; }

/* 404 */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 6rem; color: var(--primary); margin-bottom: 16px; }
.error-page p { color: var(--gray-500); margin-bottom: 24px; }
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background var(--transition);
}
.btn:hover { background: var(--primary-dark); color: var(--white); }

/* Responsive */
@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-menu-btn { display: block; }
    .hero h1 { font-size: 1.75rem; }
    .page-header h1 { font-size: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .cards-grid { grid-template-columns: 1fr; }
    .tide-table { font-size: 0.875rem; }
    .tide-table th, .tide-table td { padding: 8px 12px; }
}

/* Date navigation */
.date-nav-wrapper { margin-bottom: 24px; overflow-x: auto; }
.date-nav { display: flex; gap: 8px; }
.date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-700);
    transition: all var(--transition);
    min-width: 60px;
}
.date-btn:hover { border-color: var(--primary); color: var(--primary); }
.date-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.date-btn .day { font-size: 0.75rem; text-transform: uppercase; }
.date-btn .date { font-size: 1.25rem; font-weight: 700; }

/* Ephemeride */
.ephemeride-card {
    display: flex;
    gap: 32px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 24px 0;
}
.ephemeride-item { display: flex; align-items: center; gap: 12px; }
.ephemeride-icon { font-size: 1.5rem; }
.ephemeride-label { color: var(--gray-500); font-size: 0.875rem; }
.ephemeride-value { font-weight: 600; }

/* Activities grid */
.activities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.activities-col h3 { margin-bottom: 12px; font-size: 1rem; color: var(--primary); }
.activity-item { margin-bottom: 12px; }
.activity-item strong { display: block; margin-bottom: 4px; }
.activity-item p { color: var(--gray-500); font-size: 0.875rem; margin: 0; }

@media (max-width: 768px) {
    .activities-grid { grid-template-columns: 1fr; }
    .ephemeride-card { flex-direction: column; gap: 16px; }
    .date-nav { overflow-x: auto; padding-bottom: 8px; }
}
