:root {
  --color-bg: #fbf4de;           /* base beige */
  --color-primary: #fbf4de;      /* primary */
  --color-primary-700: #fbf4de;  /* darker primary */
  --color-accent: #d87224;       /* accent */
  --color-text: #3f464b;
  --color-muted: #3f464b;
  --color-surface: #e2e2cf;      /* surface color for inner cards/boxes */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  backdrop-filter: saturate(120%) blur(8px);
  background: rgba(16,113,122,.55); /* primary tint */
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .28s ease, border-color .28s ease, backdrop-filter .28s ease;
}
.site-header.scrolled { background: rgba(16,113,122,.55); border-color: rgba(255,255,255,.06); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.header-inner > nav { flex: 1 1 auto; margin-left: 80px; }
.header-inner > .lang-switcher, .header-inner > .social-links { flex: 0 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-text); margin-left: -40px; }
.logo img { height: 52px; width: auto; display: block; }
.brand { font-weight: 700; letter-spacing: .5px; }

/* Typography */
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(36px, 5.6vw, 76px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 20px; }

.main-nav ul { list-style: none; display: flex; gap: 22px; align-items: center; padding: 0; margin: 0; }
.main-nav a { color: var(--color-text); text-decoration: none; opacity: .9; padding: 8px 6px; border-radius: 6px; position: relative; font-weight: 800; }
.main-nav a:hover, .main-nav a.active { opacity: 1; background: rgba(255,255,255,.06); }
.main-nav a::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 2px; background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Language switcher */
.lang-switcher { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; position: relative; z-index: 1100; }
.lang-switcher button { background: transparent; color: var(--color-text); border: 1px solid rgba(255,255,255,.25); padding: 6px 10px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; pointer-events: auto; }
.lang-switcher button.active { background: rgba(255,255,255,.12); }
.lang-switcher img { width: 18px; height: 12px; display: inline-block; border-radius: 2px; object-fit: cover; }

