/*
Theme Name: Supplex
Theme URI: https://example.com/supplex
Author: Leonfresh.com
Description: A premium, modern building materials theme.
Version: 1.1.0
Text Domain: supplex
*/

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-text: #334155; /* Slate 700 */
  --color-text-muted: #64748b; /* Slate 500 */

  --color-primary: #1f2937; /* Dark Grey/Blue from brand */
  --color-primary-hover: #111827;

  --color-accent: #ea580c; /* Vibrant Orange */
  --color-accent-hover: #c2410c;

  --color-border: #e2e8f0;
  --color-light-border: rgba(255, 255, 255, 0.2);

  --font-heading: "Playfair Display", serif; /* Premium Serif */
  --font-body: "Inter", sans-serif;
  --font-ui: "Plus Jakarta Sans", sans-serif; /* For buttons, nav */

  --container-width: 1280px;
  --spacing-section: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 0px; /* Sharper corners for premium feel per design */

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  --transition: all 0.3s ease;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}
h3 {
  font-size: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul {
  list-style: none;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-sm); /* Squarer buttons per design */
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s ease-out;
  border: 1px solid transparent;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

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

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: white !important;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white !important; /* Force white text on hover */
}

/* Custom "Tag" style */
.tag {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
  display: inline-block;
}

