/*
Theme Name: Hoffnung
Theme URI: https://hoffnung.org
Author: Adrian Dobra
Author URI: https://adriandomra.com
Description: A modern humanitarian aid and charity WordPress theme compatible with PHP 7.4+ and PHP 8+. Built for organizations making a difference.
Version: 2025
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: social-welfare
Tags: charity, nonprofit, donation, fundraising, causes, humanitarian-aid
*/

/* Removed Tailwind import to prevent conflicts with globals.css */
/* Converted @theme inline to regular CSS custom properties */

:root {
  /* Color Tokens */
  --color-primary: #fdb714;
  --color-primary-dark: #e5a512;
  --color-secondary: #2c3e50;
  --color-dark: #2c2c2c;
  --color-darker: #1a1a1a;
  --color-gray: #6c757d;
  --color-light-gray: #f5f5f5;
  --color-white: #ffffff;
  --color-success: #28a745;

  /* Typography */
  --font-sans: system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, serif;

  /* Spacing */
  --radius: 0.5rem;
}

/* Base Styles */
body {
  font-family: var(--font-sans);
  color: var(--color-secondary);
  line-height: 1.6;
}

/* Header Styles */
.site-header {
  background-color: #fdb714;
  padding: 0;
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
  width: 100%;
}

/* Improved sticky header behavior - stays visible and properly sized */
.site-header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease;
  z-index: 1000;
}

/* Ensure sticky menu has proper height and is fully visible */
.site-header.sticky .main-navigation {
  min-height: 55px;
}

.site-header.sticky .main-navigation a {
  padding: 0.875rem 1.25rem;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Add padding to body when header is sticky */
body.header-sticky {
  padding-top: 60px;
}

/* Full width backgrounds for all sections */
.top-contact-bar {
  background-color: #2c2c2c;
  color: #ffffff;
  font-size: 0.813rem;
  padding: 0.5rem 0;
  width: 100%;
}

.top-contact-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.contact-info {
  display: flex;
  gap: 2rem;
}

.contact-item {
  color: #ffffff;
}

.logo-area {
  background-color: #ffffff;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e5e5;
  width: 100%;
}

.logo-area-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Content now aligns with container edges, matching menu alignment */
}

.site-branding img {
  max-height: 80px;
  width: auto;
}

.default-logo img {
  max-height: 80px;
  width: auto;
}

/* Navigation */
/* Improved navigation menu alignment and spacing */
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #fdb714;
  position: relative;
  width: 100%;
}

.main-navigation ul {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-start; /* Changed from center to flex-start */
  flex-wrap: wrap;
}

.main-navigation li {
  position: relative;
  flex-shrink: 0;
}

.main-navigation a {
  color: #000000;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.938rem;
  text-transform: uppercase;
  transition: all 0.3s;
  display: block;
  padding: 1rem 1.25rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: #2c2c2c;
  background-color: rgba(0, 0, 0, 0.05);
}

/* Submenu dropdown styles */
.main-navigation ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 220px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  flex-direction: column;
  gap: 0;
  z-index: 1000;
  border-top: 3px solid #fdb714;
}

.main-navigation li:hover > ul,
.main-navigation li.focus > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-navigation ul ul li {
  width: 100%;
  border-bottom: 1px solid #e5e5e5;
}

.main-navigation ul ul li:last-child {
  border-bottom: none;
}

.main-navigation ul ul a {
  padding: 0.875rem 1.5rem;
  color: #2c2c2c;
  font-size: 0.875rem;
  text-transform: none;
  font-weight: 500;
}

.main-navigation ul ul a:hover {
  background-color: #fdb714;
  color: #000000;
}

/* Submenu indicator arrow */
.main-navigation .menu-item-has-children > a::after {
  content: "▼";
  font-size: 0.6em;
  margin-left: 0.4rem;
  transition: transform 0.3s;
  color: #000000;
}

