/*
Theme Name: Aquaeduca Ocean
Theme URI: https://aqua.normalno.org/
Author: Aquaeduca
Author URI: https://aqua.normalno.org/
Description: Svježa, obiteljska WordPress tema za Aquaeduca — centar za plivanje beba i mališana. Deep ocean blue paleta, Nunito + Open Sans tipografija, full-width hero slider i sticky navigacija.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aquaeduca-ocean
Tags: education, family, blue, custom-header, full-width-template, sticky-post, responsive
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
    --ocean-deep: #0077B6;
    --ocean-darker: #023E73;
    --sky: #90E0EF;
    --sky-light: #CAF0F8;
    --gold: #FFC300;
    --gold-dark: #E0A800;
    --white: #ffffff;
    --ink: #14323f;
    --muted: #5b7280;
    --shadow-sm: 0 4px 14px rgba(2, 62, 115, 0.08);
    --shadow-md: 0 12px 34px rgba(2, 62, 115, 0.14);
    --radius: 18px;
    --maxw: 1180px;
    --header-h: 78px;
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Open Sans", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Nunito", system-ui, sans-serif;
    color: var(--ocean-darker);
    line-height: 1.15;
    margin: 0 0 .5em;
    font-weight: 800;
}

a { color: var(--ocean-deep); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ocean-darker); }

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

p { margin: 0 0 1.1em; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 22px;
}

.section { padding: 84px 0; }
.section--tint { background: var(--sky-light); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section__head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--ocean-deep);
    margin-bottom: 12px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 999px;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary { background: var(--gold); color: var(--ocean-darker); box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--ocean-darker); }
.btn--ghost { background: transparent; border-color: var(--white); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ocean-deep); }
.btn--ocean { background: var(--ocean-deep); color: #fff; }
.btn--ocean:hover { background: var(--ocean-darker); color: #fff; transform: translateY(-3px); }

/* =========================================================
   Header / navigation
   ========================================================= */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 999;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-transparent { background: transparent; }
.site-header.is-solid { background: var(--white); box-shadow: var(--shadow-sm); }

/* Push fixed header below the WP admin bar */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-brand { display: flex; align-items: center; gap: 12px; }
.site-brand img { max-height: 46px; width: auto; }
.site-brand .brand-text {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--ocean-darker);
    line-height: 1;
}
.is-transparent .site-brand .brand-text { color: #fff; }

.main-nav > ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; align-items: center; }
.main-nav li { position: relative; }
.main-nav a {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    color: var(--ocean-darker);
    font-size: .98rem;
    padding: 6px 0;
    position: relative;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 3px;
    background: var(--gold);
    border-radius: 3px;
    transition: width .25s ease;
}
.main-nav a:hover::after { width: 100%; }
.is-transparent .main-nav a { color: #fff; }

/* Parent items with children: caret indicator */
.main-nav .menu-item-has-children > a { padding-right: 16px; }
.main-nav .menu-item-has-children > a::before {
    content: "";
    position: absolute;
    right: 0; top: 50%;
    width: 6px; height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
}

/* Dropdown sub-menus (desktop) */
.main-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: 100%; left: 0;
    min-width: 248px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 60;
}
.main-nav .menu-item-has-children:hover > .sub-menu,
.main-nav .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .sub-menu a {
    display: block;
    white-space: nowrap;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ocean-darker);
    font-weight: 600;
}
.main-nav .sub-menu a:hover { background: var(--sky-light); color: var(--ocean-darker); }
.main-nav .sub-menu a::after { display: none; }
/* Keep dropdown links readable even when header is transparent */
.is-transparent .main-nav .sub-menu a { color: var(--ocean-darker); }

