/*
Theme Name:  ΙΑΚΕ Συνέδριο
Theme URI:   https://iake.example.gr
Author:      ΙΑΚΕ
Author URI:  https://iake.example.gr
Description: Επίσημο θέμα για το 12ο Διεθνές Επιστημονικό Συνέδριο ΙΑΚΕ. Υποστηρίζει Polylang, custom menus, widgets, και διγλωσσία μέσω Customizer.
Version:     1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iake
Tags:        conference, academic, multilingual, polylang, blue
*/

/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  --blue-deep:   #0a1f44;
  --blue-navy:   #0d2d6b;
  --blue-royal:  #1a4aad;
  --blue-bright: #2563eb;
  --blue-light:  #93c5fd;
  --blue-pale:   #dbeafe;
  --gold:        #c9a84c;
  --gold-light:  #f0d98e;
  --white:       #ffffff;
  --gray-light:  #f1f5f9;
  --gray-mid:    #94a3b8;
  --text-dark:   #1e293b;
  --text-body:   #334155;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--white); color: var(--text-body); line-height: 1.7; }

/* ─── TOP BAR ─── */
.topbar { background: var(--blue-deep); color: var(--blue-light); font-size: 0.78rem; letter-spacing: 0.04em; padding: 6px 0; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: var(--blue-light); text-decoration: none; }
.topbar a:hover { color: var(--gold-light); }

/* ─── POLYLANG LANGUAGE SWITCHER ─── */
.lang-switcher /* ul */ li { list-style: none; display: /* flex */ inline; gap: 6px; margin: 0; padding: 0; align-items: center; }
.lang-switcher /* ul */ li a {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 3px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; border: 1px solid rgba(147,197,253,0.3);
  color: var(--blue-light); text-decoration: none; transition: all 0.2s;
}
.lang-switcher ul li a:hover { background: rgba(255,255,255,0.08); border-color: var(--gold); color: var(--gold-light); }
.lang-switcher ul li.current-lang a { background: var(--blue-royal); color: #fff; border-color: var(--blue-bright); }

/* ─── HEADER / NAV ─── */
.site-header { background: var(--blue-navy); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 20px rgba(0,0,0,0.35); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; /* justify-content: space-between; */ height: 72px; }
.site-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-emblem {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--blue-royal), var(--blue-bright));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 900; color: #fff;
  box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(37,99,235,0.5); flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; letter-spacing: 0.01em; }
.logo-sub { font-size: 0.7rem; color: var(--blue-light); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
/* Custom logo in header */
.site-logo .custom-logo { max-height: 50px; width: auto; }

/* WordPress nav menu */
.main-nav { display: flex; align-items: center; margin-left: 20px; }
.main-nav ul { list-style: none; display: flex; gap: 4px; align-items: center; margin: 0; padding: 0; }
.main-nav ul li a { text-decoration: none; color: rgba(255,255,255,0.85); font-size: 0.88rem; font-weight: 500; letter-spacing: 0.03em; padding: 6px 14px; border-radius: 4px; transition: all 0.2s; position: relative; display: block; }
.main-nav ul li a:hover, .main-nav ul li.current-menu-item > a, .main-nav ul li.current-page-ancestor > a { color: #fff; background: rgba(255,255,255,0.1); }
.main-nav ul li.current-menu-item > a::after { content: ''; display: block; position: absolute; bottom: 2px; left: 14px; right: 14px; height: 2px; background: var(--gold); border-radius: 2px; }
/* "register" CSS class on menu item → gold button */
.main-nav ul li.register > a { background: var(--gold) !important; color: var(--blue-deep) !important; font-weight: 700; padding: 7px 18px; border-radius: 5px; box-shadow: 0 2px 10px rgba(201,168,76,0.4); }
.main-nav ul li.register > a:hover { background: var(--gold-light) !important; transform: translateY(-1px); }
/* Sub-menus */
.main-nav ul li { position: relative; }
.main-nav ul li ul { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: var(--blue-navy); border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); min-width: 200px; flex-direction: column; gap: 0; padding: 6px 0; z-index: 200; }
.main-nav ul li:hover > ul { display: flex; }
.main-nav ul li ul li a { padding: 9px 18px; border-radius: 0; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* ─── HAMBURGER ─── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: 0.3s; }

/* ─── HERO BANNER ─── */
.hero { position: relative; height: 540px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); animation: heroZoom 18s ease-in-out infinite alternate; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10,31,68,0.88) 0%, rgba(13,45,107,0.72) 50%, rgba(26,74,173,0.6) 100%); }
@keyframes heroZoom { from { transform: scale(1.05); } to { transform: scale(1.12); } }
.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: var(--white); clip-path: polygon(0 60px, 100% 0, 100% 80px, 0 80px); z-index: 3; }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 0 32px; max-width: 820px; animation: fadeUp 0.9s ease both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
.hero-badge { display: inline-block; background: var(--gold); color: var(--blue-deep); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; padding: 5px 18px; border-radius: 30px; margin-bottom: 20px; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 900; color: #fff; line-height: 1.18; margin-bottom: 14px; text-shadow: 0 2px 30px rgba(0,0,0,0.4); }
.hero h1 span { color: var(--gold-light); }
.hero-sub { color: rgba(255,255,255,0.82); font-size: 1.1rem; font-weight: 300; letter-spacing: 0.02em; margin-bottom: 32px; }
.hero-meta { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero-meta-item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.9); font-size: 0.9rem; }
.hero-meta-item svg { color: var(--gold); flex-shrink: 0; }
.hero-cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn-primary { background: var(--gold); color: var(--blue-deep); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.06em; padding: 14px 34px; border-radius: 6px; text-decoration: none; border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(201,168,76,0.45); transition: all 0.25s; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }

