/* ================================================================
   NRA ARQUITETURA & CONSTRUÇÃO - UNIFIED DESIGN SYSTEM V2.1

   Single source of truth for WordPress customization
   Combines V1 WordPress selectors + V2 token system + Premium components

   ARCHITECTURE: Tokens → Base → Components → Utilities
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* ========== BRAND COLOR PALETTE ========== */
  /* Primary: Deep Slate (base/dominant color) */
  /* Accent: Sky Cyan (call-to-action, interactive) */
  /* Based on brand_identity_guide.md */
  --nra-primary: #0f172a;         /* Deep Slate - Primary/Dark */
  --nra-accent: #38bdf8;          /* Sky Cyan - Accent/Interactive */
  --nra-accent-accessible: #0066cc; /* Accessible Blue - WCAG AA compliant links */
  --nra-success: #10b981;         /* Emerald - Positive/Success */
  --nra-warning: #f59e0b;         /* Amber - Caution/Warning */

  /* ========== SURFACE & TEXT TOKENS ========== */
  --nra-bg: #f8fafc;              /* Light neutral background */
  --nra-bg-secondary: #f1f5f9;    /* Slightly darker neutral */
  --nra-text: #1a1a1a;            /* Primary text (darker for accessibility) */
  --nra-text-light: #555555;      /* Secondary text (improved contrast) */
  --nra-border: #e2e8f0;          /* Border color */

  /* ========== UI DESIGN TOKENS ========== */
  --nra-radius: 12px;             /* Border radius (standard) */
  --nra-radius-full: 50px;        /* Full border radius (pills) */
  --nra-accent-hover: #0ea5e9;    /* Cyan escuro para hover */
  --nra-surface: #ffffff;         /* Cards e superfícies brancas */
  --nra-glass: rgba(255, 255, 255, 0.7);  /* Glassmorphism background */
  --nra-blur: blur(12px);         /* Glassmorphism blur effect */
  --nra-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* ========== TYPOGRAPHY TOKENS ========== */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ========== TRANSITIONS & ANIMATIONS ========== */
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== GLOBAL BASE STYLES ========== */
body {
  font-family: var(--font-body);
  background-color: var(--nra-bg);
  color: var(--nra-text);
  line-height: 1.6;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* ACCESSIBILITY: Link colors with WCAG AA contrast ratio */
a {
  color: var(--nra-accent-accessible);
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* ACCESSIBILITY: Focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--nra-primary);
  outline-offset: 2px;
}

/* ALT TEXT REMINDER FOR LOGOS:
   WordPress Admin → Media Library → Click image
   → Edit → Add alt text: "NR Arquitetura Logo"
   → All logo images MUST have descriptive alt text for accessibility
*/

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--nra-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.375rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

/* ========== WORDPRESS BLOCK SELECTORS ========== */
/* From V1: Ensure WordPress native blocks respect design system */

