/* ============================================
   Cypress Tx Concrete Co - Main Stylesheet
   Mobile-first, responsive design
   ============================================ */

/* CSS Variables */
:root {
  --primary: #c41e3a;
  --primary-dark: #9a1830;
  --secondary: #2c3e50;
  --accent: #f39c12;
  --light: #f8f9fa;
  --dark: #1a1a1a;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--secondary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

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

/* Skip Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 208px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo img {
    height: 176px;
  }
}

/* Navigation */
.nav {
  display: none;
}

.nav.active {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin-bottom: 0.5rem;
}

.nav-list a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--secondary);
  font-weight: 500;
  border-radius: var(--radius);
}

.nav-list a:hover,
.nav-list a:focus {
  background: var(--light);
  color: var(--primary);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 0.7rem;
}

.dropdown-menu {
  display: none;
  list-style: none;
  padding: 0.5rem 0 0.5rem 1rem;
  background: var(--light);
  border-radius: var(--radius);
  margin-top: 0.25rem;
  min-width: 200px;
  box-shadow: var(--shadow);
}

.dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  display: block;
  white-space: nowrap;
}

/* Prevent dropdown from closing on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

@media (max-width: 768px) {
  .dropdown:hover .dropdown-menu {
    display: none;
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--secondary);
  transition: var(--transition);
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--light);
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: '>';
  margin-left: 0.5rem;
  color: var(--gray);
}

.breadcrumbs a {
  color: var(--gray);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs [aria-current="page"] {
  color: var(--secondary);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

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

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

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

.btn-secondary:hover {
  background: #1a252f;
  color: var(--white);
}

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

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

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #34495e 100%);
  color: var(--white);
  padding: 8rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg picture,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(44, 62, 80, 0.7);
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 0 2rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.phone-cta {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phone-cta:hover {
  color: var(--accent);
}

/* Section */
.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--gray);
  margin-bottom: 1rem;
}

.card-link {
  font-weight: 600;
  color: var(--primary);
}

.card-link:hover {
  color: var(--primary-dark);
}

/* Service Cards */
.service-card {
  border-left: 4px solid var(--primary);
}

/* Location Cards */
.location-card {
  text-align: center;
}

.location-card h3 {
  color: var(--primary);
}

/* Trust Elements */
.trust-section {
  background: var(--light);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}

.trust-item {
  padding: 1rem;
}

.trust-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.trust-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.trust-item p {
  font-size: 0.875rem;
  color: var(--gray);
  margin: 0;
}

/* Testimonials */
.testimonial {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.testimonial-text {
  font-style: italic;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--secondary);
}

.testimonial-location {
  font-size: 0.875rem;
  color: var(--gray);
}

/* FAQ */
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
}

.faq-question[aria-expanded="true"]::after {
  content: '−';
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--gray);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--secondary);
}

.form-label .required {
  color: var(--primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

/* Honeypot */
.honeypot {
  position: absolute;
  left: -9999px;
}

/* Contact Info */
.contact-info {
  background: var(--light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-details h4 {
  margin-bottom: 0.25rem;
}

.contact-details p {
  margin: 0;
  color: var(--gray);
}

.contact-details a {
  color: var(--primary);
  font-weight: 500;
}

/* Map Container */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Process Steps */
.process-steps {
  display: grid;
  gap: 2rem;
}

.process-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 {
  margin-bottom: 0.5rem;
}

/* CTA Block */
.cta-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 3rem 0;
}

.cta-block h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-block p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

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

.cta-block .btn:hover {
  background: var(--light);
}

/* Footer */
.footer {
  background: var(--secondary);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

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

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
}

.footer-section a:hover {
  color: var(--white);
}

.footer-phone {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

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

/* Mobile Call Bar */
.mobile-call-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  padding: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.mobile-call-bar a {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Thank You Page */
.thank-you {
  text-align: center;
  padding: 4rem 1rem;
}

.thank-you-icon {
  font-size: 4rem;
  color: #28a745;
  margin-bottom: 1.5rem;
}

.thank-you h1 {
  margin-bottom: 1rem;
}

.thank-you p {
  font-size: 1.125rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.bg-light { background: var(--light); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Two Column Layout */
.two-column {
  display: grid;
  gap: 2rem;
}

/* Image Container */
.image-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
}

.image-container img {
  width: 100%;
  height: auto;
}

/* Service List */
.service-list {
  list-style: none;
  padding: 0;
}

.service-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-list li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

/* Internal Links Block */
.internal-links {
  background: var(--light);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.internal-links h4 {
  margin-bottom: 1rem;
}

.internal-links ul {
  list-style: none;
  padding: 0;
}

.internal-links li {
  margin-bottom: 0.5rem;
}

/* Tablet Styles */
@media (min-width: 768px) {
  .nav {
    display: block;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
  }
  
  .nav-list {
    display: flex;
    gap: 0.5rem;
  }
  
  .nav-list li {
    margin-bottom: 0;
  }
  
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0;
    padding-top: 0.75rem;
  }

  .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.75rem;
  }
  
  .dropdown-menu a {
    padding: 0.75rem 1.25rem;
  }
  
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    display: block;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .hero {
    padding: 10rem 0;
  }
  
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .two-column {
    grid-template-columns: 1fr 1fr;
  }
  
  .contact-layout {
    grid-template-columns: 1fr 2fr;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .process-steps {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .process-step {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  
  .section {
    padding: 4rem 0;
  }
}

/* Print Styles */
@media print {
  .header,
  .mobile-call-bar,
  .cta-block,
  .nav {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: var(--gray);
  }
}

/* Focus Styles (Accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Sticky Phone CTA for Mobile */
@media (max-width: 768px) {
  .sticky-phone {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s ease;
  }
  
  .sticky-phone:hover {
    transform: scale(1.1);
    color: var(--white);
  }
}
