/*
Theme Name: Αρχάγγελος Μιχαήλ TKD
Theme URI: https://archaggelosmichailtkd.com
Author: TechZen
Author URI: https://techzen.gr
Description: Θέμα για τον Αθλητικό Σύλλογο Tae Kwon Do Αρχάγγελος Μιχαήλ. Σκούρο design με κόκκινο/χρυσό, sticky header, lightbox gallery, πλωτό κουμπί κλήσης. Το περιεχόμενο επεξεργάζεται στον block editor και τα στοιχεία επικοινωνίας στο Εμφάνιση → Προσαρμογή.
Version: 1.0.3
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: archangelos-tkd
*/

/* =====================================
   SITE CHROME (header, footer, loader, floating call, lightbox)
   Content/block styles live in assets/css/blocks.css
===================================== */

:root {
	--tkd-red: #d90429;
	--tkd-dark: #070707;
	--tkd-dark2: #111111;
	--tkd-gold: #d4af37;
	--tkd-gray: #999999;
	--tkd-header-h: 85px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	background: var(--tkd-dark);
	color: #fff;
	overflow-x: hidden;
}

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

a { color: #fff; text-decoration: none; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000;
	background: #fff; color: #000; padding: 12px 20px; left: 10px; top: 10px;
}

:focus-visible { outline: 2px solid var(--tkd-gold); outline-offset: 3px; }

/* =====================
   LOADER
===================== */
.loader {
	position: fixed; inset: 0; background: #000;
	display: flex; align-items: center; justify-content: center;
	z-index: 99999; transition: opacity .8s, visibility .8s;
	/* Safety net: hide even if JS never runs */
	animation: tkd-loader-failsafe 0s linear 5s forwards;
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; }
.loader-content img { width: 180px; display: block; margin: auto; animation: tkd-pulse 1.5s infinite alternate; }
.loader-line { width: 120px; height: 4px; background: var(--tkd-red); margin: 25px auto; border-radius: 10px; }
@keyframes tkd-pulse { from { transform: scale(.9); } to { transform: scale(1); } }
@keyframes tkd-loader-failsafe { to { opacity: 0; visibility: hidden; } }

