/* ============================================================
   GREEN CARPET CLEANING - Optimized Stylesheet
   SEO-friendly, Mobile-Responsive, High-Performance
   ============================================================ */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Imprima&family=Cabin+Condensed:wght@400;600&display=swap');
@import url('/assets/css/blog.css');

/* === CSS VARIABLES === */
:root {
  --primary: #5bb136;
  --primary-dark: #31353d;
  --primary-light: #5cd02a;
  --text-dark: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --bg-light: #f4f4f4;
  --bg-footer: #d8d8d8;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --radius: 10px;
  --transition: all 0.3s ease;
  --font-main: 'Open Sans', Arial, sans-serif;
  --font-heading: 'Imprima', Arial, sans-serif;
  --font-subheading: 'Cabin Condensed', Arial, sans-serif;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--white);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover, a:focus {
  color: var(--primary-light);
  text-decoration: underline;
}
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a[href^="tel"] {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  padding-left: 1.5rem;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  margin-top: 0;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p {
  margin: 0 0 1rem 0;
}

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* === HEADER === */
#header_wrapper {
  padding: 1.5rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #4a9e2b 100%);
  margin-bottom: 1.5rem;
}

#header_text {
  overflow: hidden;
  zoom: 1;
}

#header_text h1#site_heading {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  color: var(--white);
  margin: 0.3rem 0 0.5rem 0;
  line-height: 1.1;
  float: left;
}

#header_text h1#site_heading a {
  color: var(--white);
}

#header_text h2#site_subheading {
  font-family: var(--font-subheading);
  font-size: 1.3rem;
  color: #000;
  margin: 1.3rem 0 0 0;
  float: right;
  font-weight: 600;
}

/* === CALL BUTTON === */
.call-btn-header {
  display: none;
}

/* === NAVIGATION === */
.navbar {
  width: 100%;
  position: relative;
}

#primary_navigation {
  font-family: var(--font-main);
  font-size: 0.95rem;
}

#primary_navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--primary-dark);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#primary_navigation ul li {
  position: relative;
}

#primary_navigation ul li a {
  display: block;
  padding: 0.8rem 1.8rem;
  color: var(--white) !important;
  text-decoration: none;
  margin-top: 0;
  transition: var(--transition);
}

#primary_navigation ul li a:hover,
#primary_navigation ul li.active a {
  background: var(--primary);
}

#primary_navigation ul ul.sub_navigation {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-dark);
  min-width: 220px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

#primary_navigation ul li:hover > ul.sub_navigation,
#primary_navigation ul li:focus-within > ul.sub_navigation {
  display: block;
}

#primary_navigation ul ul.sub_navigation li {
  display: block;
}
/* === MOBILE NAV TOGGLE === */
#mobnav-btn {
  display: none;
  background: var(--primary-dark);
  color: var(--white);
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  text-align: right;
  width: 100%;
  border: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(255,255,255,0.3);
  touch-action: manipulation;
}

#mobnav-btn div {
  float: right;
}

#mobnav-btn div span {
  background: #fff;
  display: block;
  height: 2px;
  width: 25px;
  margin: 6px 0 4px;
}

#mobile_navigation ul {
  display: none;
}

#mobile_navigation ul.mobnav-open {
  display: block;
}

/* === COMPONENTS === */
.component {
  margin-bottom: 1.5rem;
}

.component h2 {
  margin-top: 0;
  padding: 0.4rem 1rem;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--primary-dark);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1.1rem;
}

.navigation_component ul {
  list-style: none;
  font-size: 1.1rem;
  padding: 0;
  margin: 0;
}

.navigation_component ul li {
  padding: 0.3rem 0;
}

.navigation_component ul ul {
  padding-left: 2rem;
  list-style-type: square;
}

/* === BLOG === */
.blog_component ul, .blog_archive_component ul {
  list-style: none;
  padding-left: 0;
}

.blog_component .blog_post ul {
  list-style-type: square;
  padding-left: 1.8rem;
}

.blog_component p.post_read_more {
  padding-bottom: 0.6rem;
}

.blog_component p.post_read_more a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary-dark);
  color: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
}

.blog_component p.post_read_more a:hover {
  background: var(--primary);
  color: var(--white);
}

.blog_component p.archived {
  text-align: right;
  padding-top: 0.6rem;
}

.blog_component p.archived a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
}

.blog_component p.archived a:hover {
  background: var(--primary-dark);
  color: var(--white);
}

/* === METADATA === */
.metadata {
  font-size: 0.85rem;
  padding: 0.6rem;
  border-top: 2px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* === COMMENTS === */
.comment {
  border-bottom: 2px solid #ddd;
  padding: 0.8rem 0;
}

/* === FORMS === */
.component input,
.component textarea,
.component select {
  font-family: var(--font-main);
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
}

.component input:focus,
.component textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91,177,54,0.2);
}

input.form_field_submit_button,
.submit_wrapper input {
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  font-size: 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  width: auto;
}

input.form_field_submit_button:hover,
.submit_wrapper input:hover {
  background: var(--primary-dark);
}

/* === SIDEBAR === */
#right {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 0.8rem;
}