.header-right { display: flex; align-items: center; gap: 24px; flex-wrap: nowrap; }
.main-nav { min-width: 0; }
.header-cta { white-space: nowrap; flex-shrink: 0; }
.nav-cta { margin-left: 6px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 26px; height: 3px; border-radius: 3px;
    background: var(--ocean-darker);
    transition: transform .3s ease, opacity .3s ease;
}
.is-transparent .nav-toggle span { background: #fff; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================
   Hero slider
   ========================================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 620px;
    overflow: hidden;
}
.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.1s ease, transform 6s ease;
    background-size: cover;
    background-position: center;
}
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero__slide::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(2,62,115,.35) 0%, rgba(2,62,115,.72) 100%);
}
.hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    max-width: 720px;
}
.hero__content h1 {
    color: #fff;
    font-size: clamp(2.1rem, 6vw, 4rem);
    margin-bottom: 18px;
    text-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.hero__content .hero__lead { font-size: clamp(1rem, 2.4vw, 1.3rem); margin-bottom: 30px; max-width: 560px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__dots {
    position: absolute;
    bottom: 34px; left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex; gap: 12px;
}
.hero__dots button {
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: background .25s ease;
}
.hero__dots button.is-active { background: var(--gold); border-color: var(--gold); }

.hero__arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 3;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .25s ease;
}
.hero__arrow:hover { background: rgba(255,255,255,.34); }
.hero__arrow--prev { left: 22px; }
.hero__arrow--next { right: 22px; }

/* =========================================================
   About / features
   ========================================================= */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 38px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(2,62,115,.06);
    transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.feature-card .icon {
    width: 76px; height: 76px;
    margin: 0 auto 20px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky) 0%, var(--ocean-deep) 100%);
    color: #fff;
}
.feature-card .icon svg { width: 38px; height: 38px; }
.feature-card h3 { font-size: 1.25rem; }
.feature-card p { color: var(--muted); margin: 0; }

/* =========================================================
   Programs
   ========================================================= */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.program-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.program-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.program-card__media { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.program-card__body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.program-card__badge {
    align-self: flex-start;
    background: var(--sky-light);
    color: var(--ocean-deep);
    font-weight: 700;
    font-size: .78rem;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
    font-family: "Nunito", sans-serif;
}
.program-card__body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.program-card__body p { color: var(--muted); flex: 1; }
.program-card__price { font-family: "Nunito", sans-serif; font-weight: 800; color: var(--ocean-deep); font-size: 1.1rem; margin-bottom: 16px; }

/* =========================================================
   CTA banner
   ========================================================= */
.cta-banner {
    position: relative;
    background: linear-gradient(120deg, var(--ocean-deep) 0%, var(--ocean-darker) 100%);
    color: #fff;
    text-align: center;
    overflow: hidden;
}
.cta-banner::before {
    content: "";
    position: absolute; inset: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><circle cx="30" cy="30" r="2" fill="white" opacity="0.12"/></svg>');
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-banner p { font-size: 1.15rem; opacity: .92; max-width: 620px; margin: 0 auto 28px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--ocean-darker); color: #d6e8f3; padding: 64px 0 28px; }
.site-footer a { color: #d6e8f3; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-grid h4 { color: #fff; font-size: 1.1rem; margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-brand p { opacity: .8; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.1);
    transition: background .25s ease, transform .25s ease;
}
.footer-social a:hover { background: var(--gold); transform: translateY(-3px); }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 22px;
    text-align: center;
    font-size: .9rem;
    opacity: .8;
}

/* =========================================================
   Generic page / post content
   ========================================================= */
.page-hero {
    margin-top: 0;
    padding: calc(var(--header-h) + 70px) 0 70px;
    background: linear-gradient(120deg, var(--ocean-deep) 0%, var(--ocean-darker) 100%);
    color: #fff;
    text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); }
.content-area { padding: 70px 0; }
.entry { max-width: 800px; margin: 0 auto; }
.entry img { border-radius: var(--radius); margin: 1.5em 0; }
.entry h2, .entry h3 { margin-top: 1.4em; }
.post-meta { color: var(--muted); font-size: .92rem; margin-bottom: 1.6em; }

.error-404 { text-align: center; padding: calc(var(--header-h) + 90px) 0 100px; }
.error-404 .code { font-family: "Nunito", sans-serif; font-weight: 800; font-size: clamp(5rem, 18vw, 11rem); color: var(--sky); line-height: 1; }