.nav-toggle { display: none; font-size: 22px; background: transparent; color: var(--color-text); border: 0; cursor: pointer; min-height: 44px; min-width: 44px; display: none; align-items: center; justify-content: center; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center; background-color: #000; overflow: hidden; }
/* slides layer for cross-fade */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slides .slide { position: absolute; inset: 0; background: center/cover no-repeat; opacity: 0; transition: opacity .8s ease; }
.hero-slides .slide.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.7)); z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-content.fade-in { opacity: 0; transform: translateY(10px); animation: fadeUp .7s ease .15s forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.handwriting { font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", "Comic Sans MS", cursive; font-weight: 400; font-size: clamp(32px, 5vw, 60px); margin: 0 0 10px; letter-spacing: .5px; line-height: 1.15; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.8), 0 4px 16px rgba(0,0,0,.6); }
.handwriting br { display: block; }
.tagline { margin: 0 0 26px; font-size: clamp(16px, 2.4vw, 22px); color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.8), 0 4px 16px rgba(0,0,0,.6); }

/* Better fit hero text on small/short screens */
@media (max-width: 600px) {
  .handwriting { font-size: clamp(26px, 7.2vw, 44px); line-height: 1.12; }
  .handwriting br { display: none; }
  .tagline { font-size: clamp(14px, 3.6vw, 18px); }
}
@media (max-height: 700px) {
  .handwriting { font-size: clamp(26px, 5vw, 48px); }
  .tagline { font-size: clamp(14px, 2.4vw, 18px); }
}

.cta-group { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; letter-spacing: .2px; box-shadow: 0 6px 16px rgba(0,0,0,.18); transition: transform .15s ease, background .15s, color .15s, box-shadow .15s ease; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; }
.btn::after { content: '→'; font-size: 18px; transition: transform .15s ease; }
.btn:hover::after { transform: translateX(4px); }
.btn-primary { background: rgba(16,113,122,.85); color: #fff; }
.btn-primary:hover { background: rgba(16,113,122,1); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.btn-outline { border: 2px solid var(--color-accent); color: var(--color-text); }
.btn-outline:hover { background: rgba(216,114,36,.15); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* Sections */
main { padding-top: 70px; }
.intro { padding: 72px 0; }
.intro h2 { margin: 0 0 12px; font-size: 28px; }
.intro p { margin: 0; color: var(--color-muted); }

/* Services section */
.services { padding: 10px 0 70px; }
.services-title { margin: 0 0 18px; }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.service { background: var(--color-surface); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px; box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.service h3 { margin: 0 0 10px; font-size: 20px; }
.service p { margin: 0; color: var(--color-muted); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* Experiences cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 34px 0 80px; }
.card { position: relative; overflow: hidden; border-radius: 18px; background: var(--color-surface); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.card-media { aspect-ratio: 16/10; background: #111 center/cover no-repeat; transition: transform .35s ease; }
.card-body { padding: 18px; backdrop-filter: saturate(120%); }
.card h3 { margin: 0 0 6px; font-size: 20px; }
.card p { margin: 0 0 12px; color: var(--color-muted); font-size: 14px; }
.card a.btn { margin-top: 4px; }
.card:hover .card-media { transform: scale(1.05); }
/* Show full image inside card when needed */
.card-media.contain { background-size: contain !important; background-color: rgba(255,255,255,.06); }

/* Gallery */
.gallery-title { font-size: 24px !important; margin-bottom: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item { aspect-ratio: 4/3; background: #111 center/cover no-repeat; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.08); cursor: zoom-in; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }

/* Testimonials */
.testimonials { padding: 40px 0 80px; }
.testimonials h2 { margin: 0 0 18px; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial { background: var(--color-surface); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 18px; box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.testimonial p { margin: 0 0 10px; color: var(--color-muted); }
.testimonial .author { font-weight: 600; opacity: .9; }
/* Hiking routes */
.routes { display: grid; gap: 16px; margin-top: 10px; }
.route { background: var(--color-surface); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 16px; box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.route h3 { margin: 0 0 8px; font-size: 18px; }
.route p { margin: 0; color: var(--color-muted); }
.route img {
  max-width: 100%;
  height: auto;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
}

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* Contact form */
.contact-form { max-width: 720px; margin: 0 auto; display: grid; gap: 16px; }
.contact-form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(16,113,122,.25);
  background: rgba(16,113,122,.08); color: var(--color-text);
}
.contact-form textarea { resize: none; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--color-accent); border-color: transparent; }
.form-note { color: var(--color-muted); font-size: 14px; }

/* Honeypot field (antispam) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Notices */
.notice { padding: 12px 14px; border-radius: 10px; margin: 14px 0; font-weight: 600; }
.notice.success { background: rgba(103,194,58,.15); color: #d7ffd0; border: 1px solid rgba(103,194,58,.35); }
.notice.error { background: rgba(216,114,36,.15); color: #ffe6cc; border: 1px solid rgba(216,114,36,.35); }

/* Language helpers */
html[lang='el'] .only-en { display: none !important; }
html[lang='en'] .only-el { display: none !important; }

/* Footer */
.site-footer { background: var(--color-bg); border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px; gap: 14px; }
.site-footer a { color: var(--color-muted); text-decoration: none; margin-left: 14px; font-weight: 500; text-shadow: 0 1px 2px rgba(224, 28, 28, 0.1); letter-spacing: 0.5px; font-size: 12px; }
.site-footer a:hover { color: var(--color-accent); }
.site-footer p { font-size: 14px; margin: 0; }

/* Social links */
.social-links, .net-links { display: inline-flex; gap: 10px; align-items: center; }
.social-links a, .net-links a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: none; color: var(--color-text); transition: background .15s ease, transform .15s ease; padding: 0; overflow: hidden; }
.social-links a:hover, .net-links a:hover { background: rgba(216,114,36,.18); transform: translateY(-1px); }
.social-links img, .net-links img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 10px; }
.social-links svg, .net-links svg { width: 100%; height: 100%; display: block; fill: currentColor; }

/* Header small socials */
.social-links.sm a, .net-links.sm a { width: 28px; height: 28px; border-radius: 8px; }
.lang-switcher + .social-links.sm, .lang-switcher + .net-links.sm { margin-left: 8px; }

/* Resume */
.resume { margin-top: 20px; }
.resume-name { margin: 6px 0 20px; font-size: 24px; opacity: .9; }
.resume-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.resume-photo img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.resume-items { display: grid; gap: 18px; }
.cert { display: grid; grid-template-columns: 70px 1fr 220px; gap: 14px; align-items: center; background: var(--color-surface); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px; }
.cert .year { color: var(--color-muted); font-weight: 600; }
.cert h4 { margin: 0 0 4px; font-size: 18px; }
.cert p { margin: 0; color: var(--color-muted); font-size: 14px; }
.cert .logo img { width: 80px; height: auto; object-fit: contain; display: block; }
.cert .logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-items: center; justify-items: center; }
.cert .logos img { max-width: 100%; height: auto; object-fit: contain; background: #fff0; display: block; }

@media (max-width: 900px) {
  .resume-grid { grid-template-columns: 1fr; }
  .cert { grid-template-columns: 60px 1fr; }
  .cert .logos { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
}

/* Responsive */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .header-inner > nav { margin-left: 0; }
  .main-nav { position: fixed; top: 70px; right: 0; width: 100%; max-width: 320px; height: calc(100vh - 70px); background: rgba(16,113,122,.96); transform: translateX(100%); transition: transform .25s ease; box-shadow: -6px 0 20px rgba(0,0,0,.3); }
  .main-nav { z-index: 1000; }
  .main-nav ul { flex-direction: column; align-items: flex-start; padding: 20px; gap: 8px; }
  .main-nav.open { transform: translateX(0); }
  
  /* Mobile footer improvements */
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; padding: 16px; }
  .site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
  .site-footer a { margin-left: 0; }
  
  /* Mobile services grid */
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  
  /* Mobile contact form */
  .contact-form .grid { grid-template-columns: 1fr; }
  .contact-form input, .contact-form textarea { font-size: 16px; } /* Prevents zoom on iOS */
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content { padding: 0 16px; }
  .cta-group { flex-direction: column; align-items: center; gap: 12px; }
  .btn { width: 100%; max-width: 280px; text-align: center; }
  
  /* Mobile header adjustments */
  .header-inner { height: 60px; }
  .logo { margin-left: 0; } /* Remove negative margin on mobile */
  .logo img { height: 40px; }
  .brand { font-size: 14px; }
  
  /* Mobile footer */
  .site-footer nav { flex-direction: column; gap: 8px; }
  .social-links { justify-content: center; }
}

/* Medium mobile devices */
@media (max-width: 768px) {
  .logo { margin-left: 0; } /* Remove negative margin on tablets too */
  .logo img { height: 45px; }
  .brand { font-size: 15px; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  /* Note: image-orientation is deprecated, will use JS fix if needed */
}

/* Lazy loading optimization */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Preload critical images */
.hero-slides .slide {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Responsive images */
@media (max-width: 768px) {
  .card-media {
    background-size: cover;
    background-position: center;
  }
}

/* Rendering performance: avoid rendering offscreen sections until needed */
@supports (content-visibility: auto) {
  .intro,
  .services,
  .cards,
  .gallery-grid,
  .testimonials,
  .resume,
  .equipment,
  .health,
  .routes { content-visibility: auto; contain-intrinsic-size: 600px; }
}

/* Lightweight lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 2000;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox:focus { outline: none; }

