/* ==========================================================================
   Ιστοσελίδα Εταιρείας - ΕΣΠΑ 2021-2027
   Προσβασιμότητα WCAG 2.1 Level AA
   ========================================================================== */

:root {
  --primary-color: #003476;
  --secondary-color: #0066cc;
  --accent-color: #ffd700;
  --text-color: #333333;
  --text-light: #666666;
  --bg-color: #ffffff;
  --bg-light: #f5f5f5;
  --border-color: #dddddd;
  --success-color: #28a745;
  --error-color: #dc3545;
  --focus-color: #0066cc;
  --link-color: #0066cc;
  --link-hover: #003476;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Typography */
  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Accessibility - WCAG 2.1 AA
   ========================================================================== */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: bold;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* High contrast for links - WCAG AA */
a {
  color: var(--link-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   ΕΣΠΑ Header Banner - Visible without scrolling
   ========================================================================== */

.espa-banner-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.espa-banner-link:hover .espa-banner,
.espa-banner-link:focus .espa-banner {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.espa-banner {
  background: linear-gradient(135deg, #003476 0%, #0066cc 100%);
  color: white;
  padding: var(--spacing-sm);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.espa-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.espa-logos {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.espa-logo {
  height: 50px;
  width: auto;
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
}

.espa-text {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.espa-hashtags {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  background-color: var(--bg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 70px;
  z-index: 999;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.site-logo:hover,
.site-logo:focus {
  color: var(--secondary-color);
  text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--secondary-color);
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon::before {
  content: "✕";
}

.mobile-menu-toggle[aria-expanded="false"] .menu-icon::before {
  content: "☰";
}

/* Navigation */
.main-nav {
  flex: 1;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
  align-items: center;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-list a:hover,
.nav-list a:focus {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.nav-list a.active {
  background-color: var(--primary-color);
  color: white;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

main {
  flex: 1;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-sm);
}

.content-section {
  margin-bottom: var(--spacing-xl);
}

.content-section h1,
.content-section h2,
.content-section h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
}

.content-section h1 {
  font-size: 2.5rem;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: var(--spacing-sm);
}

.content-section h2 {
  font-size: 2rem;
}

.content-section h3 {
  font-size: 1.5rem;
}

.content-section p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.content-section ul,
.content-section ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.content-section li {
  margin-bottom: var(--spacing-xs);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: var(--spacing-xl) var(--spacing-sm);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.hero h1 {
  color: white;
  border-bottom: none;
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  color: white;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.card p {
  color: var(--text-light);
}

/* ==========================================================================
   Forms - Accessible & WCAG Compliant
   ========================================================================== */

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--focus-color);
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-helper {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: var(--spacing-xs);
}

.form-error {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  font-weight: 600;
}

/* Required field indicator */
.required::after {
  content: " *";
  color: var(--error-color);
}

/* Buttons */
button,
.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.btn:hover,
button:focus,
.btn:focus {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active,
.btn:active {
  transform: translateY(0);
}

button:disabled,
.btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: var(--spacing-xl) var(--spacing-sm) var(--spacing-lg);
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  color: var(--accent-color);
  margin-bottom: var(--spacing-sm);
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section a {
  color: white;
  text-decoration: none;
}

.footer-section a:hover,
.footer-section a:focus {
  color: var(--accent-color);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 0.9rem;
}

.footer-espa-info {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  text-align: center;
}

/* ==========================================================================
   Responsive Design - Mobile First
   ========================================================================== */

@media (max-width: 768px) {
  /* ESPA Banner */
  .espa-banner {
    padding: var(--spacing-xs);
  }
  
  .espa-logo {
    height: 40px;
  }
  
  .espa-text {
    font-size: 0.8rem;
  }
  
  /* Header adjustments */
  .site-header {
    top: 150px;
  }
  
  .header-container {
    padding: var(--spacing-sm) var(--spacing-xs);
  }
  
  /* Mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
  }
  
  /* Navigation */
  .main-nav {
    flex-basis: 100%;
    order: 3;
  }
  
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
    display: none;
    background: white;
    padding: var(--spacing-xs) 0;
    margin-top: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .nav-list.active {
    display: flex;
  }
  
  .nav-list a {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    display: block;
    box-sizing: border-box;
  }
  
  .nav-list li:last-child a {
    border-bottom: none;
  }
  
  .nav-list a.active {
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    margin: 2px 4px;
    width: calc(100% - 8px);
  }
  
  /* Typography */
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .content-section h1 {
    font-size: 1.8rem;
  }
  
  .content-section h2 {
    font-size: 1.5rem;
  }
  
  /* Cards */
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  /* Container padding */
  .container {
    padding: var(--spacing-md) var(--spacing-sm);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .skip-link,
  .mobile-menu-toggle,
  .site-header,
  .site-footer,
  .espa-banner {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: black;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
}

/* ==========================================================================
   Photo Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
  background: var(--bg-light);
}

.gallery-item:hover,
.gallery-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: scale(1.05);
}

/* Loading state for lazy images */
.gallery-item img[loading="lazy"] {
  background: linear-gradient(
    90deg,
    var(--bg-light) 0%,
    #e0e0e0 50%,
    var(--bg-light) 100%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #003476 0%, #0066cc 100%);
  color: white;
  padding: 1.5rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: none;
  animation: slideUp 0.5s ease;
}

.cookie-consent.show {
  display: block;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-content p {
  margin: 0;
  flex: 1;
  min-width: 300px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-buttons .btn {
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-accept {
  background: white;
  color: var(--primary-color);
}

.btn-accept:hover,
.btn-accept:focus {
  background: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-decline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-decline:hover,
.btn-decline:focus {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-content p {
    min-width: auto;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-buttons .btn {
    flex: 1;
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