.main-navigation .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* Child submenu appears to the right */
.main-navigation ul ul ul {
  top: 0;
  left: 100%;
  margin-left: 0;
}

.main-navigation ul ul .menu-item-has-children > a::after {
  content: "▶";
  float: right;
  margin-left: auto;
  transform: none;
}

.main-navigation ul ul .menu-item-has-children:hover > a::after {
  transform: translateX(3px);
}

/* Mobile menu styles with submenu support */
/* Improved mobile menu with visible hamburger icon */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

/* Fixed hamburger icon alignment - all lines same width and aligned */
.hamburger {
  display: block;
  width: 28px;
  height: 3px;
  background-color: #000000;
  position: relative;
  transition: background-color 0.3s;
  border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 28px;
  height: 3px;
  background-color: #000000;
  transition: transform 0.3s;
  border-radius: 2px;
}

.hamburger::before {
  top: -9px;
}

.hamburger::after {
  bottom: -9px;
}

.mobile-menu-toggle.active .hamburger {
  background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
/* Full width section backgrounds */
.hero-section,
.stats-section,
section {
  width: 100%;
}

.hero-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  width: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.hero-content {
  position: relative;
  z-index: 10;
  color: var(--color-white);
  max-width: 600px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-darker);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(253, 183, 20, 0.4);
}

.btn-outline {
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
}

.btn-donate-header {
  background-color: #2c2c2c;
  color: #ffffff;
  padding: 0.875rem 2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border-radius: 0;
}

.btn-donate-header:hover {
  background-color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.donate-icon {
  font-size: 1rem;
}

/* Cause Cards */
.cause-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.cause-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.cause-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.cause-content {
  padding: 1.5rem;
}

.cause-category {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-dark);
  padding: 0.25rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 1rem;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-primary);
  transition: width 0.3s;
}

/* Statistics Section */
/* Full width section backgrounds */
.stats-section {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 3rem 0;
  width: 100%;
}

.stat-item {
  text-align: center;
  background-color: none;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Donor Cards */
.donor-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.donor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-primary);
}

/* Footer */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 3rem 0 1rem;
}

.footer-widget {
  margin-bottom: 2rem;
}

.footer-widget h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-widget a:hover {
  color: var(--color-primary);
}