/* === FOOTER === */
#footer_wrapper {
  color: #000;
  width: 100%;
  background: var(--bg-footer);
  margin-top: 2rem;
  padding: 1.5rem 0;
}

#footer_wrapper .container {
  padding: 0.5rem 0;
}

#footer_wrapper a {
  color: var(--primary);
}

#footer_wrapper a:hover {
  color: var(--primary-light);
}

#copyright {
  padding: 0 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* === BUTTONS === */
.btn-style-1, .btn-style-2, .btn-style-3, 
.btn-style-4, .btn-style-5, .btn-style-6 {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 0.3rem;
  transition: var(--transition);
  border: none;
}

.btn-style-1 { background: #337ab7; color: var(--white); }
.btn-style-2 { background: #5cb85c; color: var(--white); }
.btn-style-3 { background: #5bc0de; color: var(--white); }
.btn-style-4 { background: #f0ad4e; color: var(--white); }
.btn-style-5 { background: #d9534f; color: var(--white); }
.btn-style-6 { background: #616161; color: var(--white); }

.btn-style-1:hover, .btn-style-2:hover, .btn-style-3:hover,
.btn-style-4:hover, .btn-style-5:hover, .btn-style-6:hover {
  opacity: 0.9;
  text-decoration: none;
  transform: translateY(-1px);
}

/* === TWO COLUMN LAYOUT === */
.content-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.content-main {
  flex: 1 1 68%;
  max-width: 68%;
  padding: 0 15px;
}

.content-sidebar {
  flex: 1 1 32%;
  max-width: 32%;
  padding: 0 15px;
}

/* === SERVICE GRID === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.service-card {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

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

.service-card h3 {
  margin-top: 0.5rem;
}

/* === TESTIMONIALS === */
.testimonial {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* === SKIP LINK (Accessibility) === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  z-index: 10000;
}

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

/* === BREADCRUMBS === */
.breadcrumbs {
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--primary);
}

/* === PAGE COUNTER === */
.page-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

/* === SOCIAL SHARE === */
.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: var(--white);
  transition: var(--transition);
}

.share-buttons a:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.back-to-top.visible {
  display: block;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* === FIXED CALL BUTTON ON MOBILE === */
.fixed-call-btn {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
  z-index: 10000;
  border: none;
  cursor: pointer;
}

.fixed-call-btn a {
  color: var(--white);
  text-decoration: none;
}

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

/* Tablet & Under */
@media screen and (max-width: 768px) {
  .content-main, .content-sidebar {
    flex: 1 1 100%;
    max-width: 100%;
  }

  #header_text h1#site_heading {
    font-size: 2.2rem;
    float: none;
    text-align: center;
  }

  #header_text h2#site_subheading {
    font-size: 1.1rem;
    float: none;
    text-align: center;
    margin-top: 0.5rem;
  }

  #header_text {
    padding: 0 0.5rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  .service-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
  }

  .call-btn-header {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
  }

  .call-btn-header a {
    display: inline-block;
    background: var(--white);
    color: var(--primary) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
  }
}

/* Mobile */
@media screen and (max-width: 650px) {
  /* Desktop Navigation -> Mobile Hamburger */
  #primary_navigation ul {
    display: none;
    flex-direction: column;
    text-align: left;
  }

  #primary_navigation ul li a {
    float: none;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  #primary_navigation ul ul.sub_navigation {
    position: static;
    display: none;
    box-shadow: none;
    padding-left: 1rem;
  }

  #primary_navigation ul li:hover > ul.sub_navigation,
  #primary_navigation ul li:focus-within > ul.sub_navigation {
    display: none;
  }

  #primary_navigation ul li.expanded > ul.sub_navigation {
    display: block;
  }

  #mobnav-btn {
    display: block;
  }

  #mobile_navigation {
    background: var(--primary-dark);
  }

  #mobile_navigation > ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #mobile_navigation > ul > li > a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  #mobile_navigation .sub_navigation {
    list-style: none;
    padding-left: 1rem;
    display: none;
  }

  #mobile_navigation .sub_navigation li a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
  }

  #header_wrapper {
    padding: 0.8rem 0;
  }

  #header_text h1#site_heading {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  #header_text h2#site_subheading {
    font-size: 1rem;
  }

  .container {
    padding: 0 10px;
  }

  .back-to-top {
    bottom: 4.5rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .fixed-call-btn {
    display: block;
  }

  .component h2 {
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
  }

  #primary_navigation ul li a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

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

/* Small Mobile */
@media screen and (max-width: 480px) {
  #header_text h1#site_heading {
    font-size: 1.5rem;
  }

  #header_text h2#site_subheading {
    font-size: 0.9rem;
  }

  .btn-style-1, .btn-style-2, .btn-style-3,
  .btn-style-4, .btn-style-5, .btn-style-6 {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  input.form_field_submit_button {
    width: 100%;
  }
}

/* === PRINT === */
@media print {
  .navbar, .fixed-call-btn, .back-to-top, 
  #mobnav-btn, .share-buttons {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
  }
  
  a {
    text-decoration: underline;
  }
}
