/* =============================================================================
   Boka Cruises — site.css (Faza 9.3)
   Global theme: reset, base typography, layout primitives, components.
   Učitava se POSLE brand.css (tokens). Coexistira sa tours-archive.css i
   tour-detail.css iz Faze 8.5 (oni imaju svoj td-/tr- namespace).
   ============================================================================= */

/* =============================================================================
   1. Modern reset (Josh Comeau inspired)
   ============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}
* {
    margin: 0;
}
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--bc-header-h, 72px);
}
body {
    font-family: var(--bc-font-body);
    font-size: var(--bc-fs-base);
    line-height: var(--bc-lh-normal);
    color: var(--bc-text);
    background: var(--bc-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}
input, button, textarea, select {
    font: inherit;
    color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
a {
    color: var(--bc-secondary);
    text-decoration: none;
    transition: color var(--bc-transition-fast);
}
a:hover {
    color: var(--bc-primary);
}
ul, ol {
    padding-left: 1.25rem;
}
table {
    border-collapse: collapse;
    width: 100%;
}

/* =============================================================================
   2. Typography hierarchy
   ============================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--bc-font-display);
    color: var(--bc-text);
    font-weight: 800;
    line-height: var(--bc-lh-tight);
    letter-spacing: -0.02em;
}
h1 {
    font-size: var(--bc-fs-4xl);
    margin-bottom: var(--bc-space-4);
}
h2 {
    font-size: var(--bc-fs-3xl);
    margin-bottom: var(--bc-space-4);
    line-height: var(--bc-lh-snug);
}
h3 {
    font-size: var(--bc-fs-2xl);
    margin-bottom: var(--bc-space-3);
    line-height: var(--bc-lh-snug);
}
h4 {
    font-size: var(--bc-fs-xl);
    margin-bottom: var(--bc-space-2);
    font-weight: 700;
    line-height: var(--bc-lh-snug);
}
h5 {
    font-size: var(--bc-fs-lg);
    margin-bottom: var(--bc-space-2);
    font-weight: 700;
}
h6 {
    font-size: var(--bc-fs-base);
    margin-bottom: var(--bc-space-2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
p {
    margin-bottom: var(--bc-space-4);
}
p:last-child {
    margin-bottom: 0;
}
.lead {
    font-size: var(--bc-fs-lg);
    line-height: var(--bc-lh-relaxed);
    color: var(--bc-text-muted);
    font-weight: 400;
}
small, .text-sm {
    font-size: var(--bc-fs-sm);
}
.text-xs    { font-size: var(--bc-fs-xs); }
.text-md    { font-size: var(--bc-fs-md); }
.text-lg    { font-size: var(--bc-fs-lg); }
.text-xl    { font-size: var(--bc-fs-xl); }
.text-muted { color: var(--bc-text-muted); }
.text-faint { color: var(--bc-text-faint); }
.text-white { color: #fff; }
.text-primary    { color: var(--bc-primary); }
.text-secondary  { color: var(--bc-secondary); }
.text-coral      { color: var(--bc-coral); }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* Eyebrow — uppercase label nad headinge */
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    font-size: var(--bc-fs-sm);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--bc-primary);
    margin-bottom: var(--bc-space-2);
}

/* Lead headline (hero, section intro) */
.section-headline {
    text-align: center;
    margin-bottom: var(--bc-space-7);
    max-width: 680px;
    margin-inline: auto;
}
.section-headline h2 {
    margin-bottom: var(--bc-space-3);
}

/* =============================================================================
   3. Layout primitives
   ============================================================================= */
.container {
    width: 100%;
    max-width: var(--bc-container-base);
    margin: 0 auto;
    padding: 0 var(--bc-space-4);
}
.container-narrow { max-width: var(--bc-container-narrow); }
.container-wide   { max-width: var(--bc-container-wide); }

@media (min-width: 640px)  { .container { padding: 0 var(--bc-space-5); } }
@media (min-width: 1024px) { .container { padding: 0 var(--bc-space-6); } }

