/* ============================================
   STYLE.CSS - Main Entry Point
   Imports base and component styles
   ============================================ */
@import url('base.css');
@import url('components.css');

/* ============================================
   Additional CSS Variables
   ============================================ */
:root {
    --campaign-parallax-offset: -3px;
    --text-dark: #2c3e50;
    --text-medium: #34495e;
    --text-light: #7f8c8d;
    --gutter-bg: rgba(0, 0, 0, 0.02);
    --gutter-border: #9e9e9e;
    --card-hover: #f0f0f0;
    --campaign-overlay: linear-gradient(to right, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.7) 100%);
}

/* ============================================
   Body - Override base.css for landing page
   ============================================ */
body {
    padding-top: 5rem;
    /* Account for fixed header */
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-logo:hover {
    opacity: 0.7;
}

.header-logo-image {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.breadcrumb-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.breadcrumb-container {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    /* display: flex; */
    align-items: center;
    gap: 0.5rem;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    /* flex: 1; */
    white-space: nowrap;
    min-width: 0;
}

.breadcrumb-item {
    display: inline;
}

.breadcrumb-ellipsis {
    color: var(--text-tertiary);
}

.breadcrumb-link {
    color: black;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--accent-blue-dark);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    margin: 0 0.25rem;
    font-weight: normal;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.header-controls {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    /* display: flex; */
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: black;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    transform: scale(1.1);
}

.theme-toggle:focus {
    /* outline: 2px solid var(--accent-blue); */
    outline-offset: 2px;
}

.theme-toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(20deg);
}

/* Theme toggle icons */
.theme-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.theme-icon--moon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.058 20q-3.334 0-5.667-2.333T4.058 12q0-3.039 1.98-5.27t4.904-2.634q.081 0 .159.006t.153.017q-.506.706-.801 1.57T10.158 7.5q0 2.667 1.866 4.533t4.534 1.867q.951 0 1.813-.295t1.548-.801q.012.075.017.153t.006.159q-.384 2.923-2.615 4.903T12.057 20m0-1q2.2 0 3.95-1.213t2.55-3.162q-.5.125-1 .2t-1 .075q-3.074 0-5.237-2.162T9.158 7.5q0-.5.075-1t.2-1q-1.95.8-3.163 2.55T5.058 12q0 2.9 2.05 4.95t4.95 2.05m-.25-6.75'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.058 20q-3.334 0-5.667-2.333T4.058 12q0-3.039 1.98-5.27t4.904-2.634q.081 0 .159.006t.153.017q-.506.706-.801 1.57T10.158 7.5q0 2.667 1.866 4.533t4.534 1.867q.951 0 1.813-.295t1.548-.801q.012.075.017.153t.006.159q-.384 2.923-2.615 4.903T12.057 20m0-1q2.2 0 3.95-1.213t2.55-3.162q-.5.125-1 .2t-1 .075q-3.074 0-5.237-2.162T9.158 7.5q0-.5.075-1t.2-1q-1.95.8-3.163 2.55T5.058 12q0 2.9 2.05 4.95t4.95 2.05m-.25-6.75'/%3E%3C/svg%3E");
}

.theme-icon--sun {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 16q-1.671 0-2.835-1.164Q8 13.67 8 12t1.165-2.835T12 8t2.836 1.165T16 12t-1.164 2.836T12 16m-7-3.5H1.5v-1H5zm17.5 0H19v-1h3.5zM11.5 5V1.5h1V5zm0 17.5V19h1v3.5zM6.746 7.404l-2.16-2.098l.695-.745l2.111 2.135zM18.72 19.439l-2.117-2.141l.652-.702l2.16 2.098zM16.596 6.745l2.098-2.16l.745.695l-2.135 2.111zM4.562 18.72l2.14-2.117l.664.652l-2.08 2.179z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 16q-1.671 0-2.835-1.164Q8 13.67 8 12t1.165-2.835T12 8t2.836 1.165T16 12t-1.164 2.836T12 16m-7-3.5H1.5v-1H5zm17.5 0H19v-1h3.5zM11.5 5V1.5h1V5zm0 17.5V19h1v3.5zM6.746 7.404l-2.16-2.098l.695-.745l2.111 2.135zM18.72 19.439l-2.117-2.141l.652-.702l2.16 2.098zM16.596 6.745l2.098-2.16l.745.695l-2.135 2.111zM4.562 18.72l2.14-2.117l.664.652l-2.08 2.179z'/%3E%3C/svg%3E");
}