/* Footer Widget Styling */
.footer-widget-title {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.footer-widget-content {
  color: #b0b0b0;
  line-height: 1.8;
}

.footer-widget-content ul {
  list-style: none;
  padding: 0;
}

.footer-widget-content li {
  margin-bottom: 0.75rem;
}

.footer-widget-content a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-widget-content a:hover {
  color: var(--color-primary);
}

.footer-widget-content p {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

/* Footer Column responsive */
@media (max-width: 768px) {
  .footer-widget-title {
    font-size: 1rem;
  }

  .footer-widget-content {
    font-size: 0.875rem;
  }
}

.footer-widget {
  margin-bottom: 2rem;
}

.footer-widget h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-widget a:hover {
  color: var(--color-primary);
}

/* Footer 4 columns vertical layout - responsive grid */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column:empty {
  display: none;
}

/* Responsive footer - 2 columns on tablet, 1 column on mobile */
@media (max-width: 1024px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Utility Classes */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--color-secondary);
}

.section-title span {
  color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  /* Reduced padding for mobile */
  .container {
    padding: 0 1rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Improved mobile menu with proper background */
  .main-navigation ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fdb714;
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .main-navigation ul.active {
    max-height: 100vh;
    opacity: 1;
    visibility: visible;
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .main-navigation a {
    padding: 1rem 1.5rem;
  }

  /* Mobile submenu styling with separate background */
  .main-navigation ul ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: rgba(255, 255, 255, 0.95);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: none;
    border-left: 3px solid #fdb714;
  }

  .main-navigation li.submenu-open > ul {
    max-height: 500px;
  }

  .main-navigation ul ul a {
    padding-left: 2.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    color: #2c2c2c;
    font-size: 0.875rem;
  }

  .main-navigation ul ul a:hover {
    background-color: #fdb714;
    color: #000000;
  }

  .main-navigation ul ul ul {
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 3px solid #e5a512;
  }

  .main-navigation ul ul ul a {
    padding-left: 3.5rem;
    background-color: rgba(255, 255, 255, 0.9);
  }

  .main-navigation ul ul .menu-item-has-children > a::after {
    content: "▼";
    float: none;
  }

  .top-contact-bar {
    font-size: 0.75rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
  }

  .logo-area-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .site-branding img,
  .default-logo img {
    max-height: 60px;
  }
}

/* Enhanced mobile responsiveness and scroll progress bar */

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, #fdb714, #e5a512);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Mobile Navigation Improvements */
/* Improved mobile menu display with proper content visibility */
@media (max-width: 1024px) {
  .main-navigation {
    position: relative;
    min-height: 50px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Fixed mobile menu visibility - menu items now display properly */
  .main-navigation ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fdb714;
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

  .main-navigation ul.active {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    display: flex !important; /* Force display flex when active */
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: block; /* Ensure list items are visible */
  }

  .main-navigation a {
    padding: 1rem 1.5rem;
    width: 100%;
    display: block;
  }

  /* Mobile submenu with distinct white background */
  .main-navigation ul ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: none;
    border-left: 4px solid #fdb714;
    display: block; /* Ensure submenus can be displayed */
  }

  .main-navigation li.submenu-open > ul {
    max-height: 1000px;
    display: block; /* Show submenu when parent is open */
  }

  .main-navigation ul ul a {
    padding: 0.875rem 1.5rem 0.875rem 2.5rem;
    background-color: #ffffff;
    color: #2c2c2c;
    font-size: 0.875rem;
  }

  .main-navigation ul ul a:hover {
    background-color: #fdb714;
    color: #000000;
  }

  .main-navigation ul ul ul {
    background-color: #f8f8f8;
    border-left: 4px solid #e5a512;
  }

  .main-navigation ul ul ul a {
    padding-left: 3.5rem;
    background-color: #f8f8f8;
  }

  .main-navigation ul ul .menu-item-has-children > a::after {
    content: "▼";
    float: none;
    position: absolute;
    right: 1.5rem;
  }

  .main-navigation .menu-item-has-children.submenu-open > a::after {
    transform: rotate(180deg);
  }

  /* Adjust header sizing for mobile */
  body.header-sticky {
    padding-top: 50px;
  }

  .site-header.sticky {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.875rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .top-contact-bar {
    display: none;
  }

  .logo-area-content {
    gap: 0.75rem;
  }

  .site-branding img,
  .default-logo img {
    max-height: 40px;
  }

  .btn-donate-header {
    padding: 0.625rem 1.25rem;
    font-size: 0.75rem;
  }

  .main-navigation a {
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
  }
}

/* Full width and responsive article containers */
.site-main {
  width: 100%;
}

.site-main .container {
  max-width: 100%;
  padding: 0;
}

.site-main article {
  max-width: 100%;
  width: 100%;
}

.site-main .entry-content {
  max-width: 100%;
  width: 100%;
  padding: 0rem;
}

/* Responsive article content */
@media (max-width: 768px) {
  .site-main .entry-content {
    padding: 1rem;
  }

  .site-main article {
    margin: 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .site-main .entry-content {
    padding: 1.5rem;
  }
}

/* Full Width Template */
.full-width-template .entry-content {
  max-width: 100%;
}

.full-width-template .entry-content > * {
  max-width: 100%;
}

/* Center footer copyright and improve styling */
.footer-bottom {
  text-align: center;
}

.footer-bottom .copyright {
  font-size: 0.875rem;
  color: #b0b0b0;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  display: inline-block;
}

.footer-menu a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-menu a:hover {
  color: var(--color-primary);
}