.tag-outline {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 0.6rem 1.25rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  border-radius: 9999px; /* Pill shape */
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Sections */
.section {
  padding: var(--spacing-section) 0;
}
.frontpage-video-section {
  padding: 2.5rem 0 0;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.text-center {
  text-align: center;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

/* Header – horizontal bar: logo, nav links, CTA on one line */
.site-header {
  display: flex;
  align-items: center;
  min-height: 110px;
  max-height: none;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 0;
  max-height: none;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1002; /* Ensure logo stays above menu */
  min-height: 0;
  max-height: none;
  padding: 0;
  padding-left: 20px;
  overflow: visible;
}

.site-header .logo-icon {
  height: 75px;
  width: auto;
  object-fit: contain;
}

.header-tagline-divider {
  display: block;
  width: 0;
  height: 40px;
  border-left: 2px solid #ddd;
  margin-left: 15px;
  flex-shrink: 0;
}

.header-tagline {
  font-family: 'Inter', Roboto, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-primary, #1f2937);
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .header-tagline-divider,
  .header-tagline {
    display: none !important;
  }
}

.logo-icon {
  height: auto;
  width: auto;
  object-fit: contain;
}

/* Mobile: smaller logo, tagline hidden */
@media (max-width: 991px) {
  .site-header .logo-icon {
    height: 60px;
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
  padding: 0.5rem;
  position: relative;
  z-index: 1002;
}

.menu-toggle:focus {
  outline: none;
}

/* Navigation: mobile = full-screen drawer; desktop = horizontal bar */
.main-navigation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: white;
  padding: 6rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 1001;
  overflow-y: auto;
}

.main-navigation.is-active {
  transform: translateX(0);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.main-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation .menu li {
  margin: 0;
}

.main-navigation a {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
  text-align: center;
  text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
  color: var(--color-accent);
}

.header-cta {
  display: none;
}

/* Dropdown removed: top-level Products link only */
.mega-menu-dropdown {
  display: none !important;
}

/* Desktop: single horizontal line – logo, nav links, Request a Quote */
@media (min-width: 992px) {
  .site-header {
    min-height: 110px;
    max-height: none;
    padding: 1.25rem 0;
  }

  .site-logo {
    font-size: 1.5rem;
    z-index: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    padding-left: 20px;
  }

  .site-header .logo-icon {
    height: 75px;
    width: auto;
  }

  .menu-toggle {
    display: none;
  }

  .main-navigation {
    position: static;
    height: auto;
    width: auto;
    background: transparent;
    padding: 0;
    transform: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    box-shadow: none;
    overflow-y: visible;
  }

  .main-navigation ul {
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
    margin-top: 0;
  }

  .main-navigation a {
    font-size: 0.95rem;
    font-weight: 500;
  }

  .header-cta {
    display: block;
  }
}

/* Hero Section (New Design) */
.hero-section {
  position: relative;
  background-color: var(--color-primary);
  color: white;
  padding: 8rem 0 12rem; /* Extra padding bottom for overlap */
  background-image: linear-gradient(
      rgba(31, 41, 55, 0.8),
      rgba(31, 41, 55, 0.7)
    ),
    url("/wp-content/uploads/2025/12/photo-1486406146926-c627a92ad1ab.jpg");
  background-size: cover;
  background-position: center;
}

.hero-section.hero-sm {
  padding: 6rem 0;
  min-height: auto;
}

.hero-content {
  max-width: 800px;
}

.hero-content h1 {
  color: white;
  margin-bottom: 1.5rem;
}

.hero-content h1 span.highlight {
  color: var(--color-accent);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #d1d5db; /* Light grey */
  margin-bottom: 2.5rem;
  max-width: 600px;
  font-family: var(--font-body);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-buttons .btn-outline {
  border-color: white;
  color: white;
}
.hero-buttons .btn-outline:hover {
  background: white;
  color: var(--color-primary) !important;
}

/* Features Cards (Overlapping) */
.features-overlap-section {
  margin-top: -6rem; /* Overlap the hero */
  position: relative;
  z-index: 10;
  margin-bottom: 6rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--color-accent);
}

.feature-icon-wrapper {
  margin-bottom: 1.5rem;
  color: var(--color-accent); /* Make icons orange */
}

.feature-icon-wrapper svg {
  width: 48px;
  height: 48px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Intro/About Section */
.intro-section {
  padding-bottom: 6rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 992px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.intro-image img {
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
}

.intro-content h2 {
  margin-bottom: 1.5rem;
}
.intro-content p {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.check-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.check-list li svg {
  color: var(--color-accent);
  margin-right: 0.75rem;
  width: 20px;
  height: 20px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 1rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
}

/* Products Section */
.products-section {
  background-color: var(--color-bg-alt);
}

.products-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(
    2,
    1fr
  ); /* 2x2 grid by default for better visibility */
  gap: 2rem;
}

@media (min-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 across on large screens */
  }
}

.product-card-modern {
  position: relative;
  height: 400px;
  overflow: hidden;
  group: hover;
  cursor: pointer;
}

.product-card-modern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0); /* Anti-aliasing fix */
}

.product-card-modern:hover img {
  transform: scale(1.05);
}

.product-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.product-card-overlay h3 {
  color: white;
  margin-bottom: 0;
  font-size: 1.5rem;
}

.product-block {
  display: flex;
  flex-direction: column;
}

.product-block-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* CTA Section */
.cta-dark-section {
  background-color: var(--color-primary);
  color: white;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.cta-dark-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/wp-content/uploads/2025/12/photo-1486406146926-c627a92ad1ab.jpg");
  opacity: 0.1;
  background-size: cover;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  color: white;
  margin-bottom: 1rem;
}
.cta-content p {
  color: white;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: #9ca3af;
  padding: 5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-brand h3 {
  color: white;
  margin-bottom: 1rem;
}

/* Footer S logo + tagline */
.footer-logo-tagline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.footer-logo-icon {
  height: 50px;
  width: auto;
  display: block;
}
.footer-tagline {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}
.footer-brand-name {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.footer-tagline-text {
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.footer-col h4 {
  color: var(--color-accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  font-family: var(--font-ui);
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}
.footer-col a {
  color: #d1d5db;
}
.footer-col a:hover {
  color: white;
}

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

/* Contact Form 7 Styled */
.wpcf7-form p {
  margin-bottom: 0.9rem;
}

.wpcf7-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  font-family: var(--font-ui);
}

.wpcf7-text,
.wpcf7-textarea,
.wpcf7-select,
.wpcf7-number,
.wpcf7-date {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  background-color: #f9fafb;
  color: var(--color-text);
  box-shadow: none;
  box-sizing: border-box;
  max-width: 100%;
}

.wpcf7-text:focus,
.wpcf7-textarea:focus,
.wpcf7-select:focus,
.wpcf7-number:focus,
.wpcf7-date:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
  background-color: white;
}

/* Fix for Select dropdowns */
.wpcf7-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Fix for File Input */
.wpcf7-file {
  font-size: 0.9rem;
  padding: 0.5rem 0;
  width: 100%;
}

.wpcf7-file::file-selector-button {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background-color: #f1f5f9;
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-weight: 500;
  margin-right: 1rem;
  transition: var(--transition);
}

.wpcf7-file::file-selector-button:hover {
  background-color: #e2e8f0;
}

/* Submit Button */
.wpcf7-submit,
input[type="submit"].wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
  border: none;
  background-color: var(--color-accent);
  color: white;
  width: 100%;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wpcf7-submit:hover,
input[type="submit"].wpcf7-submit:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.3);
}

/* Blog Masonry Grid */
.blog-masonry-grid {
  column-count: 1;
  column-gap: 2rem;
}

@media (min-width: 768px) {
  .blog-masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .blog-masonry-grid {
    column-count: 3;
  }
}

.blog-card {
  break-inside: avoid; /* Prevent card from splitting across columns */
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem; /* Vertical gap */
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block; /* Essential for masonry flow */
  width: 100%;
}

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

.blog-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-card-content {
  padding: 2rem;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.blog-cat {
  color: var(--color-accent);
}

.blog-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-title a {
  color: var(--color-primary);
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--color-accent);
}

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Pagination */
.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}

.blog-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.blog-pagination .next,
.blog-pagination .prev {
  width: auto;
  padding: 0 1.5rem;
}

/* Single Post Content Styling - Enhanced Markdown */
.entry-content {
  font-size: 1.1rem; /* Slightly larger base text */
  line-height: 1.8; /* More breathing room */
  color: #374151; /* Dark grey for readability */
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--color-primary);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

.entry-content h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.75rem;
}

.entry-content h3 {
  font-size: 1.5rem;
}

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

/* Lists */
.entry-content ul,
.entry-content ol {
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.entry-content li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li::marker {
  color: var(--color-accent);
  font-weight: 700;
}

/* Blockquotes */
.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  margin: 2rem 0;
  padding: 1rem 2rem;
  background-color: var(--color-bg-alt);
  font-style: italic;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-primary);
}

/* HR Separator */
.entry-content hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* Bold text */
.entry-content strong,
.entry-content b {
  color: var(--color-primary);
  font-weight: 700;
}