/* =================================================
   custom.css — janektanel
   Värvid: #3d003d (tumepurpur) | #00a651 (roheline)
   ================================================= */


/* -------------------------------------------------
   1. RESET JA ALUSSTIILID
   ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body, #page, .site {
	margin: 0;
	padding: 0;
	background: #3d003d;
	color: #fff;
}

body {
	font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
}

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

a { color: #00a651; text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

/* Üldine konteiner */
.header-inner,
.tm-container,
.news-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}


/* -------------------------------------------------
   2. LUGEMISE EDENEMISRIBA
   ------------------------------------------------- */
.reading-progress-wrap {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	height: 4px;
	background: rgba(255,255,255,.1);
	z-index: 99999;
}

#reading-progress {
	height: 4px;
	width: 0%;
	background: #00a651;
	transition: width .1s linear;
}


/* =================================================
   HEADER — ÜLDISED + MOBIIL
   ================================================= */

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;   /* oluline */
    width: 100%;
    padding: 14px 20px;
    gap: 15px;
}

.site-branding {
    flex-shrink: 0;
}

.main-navigation {
    display: flex;
    align-items: center;
    margin-left: auto;   /* surub burgeri paremale */
}

/* Burger nupp */
.burger-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 48px;
    height: 48px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    z-index: 1100;
}

@media (max-width: 768px) {
    .burger-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2a002a;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.7);
        border-top: 1px solid rgba(255,255,255,0.1);
        display: none;
        z-index: 1050;
    }

    .main-navigation.menu-open .nav-menu {
        display: flex;
    }

    .nav-menu a {
        padding: 16px 25px;
        font-size: 1.1rem;
    }
}

/* Logo pealkiri mobiilis pisut väiksemaks */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.25rem;
    }
}

/* -------------------------------------------------
   4. NAVIGATSIOON — DESKTOP
   ------------------------------------------------- */
.main-navigation { display: flex; align-items: center; }

.nav-menu {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	gap: 28px;
}

.nav-menu a {
	color: #fff;
	font-weight: 600;
	font-size: .95rem;
	padding-bottom: 3px;
	border-bottom: 2px solid transparent;
	transition: color .2s, border-color .2s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
	color: #00a651;
	border-bottom-color: #00a651;
}

/* Burger nupp — peidetud desktopis */
.burger-toggle { display: none; }


/* -------------------------------------------------
   5. BURGER MENÜÜ — MOBIIL (PARANDATUD)
   ------------------------------------------------- */
@media (max-width: 768px) {

    .burger-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        width: 48px;
        height: 48px;
        z-index: 1100;
    }

    .burger-line {
        display: block;
        width: 28px;
        height: 3px;
        background: #fff;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Burger → X animatsioon */
    .burger-toggle.is-active .burger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .burger-toggle.is-active .burger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    .burger-toggle.is-active .burger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Menüü ise */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2a002a;
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        border-top: 1px solid rgba(255,255,255,0.1);
        display: none;
        z-index: 1050;
    }

    .main-navigation.menu-open .nav-menu {
        display: flex;
    }

    .nav-menu a {
        display: block;
        padding: 14px 25px;
        font-size: 1.1rem;
        font-weight: 600;
        color: #fff;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-menu a:hover,
    .nav-menu .current-menu-item > a {
        background: rgba(0, 166, 81, 0.2);
        color: #00a651;
        padding-left: 30px;
    }
}


/* -------------------------------------------------
   6. HERO SLIDER
   ------------------------------------------------- */
.hero-section { width: 100%; overflow: hidden; }

.heroSwiper {
	width: 100%;
	height: 540px;
}

.hero-slide {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* Tume overlay teksti loetavuse tagamiseks */
.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		160deg,
		rgba(61,0,61,.55) 0%,
		rgba(0,0,0,.70) 100%
	);
}

.hero-content {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 0 24px;
	max-width: 780px;
	color: #fff;
}