/* Sections */
.section {
    padding: var(--bc-section-y) 0;
}
.section--sm { padding: var(--bc-section-y-sm) 0; }
.section--sand    { background: var(--bc-sand-soft); }
.section--bg-soft { background: var(--bc-bg-soft); }
.section--sea     { background: var(--bc-gradient-sea); color: #fff; }
.section--sea h1, .section--sea h2, .section--sea h3, .section--sea h4 { color: #fff; }
.section--sea .eyebrow { color: var(--bc-primary-soft); }
.section--sea .lead    { color: rgba(255, 255, 255, 0.85); }

/* Grid utilities */
.grid {
    display: grid;
    gap: var(--bc-space-5);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2-1 { grid-template-columns: 2fr 1fr; gap: var(--bc-space-7); }
.grid--1-2 { grid-template-columns: 1fr 2fr; gap: var(--bc-space-7); }

@media (max-width: 1023px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--2-1, .grid--1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
    .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* Flex helpers */
.flex      { display: flex; }
.flex-col  { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: var(--bc-space-1); }
.gap-2 { gap: var(--bc-space-2); }
.gap-3 { gap: var(--bc-space-3); }
.gap-4 { gap: var(--bc-space-4); }
.gap-5 { gap: var(--bc-space-5); }
.gap-6 { gap: var(--bc-space-6); }

/* Stack — vertical rhythm */
.stack-1 > * + * { margin-top: var(--bc-space-1); }
.stack-2 > * + * { margin-top: var(--bc-space-2); }
.stack-3 > * + * { margin-top: var(--bc-space-3); }
.stack-4 > * + * { margin-top: var(--bc-space-4); }
.stack-5 > * + * { margin-top: var(--bc-space-5); }
.stack-6 > * + * { margin-top: var(--bc-space-6); }

/* Visibility utilities */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.hide-mobile  { display: initial; }
.hide-desktop { display: none; }
@media (max-width: 767.98px) {
    .hide-mobile  { display: none; }
    .hide-desktop { display: initial; }
}

/* =============================================================================
   4. Buttons
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bc-space-2);
    padding: 0.75rem 1.5rem;
    border-radius: var(--bc-radius-pill);
    font-family: var(--bc-font-display);
    font-size: var(--bc-fs-base);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--bc-transition-base),
                color var(--bc-transition-base),
                border-color var(--bc-transition-base),
                box-shadow var(--bc-transition-base),
                transform var(--bc-transition-fast);
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn--sm { padding: 0.5rem 1rem; font-size: var(--bc-fs-sm); }
.btn--lg { padding: 1rem 2rem; font-size: var(--bc-fs-md); }
.btn--block { width: 100%; }

.btn--primary {
    background: var(--bc-primary);
    color: #fff;
    box-shadow: var(--bc-shadow-1);
}
.btn--primary:hover {
    background: var(--bc-primary-dk);
    color: #fff;
    box-shadow: var(--bc-shadow-2);
}

.btn--secondary {
    background: var(--bc-secondary);
    color: #fff;
}
.btn--secondary:hover {
    background: var(--bc-secondary-dk);
    color: #fff;
    box-shadow: var(--bc-shadow-2);
}

.btn--outline {
    background: transparent;
    color: var(--bc-secondary);
    border-color: var(--bc-secondary);
}
.btn--outline:hover {
    background: var(--bc-secondary);
    color: #fff;
}

.btn--outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
}
.btn--outline-white:hover {
    background: #fff;
    color: var(--bc-secondary);
    border-color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--bc-text);
}
.btn--ghost:hover {
    background: var(--bc-bg-soft);
    color: var(--bc-primary);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

/* =============================================================================
   5. Cards
   ============================================================================= */
.card {
    background: var(--bc-bg);
    border-radius: var(--bc-radius-lg);
    border: 1px solid var(--bc-border);
    overflow: hidden;
    transition: transform var(--bc-transition-base),
                box-shadow var(--bc-transition-base),
                border-color var(--bc-transition-base);
}
.card--hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--bc-shadow-3);
    border-color: var(--bc-primary-soft);
}
.card__img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}
.card__img-wrap {
    position: relative;
    overflow: hidden;
}
.card__body {
    padding: var(--bc-space-5);
}
.card__title {
    font-size: var(--bc-fs-xl);
    margin-bottom: var(--bc-space-2);
    color: var(--bc-secondary);
}
.card__text {
    color: var(--bc-text-muted);
    line-height: var(--bc-lh-relaxed);
}

/* =============================================================================
   6. Badges & pills (reuse .tr-pill iz tours-archive.css ako je tu, ova varijanta sa bc- prefiksom)
   ============================================================================= */
.bc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.3em 0.75em;
    border-radius: var(--bc-radius-pill);
    background: var(--bc-bg-soft);
    color: var(--bc-text);
    font-size: var(--bc-fs-sm);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.bc-badge--primary   { background: var(--bc-primary-soft); color: var(--bc-primary-dk); }
.bc-badge--secondary { background: var(--bc-secondary-soft); color: var(--bc-secondary); }
.bc-badge--sand      { background: var(--bc-sand); color: var(--bc-text); }
.bc-badge--success   { background: var(--bc-success-soft); color: var(--bc-success); }
.bc-badge--warning   { background: var(--bc-warning-soft); color: var(--bc-warning); }
.bc-badge--danger    { background: var(--bc-danger-soft); color: var(--bc-danger); }
.bc-badge--coral     { background: var(--bc-coral-soft); color: var(--bc-coral); }
.bc-badge--solid     { background: var(--bc-secondary); color: #fff; }
.bc-badge i { font-size: 0.95em; line-height: 1; }

/* =============================================================================
   7. Forms
   ============================================================================= */
.form-group {
    margin-bottom: var(--bc-space-4);
}
.form-label {
    display: block;
    margin-bottom: var(--bc-space-2);
    font-weight: 600;
    color: var(--bc-text);
    font-size: var(--bc-fs-sm);
}
.form-label .required { color: var(--bc-coral); }

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--bc-border);
    border-radius: var(--bc-radius-md);
    background: var(--bc-bg);
    font-family: var(--bc-font-body);
    font-size: var(--bc-fs-base);
    color: var(--bc-text);
    transition: border-color var(--bc-transition-fast),
                box-shadow var(--bc-transition-fast);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: 0;
    border-color: var(--bc-primary);
    box-shadow: var(--bc-shadow-glow);
}
.form-textarea {
    min-height: 8rem;
    resize: vertical;
}
.form-help {
    margin-top: var(--bc-space-1);
    font-size: var(--bc-fs-xs);
    color: var(--bc-text-muted);
}
.form-error {
    margin-top: var(--bc-space-1);
    font-size: var(--bc-fs-xs);
    color: var(--bc-danger);
}
.form-input--error {
    border-color: var(--bc-danger);
}