/* =========================================================
   WordPress galleries (classic [gallery] shortcode)
   Respects gallery-columns-N from media settings.
   ========================================================= */
.gallery {
    display: grid;
    gap: 14px;
    margin: 1.8em 0 !important;
}
.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }
.gallery-item { margin: 0 !important; width: auto !important; }
.gallery-icon { margin: 0; }
.gallery-icon a {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.gallery-icon img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 0 !important;
    cursor: zoom-in;
    transition: transform .4s ease, filter .3s ease;
}
.gallery-icon a:hover img { transform: scale(1.07); filter: brightness(1.05); }
.gallery-caption { font-size: .82rem; color: var(--muted); padding-top: 6px; }

@media (max-width: 980px) {
    .gallery-columns-5, .gallery-columns-6, .gallery-columns-7,
    .gallery-columns-8, .gallery-columns-9 { grid-template-columns: repeat(3, 1fr); }
    .gallery-columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .gallery { gap: 10px; }
    .gallery-columns-3, .gallery-columns-4, .gallery-columns-5,
    .gallery-columns-6, .gallery-columns-7, .gallery-columns-8,
    .gallery-columns-9 { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Lightbox
   ========================================================= */
.aqua-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 26, 46, .92);
    backdrop-filter: blur(6px);
    padding: 40px 16px;
}
.aqua-lightbox.is-open { display: flex; animation: aquaLbFade .25s ease; }
@keyframes aquaLbFade { from { opacity: 0; } to { opacity: 1; } }
.aqua-lb__stage { margin: 0; max-width: 92vw; max-height: 86vh; text-align: center; }
.aqua-lb__img {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    animation: aquaLbZoom .3s ease;
}
@keyframes aquaLbZoom { from { transform: scale(.94); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.aqua-lb__cap { color: #cfe9f6; font-size: .95rem; margin-top: 14px; }
.aqua-lb__count { position: absolute; top: 22px; left: 26px; color: #cfe9f6; font-family: "Nunito", sans-serif; font-weight: 700; font-size: .95rem; }
.aqua-lb__close, .aqua-lb__nav {
    position: absolute;
    background: rgba(255,255,255,.14);
    color: #fff;
    border: 0;
    cursor: pointer;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background .2s ease, transform .2s ease;
}
.aqua-lb__close { top: 18px; right: 22px; width: 48px; height: 48px; font-size: 2rem; line-height: 1; }
.aqua-lb__nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2.2rem; line-height: 1; }
.aqua-lb__prev { left: 18px; }
.aqua-lb__next { right: 18px; }
.aqua-lb__close:hover, .aqua-lb__nav:hover { background: var(--gold); color: var(--ocean-darker); }
.aqua-lb__nav:hover { transform: translateY(-50%) scale(1.06); }
@media (max-width: 600px) {
    .aqua-lb__nav { width: 44px; height: 44px; font-size: 1.7rem; }
    .aqua-lb__prev { left: 8px; } .aqua-lb__next { right: 8px; }
}

/* WP core alignment helpers */
.aligncenter { margin-inline: auto; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
    .features, .programs { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .admin-bar .main-nav { top: calc(var(--header-h) + 46px); }
    .main-nav.is-open { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 12px 22px 24px; }
    .main-nav li { width: 100%; border-bottom: 1px solid rgba(2,62,115,.08); }
    .main-nav a { display: block; padding: 14px 0; color: var(--ocean-darker); }
    .is-transparent .main-nav a { color: var(--ocean-darker); }
    .header-right { gap: 12px; }
    .header-cta { padding: 10px 16px; font-size: .9rem; }

    /* Sub-menu becomes a static, indented list on mobile */
    .main-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0 0 6px 16px;
        min-width: 0;
    }
    .main-nav .sub-menu li { border-bottom: 0; }
    .main-nav .sub-menu a { padding: 10px 0; font-weight: 600; }
    .main-nav .menu-item-has-children > a::before { display: none; }

    .section { padding: 60px 0; }
    .features, .programs { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero { min-height: 560px; }
    .hero__arrow { display: none; }
}