.hero-title {
	font-size: clamp(1.8rem, 5vw, 3rem);
	font-weight: 800;
	margin: 0 0 16px;
	line-height: 1.15;
	text-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.hero-text {
	font-size: clamp(1rem, 2.5vw, 1.2rem);
	margin: 0 0 28px;
	opacity: .92;
	max-width: 620px;
	margin-inline: auto;
}

.btn-hero {
	display: inline-block;
	background: #00a651;
	color: #fff;
	font-weight: 700;
	padding: 13px 34px;
	border-radius: 6px;
	font-size: 1rem;
	transition: background .2s, transform .2s;
}
.btn-hero:hover { background: #008c44; transform: translateY(-2px); color: #fff; }

/* Swiper nupud ja pagination */
.heroSwiper .swiper-button-prev,
.heroSwiper .swiper-button-next {
	color: #fff;
	background: rgba(0,0,0,.35);
	width: 44px; height: 44px;
	border-radius: 50%;
	transition: background .2s;
}
.heroSwiper .swiper-button-prev:hover,
.heroSwiper .swiper-button-next:hover { background: rgba(0,166,81,.75); }
.heroSwiper .swiper-button-prev::after,
.heroSwiper .swiper-button-next::after { font-size: 15px; font-weight: 900; }

.hero-pagination .swiper-pagination-bullet { background: rgba(255,255,255,.5); opacity: 1; }
.hero-pagination .swiper-pagination-bullet-active { background: #00a651; }

@media (max-width: 768px) {
	.heroSwiper { height: 320px; }
	.heroSwiper .swiper-button-prev,
	.heroSwiper .swiper-button-next { display: none; }
}


/* -------------------------------------------------
   7. TEXT + MEDIA PLOKK
   Pilt vasakul, tekst paremal (nagu näidispildil)
   ------------------------------------------------- */
.section-text-media {
	padding: 80px 0;
	background: rgba(255,255,255,.04); /* kerge eristus hero sliderist */
}

.tm-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	gap: 60px;
	align-items: center;
}

/* Pilt — vasakul */
.tm-media {
	flex: 1;
	min-width: 0;
}

.tm-media img {
	width: 100%;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0,0,0,.4);
	background: rgba(255,255,255,.08); /* placeholder taust kuni pilt laeb */
}

/* Tekst — paremal */
.tm-text {
	flex: 1;
	min-width: 0;
}

.tm-heading {
	font-size: clamp(1.6rem, 3.5vw, 2.4rem);
	font-weight: 800;
	margin: 0 0 18px;
	line-height: 1.2;
	color: #fff;
}

.tm-body {
	font-size: 1.05rem;
	line-height: 1.75;
	color: rgba(255,255,255,.88);
}

/* Nimekirjad tekstis */
.tm-body ul,
.tm-body ol {
	padding-left: 1.4em;
	margin: 12px 0;
}

.tm-body li { margin-bottom: 6px; }

/* Mobiil: pilt üles, tekst alla */
@media (max-width: 768px) {
	.tm-container {
		flex-direction: column;
		gap: 28px;
	}
	.section-text-media { padding: 48px 0; }
}


/* -------------------------------------------------
   8. UUDISTE SWIPER SLIDER
   Layout: pealkiri vasakul + noolnupud paremal,
   valged kaardid, rohelised nupud — sarnane näidispildiga
   ------------------------------------------------- */
.section-news {
	padding: 60px 0 80px;
}

/* Päiserida: pealkiri + noolnupud ühel real */
.news-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 32px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(255,255,255,.12);
}

.section-heading {
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-weight: 800;
	margin: 0;
	color: #fff;
}

/* Noolnupud paremal */
.news-nav-buttons {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.news-prev,
.news-next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: #00a651;
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, transform .2s;
	/* padding-top pisut, et nool keskel oleks */
	padding: 0 0 2px;
}

.news-prev:hover,
.news-next:hover {
	background: #008c44;
	transform: scale(1.08);
}

/* Nupud hallidena kui slider alguses/lõpus */
.news-prev.swiper-button-disabled,
.news-next.swiper-button-disabled {
	background: rgba(255,255,255,.2);
	cursor: default;
	transform: none;
}

/* Ruum pagination täppide jaoks */
.newsSwiper { padding-bottom: 50px !important; }

/* ---- UUDISTE KAART ---- */
.news-card {
	background: #fff;
	color: #1a1a1a;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: 0 4px 20px rgba(0,0,0,.18);
	transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 40px rgba(0,0,0,.32);
}

/* Pilt */
.news-card__thumb-link {
	display: block;
	overflow: hidden;
	height: 220px;
	flex-shrink: 0;
}

.news-card__thumb {
	width: 100%;
	height: 220px;
	object-fit: cover;
	transition: transform .4s ease;
}

.news-card:hover .news-card__thumb { transform: scale(1.05); }

