/*
Theme Name: Molgados2026
Theme URI: https://molgadosinstaller.com
Author: DreamCo Design
Author URI: https://dreamcodesign.com
Description: Custom theme for Molgados Installer — Carpet & Tile Installation and Repair
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: molgados2026
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --color-dark:        #151515;
  --color-dark-90:     rgba(21, 21, 21, 0.92);
  --color-green:       #789845;
  --color-green-dark:  #5e7836;
  --color-red:         #ea3f33;
  --color-yellow:      #d2df49;
  --color-light-gray:  #f2f2f3;
  --color-mid-gray:    #cecece;
  --color-text:        #333333;
  --font-primary:      'Lato', Arial, sans-serif;
  --container-max:     1200px;
  --radius:            4px;
  --transition:        0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-green-dark); }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn-primary {
  background: var(--color-green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-green-dark);
  color: #fff;
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.btn-outline:hover {
  background: #fff;
  color: var(--color-dark);
  transform: translateY(-2px);
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-dark-90);
  backdrop-filter: blur(6px);
  transition: background var(--transition), box-shadow var(--transition);
  overflow: visible;
}
#site-header.scrolled {
  background: var(--color-dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

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

.site-logo {
  position: relative;
  z-index: 1001;
  align-self: flex-start;
  margin-top: 10px;
}
.site-logo img {
  height: 168px;
  width: auto;
}

/* Primary Nav */
#primary-nav ul {
  display: flex;
  gap: 8px;
  align-items: center;
}
#primary-nav ul li a {
  display: block;
  padding: 8px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item a {
  color: var(--color-yellow);
  background: rgba(255,255,255,0.07);
}
#primary-nav ul li.menu-cta a {
  background: var(--color-green);
  color: #fff;
  padding: 8px 20px;
}
#primary-nav ul li.menu-cta a:hover {
  background: var(--color-green-dark);
  color: #fff;
}

/* Phone in header */
.header-phone {
  color: var(--color-yellow);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  margin-left: 20px;
  white-space: nowrap;
}
.header-phone a { color: inherit; }
.header-phone a:hover { color: #fff; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO — SHARED BASE
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(21,21,21,0.55) 0%, rgba(21,21,21,0.75) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 40px 24px;
  color: #fff;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero-content .hero-sub {
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 36px;
  opacity: 0.92;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ============================================================
   HERO — FRONT PAGE (video / slideshow)
   ============================================================ */
.hero-front {
  height: 100vh;
  min-height: 560px;
}

/* Video hero */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-wrap iframe,
.hero-video-wrap video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

/* Slideshow hero */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slideshow .slide.active { opacity: 1; }

/* Slide dots */
.slideshow-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.slideshow-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}
.slideshow-dots button.active { background: #fff; }

/* ============================================================
   HERO — INTERIOR PAGES (panoramic banner)
   ============================================================ */
.hero-page {
  height: 340px;
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: scroll;
}
.hero-page .hero-overlay {
  background: linear-gradient(to bottom, rgba(21,21,21,0.5) 0%, rgba(21,21,21,0.72) 100%);
}
.hero-page .hero-content {
  text-align: center;
}
.hero-page .hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0;
}
.hero-page .hero-content .breadcrumb {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.75;
  letter-spacing: 0.05em;
}
.hero-page .hero-content .breadcrumb a { color: var(--color-yellow); }

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.site-main { padding-top: 80px; } /* offset for fixed header */

.page-body {
  padding: 64px 0;
}

/* WYSIWYG / entry content styles */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--color-dark);
  margin: 1.5em 0 0.6em;
  line-height: 1.3;
}
.entry-content h2 { font-size: 1.9rem; }
.entry-content h3 { font-size: 1.5rem; }
.entry-content h4 { font-size: 1.2rem; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.2em 1.5em;
  list-style: disc;
}
.entry-content ol { list-style: decimal; }
.entry-content a { color: var(--color-green); }
.entry-content a:hover { color: var(--color-green-dark); }
.entry-content a.btn { color: #fff; text-decoration: none; display: inline-block; margin: 6px 8px 6px 0; }
.entry-content a.btn:hover { color: #fff; }
.entry-content a.btn-outline { color: var(--color-dark); border-color: var(--color-dark); }
.entry-content a.btn-outline:hover { color: #fff; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
}
.entry-content th,
.entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--color-mid-gray);
  text-align: left;
}
.entry-content th {
  background: var(--color-light-gray);
  font-weight: 700;
}
/* WordPress image alignment */
.entry-content img,
.entry-content figure { max-width: 100%; height: auto; }

.aligncenter,
.entry-content .aligncenter,
.entry-content figure.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }

.alignleft,
.entry-content .alignleft { float: left; margin: 0 24px 16px 0; }

.alignright,
.entry-content .alignright { float: right; margin: 0 0 16px 24px; }

.alignnone { margin: 0 0 16px 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: #777; text-align: center; margin-top: 6px; }

.entry-content::after { content: ''; display: table; clear: both; }

.entry-content blockquote {
  border-left: 4px solid var(--color-green);
  padding: 12px 24px;
  margin: 1.5em 0;
  background: var(--color-light-gray);
  font-style: italic;
  color: #555;
}

/* ============================================================
   FULL WIDTH PAGE — ACF CONTENT BLOCKS
   ============================================================ */
.content-blocks { padding: 0 0 80px; }

.content-block {
  display: flex;
  align-items: center;
  min-height: 420px;
}
.content-block.image-right { flex-direction: row-reverse; }

.content-block__image {
  flex: 0 0 50%;
  max-width: 50%;
  height: 420px;
  overflow: hidden;
}
.content-block__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.content-block:hover .content-block__image img { transform: scale(1.04); }

.content-block__text {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 56px 64px;
}
.content-block.image-right .content-block__text { padding: 56px 64px 56px 40px; }

.content-block__text h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--color-dark);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 16px;
}
.content-block__text h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-green);
}
.content-block__text p { color: #555; line-height: 1.8; }

/* alternating background tints */
.content-block:nth-child(even) { background: var(--color-light-gray); }

/* ============================================================
   SIDEBAR PAGE
   ============================================================ */
.page-sidebar-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 64px 0 80px;
}