.form-checkbox,
.form-radio {
    display: inline-flex;
    align-items: center;
    gap: var(--bc-space-2);
    cursor: pointer;
}
.form-checkbox input,
.form-radio input {
    width: 20px;
    height: 20px;
    accent-color: var(--bc-primary);
}

/* =============================================================================
   8. Alerts
   ============================================================================= */
.alert {
    padding: var(--bc-space-4);
    border-radius: var(--bc-radius-md);
    border: 1px solid transparent;
    display: flex;
    gap: var(--bc-space-3);
    align-items: flex-start;
}
.alert i { font-size: 1.25rem; flex-shrink: 0; }
.alert--success { background: var(--bc-success-soft); color: #0f5132; border-color: #badbcc; }
.alert--warning { background: var(--bc-warning-soft); color: #664d03; border-color: #ffecb5; }
.alert--danger  { background: var(--bc-danger-soft);  color: #842029; border-color: #f5c2c7; }
.alert--info    { background: var(--bc-info-soft);    color: #084298; border-color: #b6d4fe; }

/* =============================================================================
   9. Accordion (FAQ)
   ============================================================================= */
.accordion {
    border-top: 1px solid var(--bc-border);
}
.accordion__item {
    border-bottom: 1px solid var(--bc-border);
}
.accordion__trigger {
    width: 100%;
    text-align: left;
    padding: var(--bc-space-4) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bc-space-3);
    font-family: var(--bc-font-display);
    font-size: var(--bc-fs-lg);
    font-weight: 700;
    color: var(--bc-secondary);
    cursor: pointer;
    transition: color var(--bc-transition-fast);
}
.accordion__trigger:hover { color: var(--bc-primary); }
.accordion__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bc-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--bc-transition-fast),
                transform var(--bc-transition-base);
}
.accordion__item[open] .accordion__icon {
    background: var(--bc-primary);
    color: #fff;
    transform: rotate(45deg);
}
.accordion__content {
    padding: 0 0 var(--bc-space-5);
    color: var(--bc-text-muted);
    line-height: var(--bc-lh-relaxed);
}
.accordion__content > :last-child { margin-bottom: 0; }

/* details/summary native polish */
details.accordion__item summary {
    list-style: none;
}
details.accordion__item summary::-webkit-details-marker {
    display: none;
}

/* =============================================================================
   10. Decorative — divider, ornaments
   ============================================================================= */
.divider {
    height: 1px;
    background: var(--bc-divider);
    margin: var(--bc-space-6) 0;
    border: 0;
}
.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bc-space-3);
    padding: var(--bc-space-3) 0;
    color: var(--bc-primary);
}
.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    max-width: 60px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--bc-primary), transparent);
}

