/*
Theme Name: Custom FFF Theme
Author: Lavinia Iovino
Description: Custom, image and video based, WordPress theme
Version: 1.0
*/

/* Import Mallanna font as backup */
@import url('https://fonts.googleapis.com/css2?family=Mallanna&display=swap');

/* 
Font Loading Strategy:
1. Headers (h1-h6): Space Mono Bold (Adobe Fonts) - Monospace tech aesthetic
2. Body text: Neue Machina → Space Mono → System fonts fallback
3. Hero Title: Mallanna (Google Fonts) for unique style
4. All fonts loaded from Adobe Fonts for consistent quality
*/

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Mono', 'Consolas', 'Monaco', monospace;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Layout and Container
   ========================================================================== */

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero section full-width container override */
.hero-section .container {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Mallana', 'Space Mono', 'Consolas', 'Monaco', monospace;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
  color: #333;
}

h1 {
  font-size: 5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

h4 {
  font-size: 1.25rem;
  font-weight: 700;
}

h5 {
  font-size: 1.1rem;
  font-weight: 700;
}

h6 {
  font-size: 1rem;
  font-weight: 700;
}

p {
  margin-bottom: 15px;
  line-height: 1.6;
}

/* Subtitle Styles */
.hero-subtitle {
  font-family: 'Space Mono', 'Consolas', 'Monaco', monospace;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.5;
  color: #f8f9fa;
}

.section-subtitle {
  font-family: 'Space Mono', 'Consolas', 'Monaco', monospace;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.5;
  color: #666;
}

/* Font Testing - Mallanna */
.mallanna-test {
  font-family: 'Mallanna', serif !important;
  font-size: 2rem !important;
  color: red !important;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
  background: transparent;
  color: #268817;
  border: 2px solid #fff;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-shadow: none;
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: #268817;
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  outline: 2px solid rgba(38, 136, 23, 0.8);
  outline-offset: -2px;
}

.btn-primary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  outline: 2px solid #fff;
  outline-offset: -2px;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-shadow: none;
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background: #fff;
  color: #28a745;
  border-color: #fff;
  outline-color: #28a745;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: rgba(161, 174, 28, 0.8);
  border: 2px solid #fff;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-shadow: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

.btn-secondary:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999999;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 6px;
  top: 7px;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Top Bar */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.contact-info {
  display: flex;
  gap: 20px;
}

.contact-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-info a {
  color: #666;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #007cba;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f8f8f8;
  border-radius: 50%;
  color: #666;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #007cba;
  color: #fff;
}

.social-link.facebook:hover { background: #1877f2; }
.social-link.twitter:hover { background: #1da1f2; }
.social-link.instagram:hover { background: #e4405f; }
.social-link.linkedin:hover { background: #0077b5; }

/* Main Header */
.header-main {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  gap: 10px;
}

/* Site Branding */
.site-branding {
  flex: 0 0 auto;
  max-width: 300px;
}

.site-logo {
  display: block;
}

.site-logo img {
  max-height: 60px;
  width: auto;
  display: block;
}

.site-logo a {
  display: block;
  line-height: 0;
}

.site-title h1 {
  font-family: 'Space Mono', 'Consolas', 'Monaco', monospace;
  font-size: 40px;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: #333;
  transition: color 0.3s ease;
}

.site-title a:hover {
  color: #007cba;
}

.site-description {
  font-size: 14px;
  color: #666;
  margin: 5px 0 0 0;
}

/* Navigation - now in header main */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.primary-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

.primary-menu li {
  position: relative;
}

.primary-menu a {
  display: block;
  padding: 15px 15px;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 5px;
  text-transform: capitalize;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: #28a745;
  background: rgba(40, 186, 0, 0.1);
}

/* Special styling for Dona and Iscriviti links */
.primary-menu .donate-link {
  background: #28a745;
  color: #fff !important;
  border-radius: 25px;
  margin-left: 5px;
}

.primary-menu .donate-link:hover {
  background: #218838;
  color: #fff !important;
}

.primary-menu .signup-link {
  background: #9c9c28;
  color: #fff !important;
  border-radius: 25px;
  margin-left: 3px;
}

.primary-menu .signup-link:hover {
  background: #8a8a22;
  color: #fff !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: rgba(40, 186, 0, 0.1);
  border: 2px solid #28a745;
  cursor: pointer;
  padding: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  background: rgba(0, 162, 19, 0.2);
}

.mobile-menu-toggle:focus {
  outline: 2px solid #28a745;
  outline-offset: 2px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 3px;
  background: #28a745;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Dropdown menus */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.primary-menu li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu a {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  border-left: 3px solid transparent;
}

.primary-menu .sub-menu a:hover {
  background: #f8f8f8;
  border-left-color: #007cba;
}

/* ==========================================================================
   Icon Fonts (Font Awesome alternative)
   ========================================================================== */

.icon-phone::before { content: "📞"; }
.icon-email::before { content: "📧"; }
.icon-facebook::before { content: "📘"; }
.icon-twitter::before { content: "🐦"; }
.icon-instagram::before { content: "📷"; }
.icon-linkedin::before { content: "💼"; }

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-main {
  min-height: calc(100vh - 200px);
  padding: 0;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
  background: #333;
  color: #fff;
  padding: 20px 0px 23px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #555;
}

.footer-section {
  flex: 1;
}

.footer-section h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section p,
.footer-section a {
  color: #ccc;
  line-height: 1.6;
  margin: 0;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #28a745;
}

.footer-bottom {
  padding-top: 15px;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: #999;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #28a745;
}

/* ==========================================================================
   Focus States for Accessibility
   ========================================================================== */

.primary-menu a:focus,
.social-link:focus,
.mobile-menu-toggle:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .contact-info {
    flex-direction: column;
    gap: 10px;
  }
  
  .header-main {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .site-branding {
    flex: 1;
    min-width: 200px;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
    order: 3;
    visibility: visible;
    opacity: 1;
  }
  
  .main-navigation {
    display: none;
    order: 4;
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  
  .main-navigation.mobile-open {
    display: block;
  }
  
  .primary-menu {
    flex-direction: column;
    background: #f8f8f8;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 0;
    gap: 0;
  }
  
  .primary-menu a {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    margin: 0;
  }
  
  .primary-menu .donate-link,
  .primary-menu .signup-link {
    margin: 5px 20px;
    border-radius: 25px;
    text-align: center;
  }
  
  .primary-menu li:last-child a {
    border-bottom: none;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
  }
  
  .footer-section {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 10px;
  }
  
  .site-title h1 {
    font-size: 24px;
  }
  
  .primary-menu a {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .container {
    padding: 0 15px;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .header-top,
  .mobile-menu-toggle,
  .main-navigation {
    display: none;
  }
  
  .site-header {
    box-shadow: none;
    border-bottom: 1px solid #ccc;
  }
}