/* ─── MAIN LAYOUT ─── */
.site-main { max-width: 1200px; margin: 0 auto; padding: 64px 32px; display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }

/* ─── POST CARD ─── */
.post-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 30px rgba(13,45,107,0.1); border: 1px solid rgba(147,197,253,0.2); }
.post-thumbnail {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #ffffff;
}
.post-body { padding: 36px 40px 40px; }
.post-category { display: inline-block; background: var(--blue-pale); color: var(--blue-royal); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 12px; border-radius: 30px; margin-bottom: 16px; }
.post-title { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: var(--blue-deep); line-height: 1.25; margin-bottom: 20px; }
.post-divider { width: 50px; height: 3px; background: linear-gradient(90deg, var(--blue-royal), var(--blue-bright)); border-radius: 2px; margin: 20px 0; }
.post-excerpt { color: var(--text-body); font-size: 1rem; line-height: 1.8; margin-bottom: 14px; }
.post-excerpt p { margin-bottom: 12px; }
.post-excerpt strong { color: var(--blue-deep); }
.read-more { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-royal); font-weight: 600; font-size: 0.9rem; text-decoration: none; letter-spacing: 0.04em; transition: gap 0.2s; margin-top: 8px; }
.read-more:hover { gap: 14px; color: var(--blue-bright); }

/* About options buttons */
.about-options { display: grid; gap: 18px; margin: 18px 0 26px; }
.about-option-btn {
  display: block;
  text-align: center;
  padding: 22px 18px;
  border-radius: 18px;
  background: #e2f0f8;
  color: #2b356f;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  line-height: 1.25;
  box-shadow: 0 5px 14px rgba(23, 35, 74, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.about-option-btn:hover,
.about-option-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(23, 35, 74, 0.2);
  background: #e2f0f8;
  color: #232d62;
}

/* ─── SIDEBAR / WIDGETS ─── */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 3px 20px rgba(13,45,107,0.08); border: 1px solid rgba(147,197,253,0.2); }
.widget-title { background: var(--blue-navy); color: #fff; font-family: 'Playfair Display', serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.05em; padding: 14px 20px; margin: 0; display: flex; align-items: center; gap: 10px; }
.widget-title svg { color: var(--gold); }
.widget-content { padding: 20px; }
.speaker-list { display: flex; flex-direction: column; gap: 14px; }
.speaker-item { display: flex; align-items: center; gap: 12px; }
.speaker-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-royal), var(--blue-bright)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.95rem; flex-shrink: 0; font-family: 'Playfair Display', serif; }
.speaker-info .name { font-size: 0.87rem; font-weight: 600; color: var(--text-dark); }
.speaker-info .role { font-size: 0.75rem; color: var(--gray-mid); }

/* Sidebar image widgets (e.g. "Συνδιοργάνωση") should fill widget width */
.sidebar .widget.widget_media_image .widget-content { padding: 0; }
.sidebar .widget.widget_media_image figure,
.sidebar .widget.widget_media_image .wp-caption,
.sidebar .widget.widget_media_image .wp-block-image {
  margin: 0;
  width: 100% !important;
  display: flex;
  justify-content: center;
}
.sidebar .widget.widget_media_image img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto;
  margin: 0 auto !important;
  float: none !important;
}