.sidebar-col {
  flex: 0 0 29%;
  max-width: 29%;
}

.main-col {
  flex: 1;
  min-width: 0;
}

/* Sidebar widgets */
.sidebar-col .widget {
  background: var(--color-light-gray);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 32px;
  border-top: 3px solid var(--color-green);
}
.sidebar-col .widget h4 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-dark);
  margin-bottom: 14px;
}
.sidebar-col .widget p { font-size: 0.92rem; color: #555; }
.sidebar-col .widget a { color: var(--color-green); font-weight: 600; }

/* ============================================================
   GRAVITY FORMS base tweaks
   ============================================================ */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper textarea,
.gform_wrapper select {
  border: 1px solid var(--color-mid-gray) !important;
  border-radius: var(--radius) !important;
  padding: 10px 14px !important;
  font-family: var(--font-primary) !important;
  font-size: 15px !important;
  width: 100% !important;
  transition: border-color var(--transition) !important;
}
.gform_wrapper input:focus,
.gform_wrapper textarea:focus,
.gform_wrapper select:focus {
  border-color: var(--color-green) !important;
  outline: none !important;
}
.gform_wrapper .gform_submit_button,
.gform_wrapper input[type="submit"] {
  background: var(--color-green) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius) !important;
  padding: 13px 36px !important;
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background var(--transition) !important;
}
.gform_wrapper .gform_submit_button:hover,
.gform_wrapper input[type="submit"]:hover {
  background: var(--color-green-dark) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--color-dark);
  color: #bbb;
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .site-logo-footer img { height: auto; max-height: 60px; width: auto; max-width: 220px; margin-bottom: 20px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.8; color: #999; max-width: 300px; }

.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-yellow);
  margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: #999;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: #fff; }

.footer-social {
  margin-top: 20px;
}
.footer-social-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-mid-gray);
  margin-bottom: 10px;
}
.footer-social-icons {
  display: flex;
  gap: 10px;
}
.footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #aaa;
  transition: background var(--transition), color var(--transition);
}
.footer-social-icons a:hover { background: var(--color-green); color: #fff; }
.footer-social-icons svg { width: 17px; height: 17px; }
.footer-social-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff !important;
  transition: opacity var(--transition), transform var(--transition);
}
.footer-social-badge:hover { opacity: 0.85; transform: translateY(-2px); color: #fff !important; }
.footer-social-badge.yelp  { background: #d32323; }
.footer-social-badge.angi  { background: #FF6B35; }

.footer-cc {
  margin-top: 20px;
}
.footer-cc-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-mid-gray);
  margin-bottom: 8px;
}
.footer-cc img {
  width: 200px;
  height: auto;
  opacity: 0.85;
}

.footer-contact p {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 8px;
}
.footer-contact a { color: var(--color-yellow); font-weight: 600; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
}
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--color-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-divider {
  width: 56px;
  height: 3px;
  background: var(--color-yellow);
  margin: 0 auto 40px;
}
.section-divider.left { margin-left: 0; }

/* ============================================================
   FRONT PAGE — INTRO / SERVICES STRIP
   ============================================================ */
.services-strip {
  background: var(--color-green);
  padding: 28px 0;
  color: #fff;
}
.services-strip .strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  text-align: center;
}
.services-strip .strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.services-strip .strip-item svg { width: 28px; height: 28px; flex-shrink: 0; }

.intro-section { padding: 80px 0; text-align: center; }
.intro-section p {
  max-width: 700px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.85;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .content-block,
  .content-block.image-right { flex-direction: column; }
  .content-block__image,
  .content-block__text {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .content-block__image { height: 280px; }
  .content-block__text,
  .content-block.image-right .content-block__text { padding: 40px 32px; }

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

@media (max-width: 768px) {
  /* Mobile nav */
  .header-inner { height: 68px; }
  .site-logo img { height: 80px; }
  .nav-toggle { display: flex; }
  #primary-nav {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background: var(--color-dark);
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
    z-index: 999;
  }
  #primary-nav.open { transform: translateX(0); }
  #primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 24px 0;
  }
  #primary-nav ul li { width: 100%; }
  #primary-nav ul li a {
    padding: 16px 32px;
    border-radius: 0;
    font-size: 16px;
    border-bottom: 1px solid #222;
  }
  .header-phone { display: none; }

  /* Hero */
  .hero-page { height: 240px; background-attachment: scroll; }

  /* Sidebar layout stack */
  .page-sidebar-layout { flex-direction: column; gap: 32px; }
  .sidebar-col,
  .main-col { flex: 0 0 100%; max-width: 100%; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .services-strip .strip-inner { gap: 24px; }
}

@media (max-width: 480px) {
  .hero-front { height: 90vh; }
  .hero-content h1 { font-size: 1.9rem; }
  .hero-content .hero-sub { font-size: 1rem; }
}
