/* ========================================
   SHARED STYLES - Smith Works Tree Service
   This file contains common styles for all pages.
   Include via: <link rel="stylesheet" href="/components/shared-styles.css">
======================================== */

/* ========================================
   CSS VARIABLES
======================================== */
:root {
  --primary: #1a8d48;
  --primary-dark: #156b38;
  --primary-light: #22c55e;
  --accent: #e5841b;
  --accent-dark: #c56d0f;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-cream: #f0f7f1;
  --bg-dark: #0f2818;
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 8px;
}

/* ========================================
   RESET & BASE STYLES
======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========================================
   BUTTONS
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 141, 72, 0.3);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(26, 141, 72, 0.35), 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 141, 72, 0.45), 0 4px 8px rgba(0,0,0,0.12);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(26, 141, 72, 0.3);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(229, 132, 27, 0.35), 0 2px 4px rgba(0,0,0,0.1);
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(229, 132, 27, 0.45), 0 4px 8px rgba(0,0,0,0.12);
  filter: brightness(1.05);
}

.btn-accent:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(229, 132, 27, 0.3);
}

.btn-outline {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.15);
}

.btn-outline:active {
  transform: translateY(1px) scale(0.98);
}

.btn-lg { 
  padding: 18px 36px; 
  font-size: 17px; 
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn:hover svg {
  transform: scale(1.1);
}

/* ========================================
   HEADER
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  z-index: 1000;
  padding: 12px 0;
  transition: all 0.3s ease;
}

.header.scrolled {
  padding: 8px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
}

.logo:hover { transform: scale(1.02); }

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--primary-dark);
  line-height: 1.1;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav { display: flex; align-items: center; gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; display: flex; align-items: center; }
.nav-links a {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 8px;
}

.nav-links > li > a:hover { 
  color: var(--primary);
  background: rgba(26, 141, 72, 0.08);
}

/* Services Dropdown */
.nav-dropdown > a { gap: 4px; }
.nav-dropdown > a svg { width: 12px; height: 12px; transition: transform 0.2s; margin-left: 2px; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 12px 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  margin-top: 12px;
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }
.nav-dropdown:hover > a svg { transform: rotate(180deg); }
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.dropdown-menu a:hover { background: #f0f7f1; color: #1a8d48; opacity: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.header-phone:hover {
  background: rgba(26, 141, 72, 0.08);
}

.header-phone svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
  color: var(--text-dark);
}

.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 16px;
}

.mobile-call-btn {
  display: flex;
  align-items: center;
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 6px;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--primary);
  transition: background 0.2s;
}

.mobile-menu-btn:hover { background: var(--bg-light); }
.mobile-call-btn:hover { background: rgba(26, 141, 72, 0.08); }

/* Mobile Menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 1002;
  padding: 24px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, visibility 0.3s;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
}

.mobile-menu.active {
  transform: translateX(0);
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}

.mobile-menu-nav { list-style: none; margin-bottom: 32px; }
.mobile-menu-nav li { margin-bottom: 8px; }
.mobile-menu-nav a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 10px;
  transition: all 0.2s;
}

.mobile-menu-nav a:hover {
  background: var(--bg-light);
  color: var(--primary);
}

body.menu-open { overflow: hidden; }

/* ========================================
   RESPONSIVE HEADER
======================================== */
@media (max-width: 900px) {
  .nav, .header-actions { display: none; }
  .mobile-header-actions { display: flex; }
  .mobile-menu-btn { display: block; }
}

/* ========================================
   FOOTER
======================================== */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-top: 16px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 16px;
  margin-bottom: 20px;
  color: white;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.footer-contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--primary-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-contact-item a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ========================================
   ANIMATIONS
======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.no-js .fade-in {
  opacity: 1;
  transform: none;
}
