/*
Theme Name: Pocketm8 Theme
Theme URI: https://example.com/pocketm8-theme
Author: Sozial Digital
Author URI: https://example.com
Description: A modern, vibrant WordPress theme designed for digital social work.
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pocketm8-theme
*/

:root {
  --primary-color: #C8E626;
  --secondary-color: #F5A524;
  --bg-color: #EFF1F2;
  --surface-color: #FFFFFF;
  --text-color: #111827;
  
  --heading-font: Inter, sans-serif;
  --body-font: Inter, sans-serif;
  
  --border-radius: 1.5rem;
  --container-width: 1200px;
}

/* Base Styles */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--body-font);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: inherit;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Layout Containers */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header & Navigation --- */
.site-header {
  background-color: transparent;
  padding: 1.5rem 0;
  width: 100%;
  position: relative;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
  z-index: 101; /* Ensure logo stays above menu if needed */
}

.site-title a {
  color: #000;
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Logo Switch Logic */
.logo-container {
    position: relative;
    cursor: pointer;
}
.logo-short { display: inline-block; }
.logo-full { display: none; }
.logo-container:hover .logo-short { display: none; }
.logo-container:hover .logo-full { display: inline-block; animation: fadeIn 0.2s ease-in; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Navigation Menu Styles */
.site-nav {
    display: flex;
    align-items: center;
}

/* Remove default WP list styles */
.site-nav ul,
.site-nav ul.nav-menu,
.menu-primary-container ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Links Styling */
.site-nav a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Active State (Pill) */
.site-nav li.current-menu-item > a,
.site-nav li.current_page_item > a,
.site-nav a[aria-current="page"] {
    background-color: var(--secondary-color);
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Toggle Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-inner::before, .hamburger-inner::after {
    content: "";
    display: block;
}
.hamburger-inner::before { top: -10px; }
.hamburger-inner::after { bottom: -10px; }

/* Mobile Navigation Logic */
@media (max-width: 768px) {
    .site-header { padding: 1rem 0; }
    
    .menu-toggle {
        display: block;
    }

    /* Transform hamburger when open */
    .menu-toggle[aria-expanded="true"] .hamburger-inner {
        transform: rotate(45deg);
    }
    .menu-toggle[aria-expanded="true"] .hamburger-inner::before {
        top: 0;
        opacity: 0;
    }
    .menu-toggle[aria-expanded="true"] .hamburger-inner::after {
        bottom: 0;
        transform: rotate(-90deg);
    }

    .header-inner {
        /* Keep logo and toggle on same line */
        flex-direction: row; 
        flex-wrap: wrap;
    }

    /* Container for the nav items */
    .site-header-menu {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
        opacity: 0;
        background-color: var(--surface-color);
        border-radius: var(--border-radius);
        margin-top: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .site-header-menu.toggled {
        max-height: 500px; /* Arbitrary large height for animation */
        opacity: 1;
        padding: 1.5rem;
    }

    .site-nav {
        width: 100%;
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    
    .site-nav li {
        width: 100%;
    }

    .site-nav a {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
    }
}

/* Desktop Specifics */
@media (min-width: 769px) {
    .site-nav ul { gap: 1.5rem; }
    .site-header-menu { display: block !important; opacity: 1 !important; max-height: none !important; }
}


/* --- Hero Section --- */
.hero-section {
  padding: 4rem 0 6rem 0;
  text-align: center;
  color: #000;
}
@media(max-width: 768px) {
    .hero-section { padding: 2rem 0 4rem 0; }
}

.hero-title {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--secondary-color);
}

.hero-text {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  font-weight: 500;
  color: #4b5563;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 165, 36, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--text-color);
  color: var(--text-color);
}
.btn-outline:hover {
  background-color: var(--text-color);
  color: #fff;
}

/* --- Main Layout --- */
.main-content {
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  min-height: 50vh;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.post {
  background: var(--surface-color);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.post-title {
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.post-title a { text-decoration: none; color: inherit; }
.post-title a:hover { color: var(--secondary-color); }

/* --- Gravity Forms / Forms Styling --- */
input[type="text"], input[type="email"], input[type="password"], textarea, select, .gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    background: #f9fafb;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.1);
}

/* Gravity Forms Specifics to match Theme */
.gform_wrapper .gform_footer input[type=submit] {
    background-color: var(--secondary-color) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 0.75rem 2rem !important;
    font-size: 1.1rem !important;
    border: none !important;
    cursor: pointer;
    transition: transform 0.2s;
}
.gform_wrapper .gform_footer input[type=submit]:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* --- Widgets / Sidebar --- */
.widget {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.widget-title {
  font-size: 1.25rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

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

.widget li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
}
.widget li a { font-weight: 500; }

/* --- Footer --- */
.site-footer {
  background-color: var(--secondary-color);
  padding: 5rem 0;
  color: #000;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media(max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { padding: 3rem 0; }
}

.footer-brand {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: bold;
  color: #fff;
  margin-top: 3rem;
  line-height: 1;
}

/* --- Block Editor Adjustments --- */
.wp-block-columns { margin-bottom: 2rem; }