/* =====================
   HEADER
===================== */
.site-header {
	position: absolute; top: 0; left: 0; width: 100%;
	padding: 20px 7%;
	display: flex; align-items: center; justify-content: space-between; gap: 30px;
	z-index: 1000; transition: background .4s, padding .4s;
}
.admin-bar .site-header { top: 32px; }
.site-header.scrolled {
	position: fixed;
	background: rgba(0, 0, 0, .9);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
/* Inner pages: header is solid & fixed from the start */
body:not(.tkd-transparent-header) { padding-top: var(--tkd-header-h); }

.site-logo a, .site-logo img { display: block; }
.site-logo img { width: 120px; height: auto; }
.site-logo .site-title { font-weight: 900; font-size: 20px; }

.menu-wrap { display: flex; align-items: center; gap: 30px; }

.main-menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.main-menu li { position: relative; }
.main-menu a { font-weight: bold; transition: color .3s; }
.main-menu a:hover,
.main-menu .current-menu-item > a { color: var(--tkd-red); }
.main-menu .current-menu-item > a[href*="#"] { color: #fff; }
.main-menu .current-menu-item > a[href*="#"]:hover { color: var(--tkd-red); }
/* simple dropdown support */
.main-menu .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 200px;
	background: #080808; padding: 15px 20px; flex-direction: column; gap: 12px;
	border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px;
}
.main-menu li:hover > .sub-menu,
.main-menu li:focus-within > .sub-menu { display: flex; }

.hamburger {
	display: none; background: none; border: 0; padding: 4px; cursor: pointer;
}
.hamburger span { display: block; width: 30px; height: 3px; background: #fff; margin: 6px 0; transition: .3s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* =====================
   SOCIAL ICONS
===================== */
.social-icons { display: flex; align-items: center; gap: 20px; }
.social-icons a {
	width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .1); border-radius: 50%; transition: .3s; overflow: hidden;
}
.social-icons a img { width: 28px; height: 28px; object-fit: contain; display: block; }
.social-icons a:hover { background: var(--tkd-red); transform: translateY(-5px); }

/* =====================
   MAIN / DEFAULT PAGE
===================== */
.site-main { display: block; }

.tkd-page {
	padding: 60px 25px 40px;
	background: #080808;
	min-height: 60vh;
}
.tkd-page .entry-title {
	font-size: 45px; margin: 25px 0 0; text-align: center; line-height: 1.2;
}
.tkd-page .entry-meta { text-align: center; color: var(--tkd-gray); margin-top: 10px; }
.tkd-page .entry-content {
	max-width: 850px; margin: 40px auto; padding: 0 20px;
	font-size: 18px; line-height: 1.9;
}
.tkd-page .back-home { text-align: center; margin: 20px 0 50px; }

.tkd-posts { max-width: 1100px; margin: 40px auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.tkd-post-card {
	background: #0b0b0b; border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px;
	overflow: hidden; transition: .4s;
}
.tkd-post-card:hover { transform: translateY(-6px); border-color: var(--tkd-red); }
.tkd-post-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.tkd-post-card .inner { padding: 25px; }
.tkd-post-card h2 { font-size: 22px; margin: 0 0 10px; }
.tkd-post-card p { color: #ccc; line-height: 1.7; margin: 0; }
.tkd-pagination { text-align: center; margin: 30px 0; }
.tkd-pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 3px; border-radius: 8px; background: #151515; }
.tkd-pagination .current { background: var(--tkd-red); }

.tkd-btn,
.back-button {
	display: inline-block; background: var(--tkd-red); color: #fff;
	padding: 15px 35px; border-radius: 50px; font-weight: bold; transition: .3s;
}
.tkd-btn:hover, .back-button:hover { background: #fff; color: #000; }

/* =====================
   FLOATING CALL
===================== */
.floating-actions {
	position: fixed; right: 25px; bottom: 25px; z-index: 5000;
	display: flex; flex-direction: column; align-items: stretch; gap: 10px;
}
.floating-call {
	display: block; text-align: center;
	background: var(--tkd-red); color: #fff;
	padding: 15px 25px; border-radius: 50px; font-weight: bold;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: .3s;
}
.floating-call:hover { background: #fff; color: #000; }

/* =====================
   FOOTER
===================== */
.site-footer {
	background: #050505; padding: 30px; text-align: center; color: var(--tkd-gray);
	border-top: 1px solid rgba(255, 255, 255, .1);
}
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--tkd-gold); transition: .3s; }
.site-footer a:hover { color: var(--tkd-red); }
.footer-menu ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* =====================
   LIGHTBOX
===================== */
.tkd-lightbox {
	display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .95);
	justify-content: center; align-items: center; z-index: 99999;
	opacity: 0; transition: opacity .3s;
}
.tkd-lightbox.open { display: flex; }
.tkd-lightbox.visible { opacity: 1; }
.tkd-lightbox img {
	max-width: 90%; max-height: 85%; border-radius: 15px;
	box-shadow: 0 0 40px rgba(0, 0, 0, .8); animation: tkd-zoom-in .3s ease;
}
.tkd-lightbox img.swap { animation: tkd-fade .25s ease; }
.tkd-lightbox button {
	position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
	font-family: inherit; line-height: 1; user-select: none; transition: color .3s;
}
.tkd-lightbox button:hover { color: var(--tkd-red); }
.tkd-lightbox .lb-close { top: 25px; right: 35px; font-size: 45px; z-index: 2; }
.tkd-lightbox .lb-prev,
.tkd-lightbox .lb-next { top: 50%; transform: translateY(-50%); font-size: 55px; padding: 20px; }
.tkd-lightbox .lb-prev { left: 30px; }
.tkd-lightbox .lb-next { right: 30px; }
.tkd-lightbox .lb-count { position: absolute; bottom: 25px; left: 0; right: 0; text-align: center; color: #aaa; font-size: 14px; }
@keyframes tkd-zoom-in { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tkd-fade { from { opacity: .2; } to { opacity: 1; } }

/* =====================
   SCROLL REVEAL
===================== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s, transform .8s; }
.reveal.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.loader-content img { animation: none; }
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1024px) {
	.site-header { padding: 20px 4%; }
	.tkd-posts { grid-template-columns: repeat(2, 1fr); padding: 0 20px; }
}

@media (max-width: 860px) {
	:root { --tkd-header-h: 75px; }
	.site-header { padding: 15px 25px; }
	.site-logo img { width: 90px; }
	.hamburger { display: block; }
	.menu-wrap {
		position: absolute; top: 100%; left: 0; width: 100%;
		background: #080808; flex-direction: column; gap: 25px; padding: 30px 0;
		transform: translateY(-10px); opacity: 0; visibility: hidden;
		transition: .4s; border-bottom: 1px solid rgba(255, 255, 255, .1);
	}
	.menu-wrap.active { transform: none; opacity: 1; visibility: visible; }
	.main-menu ul { flex-direction: column; align-items: center; gap: 25px; }
	.main-menu .sub-menu { position: static; display: flex; background: none; border: 0; padding: 12px 0 0; align-items: center; }
	.social-icons { gap: 15px; }
	.social-icons a { width: 40px; height: 40px; }
	.social-icons a img { width: 23px; height: 23px; }
	.floating-actions { right: 15px; bottom: 15px; gap: 8px; }
	.floating-call { padding: 13px 20px; font-size: 14px; }
	.site-footer { font-size: 13px; }
	.tkd-page .entry-title { font-size: 34px; }
	.tkd-page .entry-content { font-size: 17px; padding: 0; }
	.tkd-lightbox .lb-prev, .tkd-lightbox .lb-next { font-size: 40px; padding: 10px; }
	.tkd-lightbox .lb-prev { left: 5px; }
	.tkd-lightbox .lb-next { right: 5px; }
}

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
	.admin-bar .site-header.scrolled { top: 0; }
}

@media (max-width: 600px) {
	.tkd-posts { grid-template-columns: 1fr; }
}
