/*
Theme Name: Builder Pro
Theme URI: https://example.com/builder-pro
Author: Your Name
Author URI: https://example.com
Description: A professional WordPress theme with a built-in front-end drag-and-drop page builder. Edit text and images directly on the page without touching the admin.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: builder-pro
Tags: page-builder, drag-and-drop, full-width-template, custom-colors, custom-logo
*/

/* =============================================
   CSS VARIABLES & RESET
   ============================================= */
:root {
  --bp-primary:     #1a1a2e;
  --bp-accent:      #e94560;
  --bp-accent-2:    #0f3460;
  --bp-light:       #f8f9fc;
  --bp-white:       #ffffff;
  --bp-text:        #2d2d2d;
  --bp-text-muted:  #6b7280;
  --bp-border:      #e5e7eb;
  --bp-radius:      8px;
  --bp-radius-lg:   16px;
  --bp-shadow:      0 4px 24px rgba(0,0,0,0.08);
  --bp-shadow-lg:   0 12px 48px rgba(0,0,0,0.14);
  --bp-font-head:   'Playfair Display', Georgia, serif;
  --bp-font-body:   'DM Sans', system-ui, sans-serif;
  --bp-max-width:   1200px;
  --bp-section-pad: 80px 24px;
}

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

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

body {
  font-family: var(--bp-font-body);
  color: var(--bp-text);
  background: var(--bp-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bp-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--bp-font-head);
  line-height: 1.25;
  color: var(--bp-primary);
}

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

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--bp-white);
  border-bottom: 1px solid var(--bp-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.site-header .bp-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--bp-font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bp-primary);
  text-decoration: none;
}
.site-logo span { color: var(--bp-accent); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-nav a {
  color: var(--bp-text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color .2s;
}
.site-nav a:hover { color: var(--bp-accent); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--bp-primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px 32px;
  text-align: center;
}

.site-footer a { color: var(--bp-accent); }
.site-footer .footer-logo {
  font-family: var(--bp-font-head);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 12px;
  display: block;
}
.site-footer p { font-size: 0.875rem; }

/* =============================================
   BLOCK: HERO
   ============================================= */
.bp-block-hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bp-primary);
  color: #fff;
}

.bp-block-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  transition: opacity .3s;
}

.bp-block-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: var(--bp-section-pad);
}

.bp-block-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.15;
}

.bp-block-hero .hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 520px;
}

.bp-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--bp-accent);
  color: #fff !important;
  border-radius: var(--bp-radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  border: none;
}
.bp-btn:hover {
  background: #c73652;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233,69,96,0.35);
}

.bp-btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff !important;
}
.bp-btn-outline:hover { background: rgba(255,255,255,0.12); }

/* =============================================
   BLOCK: TEXT / CONTENT
   ============================================= */
.bp-block-text {
  padding: var(--bp-section-pad);
}

.bp-block-text .bp-container {
  max-width: 800px;
}

.bp-block-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 20px;
}

.bp-block-text p {
  font-size: 1.05rem;
  color: var(--bp-text-muted);
  margin-bottom: 16px;
}

/* =============================================
   BLOCK: IMAGE
   ============================================= */
.bp-block-image {
  padding: var(--bp-section-pad);
}

.bp-block-image .image-wrap {
  border-radius: var(--bp-radius-lg);
  overflow: hidden;
  box-shadow: var(--bp-shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}

.bp-block-image img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.bp-block-image .image-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--bp-text-muted);
  margin-top: 12px;
  font-style: italic;
}

/* =============================================
   BLOCK: TWO COLUMN
   ============================================= */
.bp-block-two-col {
  padding: var(--bp-section-pad);
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.two-col-grid h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}

.two-col-grid p {
  color: var(--bp-text-muted);
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.two-col-grid .col-image {
  border-radius: var(--bp-radius-lg);
  overflow: hidden;
  box-shadow: var(--bp-shadow-lg);
}

.two-col-grid .col-image img {
  width: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4/3;
}

/* =============================================
   BLOCK: FEATURES / CARDS
   ============================================= */
.bp-block-features {
  padding: var(--bp-section-pad);
  background: var(--bp-light);
}

.bp-block-features .section-head {
  text-align: center;
  margin-bottom: 56px;
}

.bp-block-features h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 12px;
}

.bp-block-features .section-sub {
  color: var(--bp-text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

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

.feature-card {
  background: #fff;
  padding: 32px;
  border-radius: var(--bp-radius-lg);
  box-shadow: var(--bp-shadow);
  transition: transform .25s, box-shadow .25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bp-shadow-lg);
}

.feature-card .icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #e94560, #0f3460);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

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

/* =============================================
   BLOCK: CTA
   ============================================= */
.bp-block-cta {
  padding: var(--bp-section-pad);
  text-align: center;
  background: linear-gradient(135deg, var(--bp-accent-2) 0%, var(--bp-primary) 100%);
  color: #fff;
}

.bp-block-cta h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: #fff;
  margin-bottom: 16px;
}

.bp-block-cta p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 540px;
  margin: 0 auto 32px;
}

/* =============================================
   BLOCK: GALLERY
   ============================================= */
.bp-block-gallery {
  padding: var(--bp-section-pad);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.gallery-grid .gallery-item {
  border-radius: var(--bp-radius);
  overflow: hidden;
  box-shadow: var(--bp-shadow);
  aspect-ratio: 4/3;
}

.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.gallery-grid .gallery-item:hover img { transform: scale(1.04); }

/* =============================================
   BLOCK: TESTIMONIAL
   ============================================= */
.bp-block-testimonial {
  padding: var(--bp-section-pad);
  background: var(--bp-light);
}

.testimonial-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-inner blockquote {
  font-family: var(--bp-font-head);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--bp-primary);
  line-height: 1.5;
  margin-bottom: 28px;
  position: relative;
}

.testimonial-inner blockquote::before {
  content: '"';
  font-size: 6rem;
  color: var(--bp-accent);
  opacity: 0.2;
  line-height: 0;
  position: absolute;
  top: 32px;
  left: -20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bp-accent);
}

.author-info strong { display: block; font-size: 1rem; }
.author-info span { font-size: 0.875rem; color: var(--bp-text-muted); }

/* =============================================
   BLOCK: SPACER
   ============================================= */
.bp-block-spacer { display: block; }

/* =============================================
   BLOCK: DIVIDER
   ============================================= */
.bp-block-divider {
  padding: 16px var(--bp-section-pad);
}
.bp-block-divider hr {
  border: none;
  border-top: 2px solid var(--bp-border);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .two-col-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-nav { display: none; }
  :root { --bp-section-pad: 56px 20px; }
}

/* =============================================
   UTILITY
   ============================================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* Editor bar offset when admin bar is visible */
.admin-bar .site-header { top: 32px; }
