/*
Theme Name: Merton Environmental
Theme URI: https://mertonenv.com.au
Author: Merton Environmental
Author URI: https://mertonenv.com.au
Description: Professional website theme for Merton Environmental Pty Ltd — environmental consultants and waste management specialists.
Version: 1.0.0
License: Proprietary
Text Domain: mertonenv
*/

/* ========================================
   Merton Environmental - Main Stylesheet
   ======================================== */

:root {
  --green: #D7346F;
  --green-light: #D8EFE1;
  --green-dark: #5172B1;
  --dark: #1a1a1a;
  --mid-grey: #555555;
  --light-bg: #F8F9FA;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
  --radius: 8px;
  --transition: all 0.25s ease;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background-color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark);
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

h5 {
  font-size: 1.1rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--mid-grey);
}

a {
  color: var(--green);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background-color: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

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

.btn-secondary:hover {
  background-color: var(--green-light);
  border-color: var(--green-dark);
  color: var(--green-dark);
  text-decoration: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--dark);
  border: 1px solid var(--mid-grey);
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
  text-decoration: none;
}

.btn-white {
  background-color: var(--white);
  color: var(--dark);
}

.btn-white:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
  position: sticky;
  top: 0;
  background-color: var(--dark);
  color: var(--white);
  padding: 1rem 2rem;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.nav-logo a {
  color: var(--white);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-item a {
  color: var(--white);
  font-weight: 500;
  transition: var(--transition);
}

.nav-item a:hover {
  color: var(--green-light);
  text-decoration: none;
}

.nav-item.active a {
  color: var(--green-light);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-arrow {
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--green-dark);
  list-style: none;
  padding: 0.5rem 0;
  border-radius: var(--radius);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  margin-top: 0.5rem;
  box-shadow: var(--shadow);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--white);
}

.dropdown-menu a:hover {
  background-color: var(--green);
  text-decoration: none;
}

/* Mobile Menu Toggle */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--white);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 80vh;
  background: linear-gradient(135deg, #1a3d2e 0%, #2D6A4F 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(216, 239, 225, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(45, 106, 79, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero .btn {
  margin: 0 0.5rem;
}

/* ========================================
   SECTIONS & LAYOUT
   ======================================== */

.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-dark {
  background-color: var(--dark);
  color: var(--white);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.section-green {
  background-color: var(--green);
  color: var(--white);
}

.section-green h2,
.section-green h3 {
  color: var(--white);
}

.section-light {
  background-color: var(--light-bg);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* WordPress page hero */
.page-hero {
  min-height: 60vh;
  background: linear-gradient(135deg, #1a3d2e 0%, #2D6A4F 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.page-hero .hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

.grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card h3 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.card p {
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 60px;
  height: 60px;
  background-color: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.card-link {
  color: var(--green);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-link:hover {
  gap: 0.75rem;
}

.card-dark {
  background-color: var(--dark);
  color: var(--white);
}

.card-dark h3 {
  color: var(--white);
}

.card-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -2rem -2rem 1.5rem -2rem;
}

.sector-badge {
  display: inline-block;
  background-color: var(--green-light);
  color: var(--green-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ========================================
   CALLOUT / ALERT BOXES
   ======================================== */

.callout {
  background-color: var(--green-light);
  border-left: 4px solid var(--green);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.callout h4 {
  color: var(--green-dark);
  margin-top: 0;
}

.callout p {
  color: var(--dark);
  margin-bottom: 0;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  color: var(--mid-grey);
}

.breadcrumb a {
  color: var(--green);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--mid-grey);
}

/* ========================================
   TABLES
   ======================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

thead {
  background-color: var(--green);
  color: var(--white);
}

th {
  padding: 1.25rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

tbody tr:hover {
  background-color: var(--light-bg);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

input[type="text"],
input[type="email"],
input[type="phone"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="phone"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="submit"],
.form-submit {
  background-color: var(--green);
  color: var(--white);
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

input[type="submit"]:hover,
.form-submit:hover {
  background-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 3rem 2rem 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--green-light);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.footer-section ul a:hover {
  color: var(--green-light);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 2rem; padding-right: 2rem; }

.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-6 { padding-top: 3rem; padding-bottom: 3rem; }

.flex {
  display: flex;
}

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

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

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.max-width {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

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

.accent-color {
  color: var(--green);
}

.bg-green {
  background-color: var(--green);
}

.bg-dark {
  background-color: var(--dark);
}

.bg-light {
  background-color: var(--light-bg);
}

.text-white {
  color: var(--white);
}

.text-muted {
  color: var(--mid-grey);
}

.rounded {
  border-radius: var(--radius);
}

/* ========================================
   WORDPRESS CORE FIXES
   ======================================== */

.wp-block-image {
  margin: 0;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
}

.wp-caption {
  max-width: 100%;
}

/* WordPress menu active states */
.nav-menu .current-menu-item > a,
.nav-menu .current-page-ancestor > a {
  color: var(--green-light) !important;
}

/* Post content styling */
.entry-content h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: var(--green);
}

.entry-content h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
}

.entry-content p {
  margin-bottom: 1.2rem;
}

.entry-content ul,
.entry-content ol {
  margin: 1rem 0 1rem 2rem;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: 0.5rem;
}

.custom-logo {
  max-height: 50px;
  width: auto;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-previous,
.nav-next {
  flex: 1;
}

.nav-previous {
  text-align: left;
}

.nav-next {
  text-align: right;
}

.nav-previous a,
.nav-next a {
  display: inline-block;
  padding: 1rem 1.5rem;
  background-color: var(--light-bg);
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-previous a:hover,
.nav-next a:hover {
  background-color: var(--green-light);
  text-decoration: none;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .section {
    padding: 2.5rem 1.5rem;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .navbar {
    padding: 1rem;
  }

  .nav-container {
    padding: 0;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--green-dark);
    padding: 1.5rem;
    gap: 1rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    transform: none;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
    transition: max-height 0.3s ease;
  }

  .dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
  }

  .hamburger {
    display: flex;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-group .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-previous,
  .nav-next {
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 1.5rem 1rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.75rem 0.5rem;
  }

  .nav-logo {
    font-size: 1rem;
  }
}
