/*
Theme Name: Sticky Mobile Menu Theme
Theme URI: https://example.com
Author: Patricia Calata
Author URI: https://example.com
Description: A modern WordPress theme with a sticky mobile menu button in the footer
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sticky-mobile-menu
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Header & Navigation */
header {
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 950;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 0;
}

header .site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

header .site-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.5px;
}

header .site-logo a {
  color: #000;
  text-decoration: none;
}

header .site-tagline {
  color: #666;
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  header .site-tagline {
    display: none;
  }

  header .site-header-inner {
    text-align: center;
  }
}

/* Navigation */
.site-navigation {
  display: none;
}

.site-navigation.active {
  display: block;
}

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

.site-navigation .menu li {
  list-style: none;
}

.site-navigation .menu a {
  display: block;
  text-decoration: none;
  color: #1b4620;
  font-size: 1.25rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

/* Desktop Navigation */
@media (min-width: 769px) {
  header {
    position: sticky;
    top: 0;
  }

  .site-navigation {
    display: block !important;
    background-color: #fff;
    border-bottom: none;
    position: static;
    transform: none !important;
  }

  .site-navigation .site-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  .site-navigation .menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .site-navigation .menu li {
    padding: 0;
    list-style: none;
    margin: 0;
  }

  .site-navigation .menu a {
    display: block;
    padding: 1rem 1.25rem;
    color: #1b4620;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
  }

  .site-navigation .menu a:hover {
    color: #0d2410;
  }

  #mobile-menu-toggle {
    display: none !important;
  }

  #mobile-menu-overlay {
    display: none !important;
  }
}

/* Content */
.site-content {
  padding: 2rem 0;
  min-height: calc(100vh - 60px - 200px);
  flex: 1;
  position: relative;
  z-index: 1;
}

.site-content .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

html, body {
  display: flex;
  flex-direction: column;
}

/* Footer */
footer {
  background-color: #f5f5f5;
  border-top: 2px solid #e0e0e0;
  padding: 3rem 0 2rem;
  color: #666;
  font-size: 0.9rem;
  margin-top: auto;
}

/* Footer Content Sections */
footer .footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

/* Footer Menu */
footer .footer-content .footer-menu {
  text-align: center;
}

footer .footer-content ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

footer .footer-content a {
  color: #1b4620;
  text-decoration: none;
  font-weight: 500;
}

footer .footer-content a:hover {
  text-decoration: underline;
}

/* Footer Widgets */
footer .footer-widget {
  margin-bottom: 2rem;
}

footer .footer-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #000;
}

/* Social Media Icons */
footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

footer .social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  transition: background-color 0.3s;
}

footer .social-links a:hover {
  background-color: #1b4620;
}

/* Newsletter / Email Signup */
footer .newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer .newsletter-form input[type="email"],
footer .newsletter-form input[type="text"],
footer .newsletter-form input[type="search"] {
  padding: 0.75rem 1rem;
  border: 1px solid #999;
  border-radius: 0;
  font-size: 1rem;
  background-color: #fff;
  width: 100%;
}

footer .newsletter-form input[type="email"]::placeholder,
footer .newsletter-form input[type="text"]::placeholder,
footer .newsletter-form input[type="search"]::placeholder {
  color: #999;
}

footer .newsletter-form button,
footer .search-form button {
  padding: 0.75rem 1.5rem;
  background-color: #fff;
  color: #000;
  border: 1px solid #999;
  border-radius: 0;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

footer .newsletter-form button:hover,
footer .search-form button:hover {
  background-color: #f5f5f5;
}



footer .copyright {
  color: #999;
  font-size: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

/* Responsive Footer */
@media (max-width: 768px) {
  footer {
    padding: 2rem 0 1rem;
  }

  footer .container {
    padding: 0 2rem;
  }

  footer .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  footer .social-links {
    margin-bottom: 1.5rem;
  }

  footer .search-form {
    flex-direction: column;
  }

  footer .newsletter-form button {
    width: 100%;
  }
}

/* Mobile Menu Toggle Button */
#mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #1b4620;
  border: none;
  font-size: 1.5rem;
  z-index: 1000;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

#mobile-menu-toggle:active {
  background-color: #ececec;
}

#mobile-menu-toggle::before {
  content: '☰';
}

#mobile-menu-toggle.menu-open::before {
  content: '✕';
}

/* Mobile Menu Overlay */
#mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#mobile-menu-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Navigation Menu */
@media (max-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .site-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background-color: #fff;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: block !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: none;
  }

  .site-navigation.active {
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-navigation .menu {
    flex-direction: column;
    list-style: none;
  }

  .site-navigation .menu li {
    border-bottom: 1px solid #f0f0f0;
    list-style: none;
  }

  .site-navigation .menu a {
    display: block;
    padding: 1.5rem 2rem;
    color: #1b4620;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    pointer-events: auto;
    cursor: pointer;
  }

  .site-navigation .menu a:active {
    background-color: #f9f9f9;
  }

  #mobile-menu-toggle {
    display: flex;
  }

  .site-content {
    min-height: 100vh;
  }
}

/* Post Thumbnail */
.post-thumbnail {
  margin-bottom: 1.5rem;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* Posts & Articles */
.post {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.post-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-content {
  margin-top: 1rem;
}

/* Widgets */
.sidebar {
  margin-top: 2rem;
}

.widget {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
}

.widget-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* Button Styles */
button, .button, a.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #1b4620;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s;
  font-weight: 500;
}

button:hover, .button:hover, a.button:hover {
  background-color: #0d2410;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hidden {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