.news-card__thumb-placeholder {
	width: 100%;
	height: 220px;
	background: #e8e8e8;
}

/* Sisu */
.news-card__body {
	padding: 22px 22px 20px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

/* Pealkiri — roheline nagu näidispildil */
.news-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 12px;
	line-height: 1.35;
}

.news-card__title a {
	color: #00a651;
	text-decoration: none;
	transition: color .2s;
}

.news-card__title a:hover { color: #007a3d; }

/* Lühikirjeldus */
.news-card__excerpt {
	font-size: .9rem;
	color: #444;
	line-height: 1.6;
	margin: 0;
	flex-grow: 1;
	padding-bottom: 18px;
}

/* "Loe edasi" nupp */
.btn-read-more {
	display: inline-block;
	background: #00a651;
	color: #fff;
	font-size: .875rem;
	font-weight: 700;
	padding: 10px 22px;
	border-radius: 8px;
	align-self: flex-start;
	text-decoration: none;
	transition: background .2s, transform .15s;
}

.btn-read-more:hover {
	background: #008c44;
	color: #fff;
	transform: translateY(-1px);
}

/* Pagination täpid */
.news-dots {
	bottom: 0 !important;
}

.news-dots .swiper-pagination-bullet {
	background: rgba(255,255,255,.35);
	opacity: 1;
	width: 10px;
	height: 10px;
}

.news-dots .swiper-pagination-bullet-active {
	background: #00a651;
}

/* Mobiil */
@media (max-width: 640px) {
	.news-nav-buttons { display: none; } /* mobiilis näpuga libistamine piisab */
	.section-news { padding: 40px 0 60px; }
}


/* -------------------------------------------------
   9. FOOTER
   ------------------------------------------------- */
.site-footer {
	background: #2a002a;
	border-top: 1px solid rgba(255,255,255,.08);
	padding: 30px 20px;
	text-align: center;
	font-size: .875rem;
	color: rgba(255,255,255,.65);
}
.site-footer a { color: #00a651; }
.site-footer a:hover { color: #fff; }


/* -------------------------------------------------
   10. BLOGI / ARCHIVE LEHED
   ------------------------------------------------- */
.entry-title a { color: #fff; text-decoration: none; }
.entry-title a:hover { color: #00a651; }

.entry-meta, .entry-meta a,
.posted-on a, .byline a, .cat-links a { color: #00a651; }

.entry-content, .entry-summary,
.entry-content p { color: #fff; }

.entry-footer, .entry-footer a { color: rgba(255,255,255,.55); font-size: .85rem; }
.entry-footer a:hover { color: #00a651; }


/* -------------------------------------------------
   11. SINGLE POST — NAVIGATSIOON
   ------------------------------------------------- */
/* Peida WP vaikimisi nav, kasuta .fancy-post-nav asemel */
.post-navigation { display: none; }

.fancy-post-nav {
	display: block;
	margin-top: 60px;
	padding-top: 30px;
	border-top: 1px solid rgba(255,255,255,.1);
}
.fancy-post-nav .nav-links {
	display: flex;
	gap: 20px;
	justify-content: space-between;
}
.fancy-post-nav a { flex: 1; color: inherit; text-decoration: none; }
.post-nav-card {
	background: rgba(255,255,255,.95);
	border-radius: 12px;
	padding: 18px;
	transition: transform .25s, box-shadow .25s;
}
.post-nav-card__label {
	display: block;
	font-size: 11px; font-weight: 700;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 5px;
}
.post-nav-card__title {
	display: block;
	font-size: 15px; font-weight: 600;
	color: #333; line-height: 1.35;
}
.fancy-post-nav a:hover .post-nav-card {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0,0,0,.4);
}

@media (max-width: 768px) {
	.fancy-post-nav .nav-links { flex-direction: column; }
}
/* ==================== UUDISTE NAV NUPUD ==================== */
.news-nav-buttons {
    z-index: 10;
    pointer-events: auto;
}

.news-prev, .news-next {
    z-index: 10;
}

/* =================================================
   VIIMANE JA TUGEVAM BURGER PAREMALE FIX
   ================================================= */
@media (max-width: 768px) {

    .header-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 12px 20px !important;
    }

    .site-branding {
        flex-shrink: 0 !important;
    }

    .main-navigation {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
    }

    .burger-toggle {
        display: flex !important;
        margin-left: auto !important;
        order: 2 !important;
    }
}