.wp-block-navigation {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wp-site-blocks {
  padding-top: 2rem;
}

.entry-header h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(to right, var(--nra-accent), var(--nra-primary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.entry-content h2 {
  font-size: clamp(1.375rem, 3vw, 2rem);
  color: var(--nra-primary);
  margin-top: 3rem;
  position: relative;
  padding-left: 1rem;
  border-left: 5px solid var(--nra-accent);
}

.entry-content p {
  font-size: clamp(1rem, 1.5vw + 0.75rem, 1.125rem);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: left;
}

.entry-content {
  max-width: 800px;
  margin: 0 auto;
}

/* ========== WORDPRESS BUTTON STYLING ========== */
.wp-block-button__link {
  background: linear-gradient(135deg, var(--nra-primary) 0%, #1e293b 100%);
  border-radius: var(--nra-radius-full);
  padding: 1rem 2rem;
  font-weight: 700;
  border: none;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  /* Removed !important overrides: cascades naturally with unified CSS */
}

.wp-block-button__link:hover {
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
  opacity: 0.95;
  transform: translateY(-2px);
}

/* ========== GLASSMORPHISM COMPONENTS ========== */
/* V1 Legacy support + V2 Refined component */

.wp-block-group.is-style-glass {
  background: var(--nra-glass);
  backdrop-filter: var(--nra-blur);
  -webkit-backdrop-filter: var(--nra-blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--nra-radius);
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.nra-glass-card {
  background: var(--nra-glass);
  backdrop-filter: var(--nra-blur);
  -webkit-backdrop-filter: var(--nra-blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--nra-radius);
  box-shadow: var(--nra-shadow);
  padding: 2rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.nra-glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ========== LEAD CAPTURE COMPONENTS ========== */
.lead-capture-card {
  transition: transform var(--transition-base);
}

.lead-capture-card:hover {
  transform: translateY(-5px);
}

/* ========== PREMIUM BUTTON COMPONENT ========== */
.btn-premium {
  background: linear-gradient(135deg, var(--nra-primary) 0%, #1e293b 100%);
  color: white;
  padding: 12px 24px;
  border-radius: var(--nra-radius-full);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.2);
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-block;
}

.btn-premium:hover {
  background: linear-gradient(135deg, var(--nra-accent) 0%, #0ea5e9 100%);
  transform: scale(1.05);
  box-shadow: 0 15px 20px -3px rgba(56, 189, 248, 0.4);
}

/* ========== LOCAL SEO UTILITY ========== */
.loc-badge {
  background: rgba(56, 189, 248, 0.1);
  color: var(--nra-accent);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

/* ========== HERO SECTION ========== */
.home-hero {
  height: 80vh;
  background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('nrarq_macapa_hero.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  margin-bottom: 4rem;
  border-radius: 0 0 2rem 2rem;
}

.home-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: white;
  background: none;
  -webkit-text-fill-color: unset;
}

.home-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

/* ========== SERVICES GRID ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--nra-radius);
  border: 1px solid var(--nra-border);
  transition: all var(--transition-base);
  text-align: center;
}

.service-card:hover {
  border-color: var(--nra-accent);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
  transform: translateY(-4px);
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--nra-primary);
}

/* ========== SECTION TITLES ========== */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 4rem 0 2rem;
  color: var(--nra-primary);
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

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

  .autoridade-image {
    height: 300px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .home-hero {
    height: 60vh;
  }

  .home-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  /* Hamburger menu visible */
  .hamburger {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--nra-surface);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
    border-bottom: 1px solid var(--nra-border);
  }

  #nav-toggle:checked ~ .site-nav {
    max-height: 400px;
  }

  #nav-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
  }

  #nav-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }

  #nav-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

@media (max-width: 480px) {
  .services-grid {
    gap: 1rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .stat-item h3 {
    font-size: 36px;
  }

  .autoridade-text h2 {
    font-size: 24px;
  }

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

  .section-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
  }
}

/* ========== HEADER & NAVIGATION ========== */
.site-header {
  background: var(--nra-surface);
  padding: 20px 0;
  border-bottom: 1px solid var(--nra-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--nra-primary);
  letter-spacing: -0.5px;
  font-family: var(--font-heading);
}

.logo-sub {
  font-size: 11px;
  color: var(--nra-text-light);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 35px;
  list-style: none;
}

.site-nav a {
  text-decoration: none;
  color: var(--nra-text);
  font-weight: 500;
  font-size: 15px;
  transition: color var(--transition-base);
}

.site-nav a:hover {
  color: var(--nra-accent-accessible);
}

.site-nav a:focus {
  outline: 2px solid var(--nra-primary);
  outline-offset: 4px;
}

/* Hamburger menu */
#nav-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--nra-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* ========== STATS GRID ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  text-align: center;
}

.stat-item h3 {
  font-size: 48px;
  color: var(--nra-accent);
  margin-bottom: 12px;
  font-weight: 700;
}

.stat-item p {
  color: var(--nra-text-light);
  font-size: 15px;
  line-height: 1.6;
}

/* ========== AUTORIDADE GRID ========== */
.autoridade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.autoridade-image {
  background: linear-gradient(135deg, var(--nra-bg-secondary) 0%, var(--nra-border) 100%);
  height: 450px;
  border-radius: var(--nra-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nra-text-light);
  font-size: 14px;
  flex-direction: column;
  gap: 10px;
}

.autoridade-text h2 {
  font-size: 36px;
  margin-bottom: 25px;
  color: var(--nra-primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.autoridade-text p {
  margin-bottom: 18px;
  line-height: 1.8;
  color: var(--nra-text);
  font-size: 15px;
}

.expertise-list {
  list-style: none;
  margin: 35px 0;
}

.expertise-list li {
  padding: 14px 0;
  padding-left: 32px;
  position: relative;
  color: var(--nra-text);
  font-size: 15px;
  line-height: 1.6;
}

.expertise-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--nra-accent);
  font-weight: bold;
  font-size: 20px;
}

/* ========== TESTIMONIAL CARD ========== */
.testimonial-card {
  background: white;
  border-left: 4px solid var(--nra-accent);
  padding: 25px;
  border-radius: var(--nra-radius);
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
  transform: translateY(-2px);
}

.testimonial-card p {
  color: var(--nra-text);
  font-style: italic;
  margin-bottom: 15px;
  line-height: 1.8;
}

.testimonial-author {
  font-weight: 600;
  color: var(--nra-primary);
  font-size: 14px;
}

/* ========== BLOG CARD ========== */
.blog-card {
  background: white;
  border: 1px solid var(--nra-border);
  border-radius: var(--nra-radius);
  overflow: hidden;
  transition: all var(--transition-base);
}

.blog-card:hover {
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
  transform: translateY(-4px);
  border-color: var(--nra-accent);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--nra-bg-secondary) 0%, var(--nra-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nra-text-light);
  font-size: 48px;
}

.blog-card-content {
  padding: 20px;
}

.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--nra-primary);
  margin-bottom: 10px;
  font-family: var(--font-heading);
}

.blog-card-excerpt {
  color: var(--nra-text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.blog-card-link {
  color: var(--nra-accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-base);
}

.blog-card-link:hover {
  color: var(--nra-accent-hover);
  text-decoration: underline;
}

/* ========== FOOTER GRID ========== */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 60px 0 30px;
  border-top: 1px solid var(--nra-border);
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--nra-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: var(--nra-text-light);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-base);
}

.footer-col a:hover {
  color: var(--nra-accent);
}

/* ========== DARK MODE SUPPORT ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --nra-bg: #0f172a;
    --nra-bg-secondary: #1e293b;
    --nra-text: #f8fafc;
    --nra-text-light: #cbd5e1;
    --nra-border: #334155;
  }

  .service-card {
    background: #1e293b;
    border-color: #334155;
  }

  .site-header {
    background: #0f172a;
    border-bottom-color: #334155;
  }

  .home-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('nrarq_macapa_hero.jpg');
  }

  .blog-card {
    background: #1e293b;
    border-color: #334155;
  }

  .testimonial-card {
    background: #1e293b;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .btn-premium,
  .share-bar,
  .ad-unit {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