/* =============================================================================
   11. Misc helpers
   ============================================================================= */
.shadow-1 { box-shadow: var(--bc-shadow-1); }
.shadow-2 { box-shadow: var(--bc-shadow-2); }
.shadow-3 { box-shadow: var(--bc-shadow-3); }
.shadow-4 { box-shadow: var(--bc-shadow-4); }

.rounded-sm  { border-radius: var(--bc-radius-sm); }
.rounded-md  { border-radius: var(--bc-radius-md); }
.rounded-lg  { border-radius: var(--bc-radius-lg); }
.rounded-xl  { border-radius: var(--bc-radius-xl); }
.rounded-2xl { border-radius: var(--bc-radius-2xl); }
.rounded-pill { border-radius: var(--bc-radius-pill); }
.rounded-circle { border-radius: 50%; }

.bg-primary    { background: var(--bc-primary);   color: #fff; }
.bg-secondary  { background: var(--bc-secondary); color: #fff; }
.bg-sand       { background: var(--bc-sand); }
.bg-soft       { background: var(--bc-bg-soft); }
.bg-white      { background: #fff; }
.bg-sunset     { background: var(--bc-gradient-sunset); color: #fff; }
.bg-sea        { background: var(--bc-gradient-sea); color: #fff; }
.bg-hero       { background: var(--bc-gradient-hero); color: #fff; }

/* Image overlays (hero) */
.bg-overlay {
    position: relative;
}
.bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bc-bg-overlay);
    pointer-events: none;
}
.bg-overlay > * { position: relative; z-index: 1; }

/* Skip to content (a11y) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: var(--bc-space-3) var(--bc-space-4);
    background: var(--bc-secondary);
    color: #fff;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 var(--bc-radius-md) 0;
    font-weight: 700;
}
.skip-link:focus { top: 0; }

/* Reveal animations (GSAP fallback — works also without JS) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--bc-ease-out),
                transform 0.6s var(--bc-ease-out);
}
.reveal.is-visible,
.no-js .reveal {
    opacity: 1;
    transform: translateY(0);
}
/* #112 (2026-05-27) — Safety net: ako JS ne uspije da pokrene GSAP
   ScrollTrigger (slow CDN, JS error, content-blocker), animation timer
   fallback osigurava da nakon 1.5s svi .reveal elementi postanu vidljivi.
   Prevents "tekst skriven iza pozadine" bug na mobile/tablet kad GSAP
   ScrollTrigger ne triggeruje pravilno (Android Chrome edge case).
   Animation tehnika: 0% (start) i 100% (end) imaju isto pravilo, što
   znači da animation samo služi kao tajmer — bez vizuelnog efekta.
   Fallback se gasi čim GSAP doda `is-visible` klasu (specifičnost wins). */
@keyframes revealFallback {
    to { opacity: 1; transform: translateY(0); }
}
.reveal:not(.is-visible) {
    animation: revealFallback 0.6s var(--bc-ease-out) 1.5s forwards;
}
@media (prefers-reduced-motion: reduce) {
    .reveal:not(.is-visible) {
        animation-delay: 0.1s;
    }
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Focus-visible (a11y) */
.btn:focus-visible,
.form-input:focus-visible,
.form-textarea:focus-visible,
.form-select:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--bc-primary);
    outline-offset: 2px;
}