.mdi--map-outline {
    display: inline-block;
    width: 24px;
    height: 24px;
    --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m20.5 3l-.16.03L15 5.1L9 3L3.36 4.9c-.21.07-.36.25-.36.48V20.5a.5.5 0 0 0 .5.5l.16-.03L9 18.9l6 2.1l5.64-1.9c.21-.07.36-.25.36-.48V3.5a.5.5 0 0 0-.5-.5M10 5.47l4 1.4v11.66l-4-1.4zm-5 .99l3-1.01v11.7l-3 1.16zm14 11.08l-3 1.01V6.86l3-1.16z'/%3E%3C/svg%3E");
    background-color: currentColor;
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* ============================================
   Anchor Offset (for fixed header)
   ============================================ */
:target,
[id],
span[id] {
    scroll-margin-top: 100px;
}

span[id] {
    display: inline-block;
}

/* Fallback for older browsers */
span[id]::before {
    content: "";
    display: block;
    height: 100px;
    margin-top: -100px;
    visibility: hidden;
}

/* ============================================
   Container Overrides
   ============================================ */
.container {
    background-color: var(--container-bg);
    max-width: 900px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    text-align: left;
    position: relative;
}

/* ============================================
   Notes Gutter
   ============================================ */
.notes-gutter {
    position: absolute;
    left: -150px;
    width: 130px;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    padding: 0.25rem 0.5rem 0.25rem 0;
}

.notes-gutter .irl-date {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.notes-gutter .session-info {
    display: block;
    font-style: italic;
    color: var(--text-tertiary);
}

/* For smaller screens, place notes above content instead */
@media (max-width: 1200px) {
    .notes-gutter {
        position: static;
        width: auto;
        text-align: left;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        background: var(--gutter-bg);
        border-left: 3px solid var(--gutter-border);
    }
}

/* ============================================
   Typography Overrides
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-dark);
}

h1 {
    border-bottom: 2px solid var(--gutter-border);
    padding-bottom: 0.3em;
}

h2 {
    font-size: 1.1em;
    padding-bottom: 0.2em;
}

h3 {
    font-size: 1.5em;
    color: var(--text-medium);
}

p {
    margin-bottom: 1em;
    text-align: justify;
}

strong,
b {
    font-weight: 600;
    color: var(--text-dark);
}

em,
i {
    font-style: italic;
    color: var(--text-light);
}

/* ============================================
   Links
   ============================================ */
a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: bold;
}

a:hover {
    color: var(--accent-blue-dark);
    text-decoration: underline;
}

/* Map icon links in headers */
.map-icon-link {
    margin-left: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    display: inline-block;
    vertical-align: text-top;
}

.map-icon-link:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

.map-icon-link .mdi--map-outline {
    width: 18px;
    height: 18px;
    display: inline-block;
}

/* ============================================
   Campaign Landing Page
   ============================================ */
.subtitle {
    font-size: 0.9rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.campaigns {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.campaign-description {
    display: none;
}

.footer {
    margin-top: 4rem;
    font-size: 0.7rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   Lists Overrides
   ============================================ */
li {
    margin-bottom: 0.5em;
    text-align: left;
}

ul ul,
ol ol,
ul ol,
ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* ============================================
   Code
   ============================================ */
code {
    background-color: #f8f9fa;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1em;
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* ============================================
   Blockquotes
   ============================================ */
blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    color: #7f8c8d;
    font-style: italic;
}

/* ============================================
   Tables Overrides
   ============================================ */
table {
    background-color: white;
}

th,
td {
    border: 1px solid #bdc3c7;
}

th {
    background-color: #f8f9fa;
    color: #2c3e50;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8f4fd;
}

/* ============================================
   Horizontal Rules & Images
   ============================================ */
hr {
    border: none;
    height: 1px;
    background-color: #bdc3c7;
    margin: 2em 0;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 0;
}

/* ============================================
   Animations
   ============================================ */

/* Highlight animation for anchor targets */
@keyframes highlight-flash {
    0% {
        background-color: rgba(255, 255, 0, 0.6);
    }

    100% {
        background-color: transparent;
    }
}

span[id].highlight-target {
    animation: highlight-flash 2s ease-out;
}

/* Calendar toggle button in header */
#calendar-toggle {
    background: transparent;
    border: none;
    /* padding: 8px; */
    font-size: 32px;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#calendar-toggle iconify-icon {
    color: inherit;
}

#calendar-toggle:hover {
    color: var(--text-secondary);
}

/* Calendar widget positioning for logbook pages */
#calendar-widget {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 1000;
    display: none;
}

#calendar-widget.visible {
    display: block;
}

@media (max-width: 768px) {
    #calendar-widget {
        right: 10px;
        top: 130px;
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 600px) {
    body {
        padding: 10px;
        padding-top: 4rem;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.7em;
    }

    h3 {
        font-size: 1.3em;
    }
}