/* ─── SPONSORS SECTION — IMAGES ─── */
.sponsors-section { background: var(--gray-light); border-top: 1px solid var(--blue-pale); padding: 48px 32px; text-align: center; }
.sponsors-inner { max-width: 1200px; margin: 0 auto; }
.sponsors-heading { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray-mid); margin-bottom: 32px; }
.sponsors-logos { display: block; width: 100%; }
.sponsor-item {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 18px 20px; background: var(--white); border-radius: 8px;
  border: 1px solid var(--blue-pale);
  box-shadow: 0 2px 8px rgba(13,45,107,0.07);
  transition: all 0.25s; text-decoration: none;
  min-height: 64px;
}
.sponsor-item:hover { box-shadow: 0 4px 18px rgba(13,45,107,0.15); transform: translateY(-2px); border-color: var(--blue-light); }
.sponsor-item img {
  width: auto;
  max-width: min(520px, 70%);
  max-height: none;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: grayscale(20%);
  transition: filter 0.25s;
}
.sponsor-item:hover img { filter: grayscale(0%); }

/* ─── FOOTER ─── */
footer.site-footer { background: var(--blue-deep); color: rgba(255,255,255,0.7); }
.footer-top { max-width: 1200px; margin: 0 auto; padding: 56px 32px 40px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-brand .footer-logo-title { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; display: block; }
.footer-brand .footer-logo-sub { font-size: 0.7rem; color: var(--blue-light); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; display: block; }
.footer-brand .custom-logo { max-height: 60px; width: auto; margin-bottom: 14px; display: block; }
.footer-desc { font-size: 0.87rem; line-height: 1.7; max-width: 300px; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-link { width: 34px; height: 34px; border-radius: 6px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.75rem; font-weight: 700; transition: all 0.2s; }
.social-link:hover { background: var(--blue-royal); color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--blue-royal); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; padding: 0; margin: 0; }
.footer-col ul li a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-contact-item { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; margin-bottom: 10px; }
.footer-contact-item svg { color: var(--blue-light); margin-top: 2px; flex-shrink: 0; }
.footer-contact-item a { color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-contact-item a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 32px; }
.footer-bottom-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; }
.footer-bottom-inner a { color: var(--blue-light); text-decoration: none; }
.footer-bottom-inner a:hover { color: var(--gold-light); }
.footer-bottom-links { display: flex; gap: 20px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .site-main { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .site-header.mobile-open { position: relative; }
  .site-header.mobile-open .main-nav { display: flex; position: absolute; top: 72px; left: 0; right: 0; background: var(--blue-navy); padding: 16px 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.3); z-index: 99; }
  .site-header.mobile-open .main-nav ul { flex-direction: column; width: 100%; gap: 4px; }
  .site-header.mobile-open .main-nav ul li a { display: block; padding: 10px 14px; }
  .site-header.mobile-open .main-nav ul li ul { position: static; box-shadow: none; display: flex; padding-left: 16px; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .hero { height: 460px; }
  .hero-meta { gap: 16px; }
  .topbar-inner { flex-direction: column; gap: 6px; text-align: center; }
  .site-main { padding: 40px 16px; }
  .post-body { padding: 24px 18px 28px; }
  .post-card .post-thumbnail { max-height: none; }
  .sponsors-section { padding: 36px 16px; }
  .sponsor-item { padding: 12px; }
  .sponsor-item img {
    width: 100%;
    max-width: 92%;
    min-width: 0;
    margin: 0 auto;
  }
  .sidebar .widget.widget_media_image .widget-content {
    padding: 0;
    text-align: center;
  }
  .sidebar .widget.widget_media_image figure,
  .sidebar .widget.widget_media_image .wp-caption,
  .sidebar .widget.widget_media_image .wp-block-image {
    display: block !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .sidebar .widget.widget_media_image a {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
  }
  .sidebar .widget.widget_media_image img {
    width: auto !important;
    max-width: 92% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* Fallback: force-center any sidebar widget image on mobile */
  .sidebar .widget .widget-content img,
  .sidebar .widget img {
    display: block !important;
    float: none !important;
    clear: both !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 92% !important;
    height: auto !important;
  }
  .sidebar .widget .widget-content a,
  .sidebar .widget .widget-content p,
  .sidebar .widget .widget-content figure,
  .sidebar .widget .widget-content .wp-caption,
  .sidebar .widget .widget-content .wp-block-image {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
