/* Custom CSS for Locksmith Staten Island NY Website */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Poppins:wght@400;600;700;800&display=swap');

/* CSS Variables for Brand Colors */
:root {
  --primary-brand-color: #008080; /* Teal */
  --secondary-color: #5B6770; /* Steel Gray */
  --accent-cta-color: #FFD300; /* Safety Yellow */
  --light-background: #F8F9FA; /* Off-White */
  --text-primary: #212529; /* Charcoal */
  --text-secondary: #495057; /* Slate Gray */
  --button-link-hover: #006666; /* Deep Teal */
  --highlight-active-states: #00A3A3; /* Light Teal */
  --divider-border: #DEE2E6; /* Soft Gray */
  --error-warning: #FF6B6B; /* Coral Red */

  /* Legacy variables for backward compatibility */
  --primary-color: var(--primary-brand-color);
  --accent-color: var(--accent-cta-color);
  --light-bg: var(--light-background);
  --dark-text: var(--text-primary);
  --dark-secondary: var(--text-secondary);
  --primary-hover: var(--button-link-hover);
  --accent-hover: var(--highlight-active-states);
  --border-color: var(--divider-border);
  --error-color: var(--error-warning);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Open Sans', sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
  font-size: 16px;
}

/* Ensure consistent container max-width across all pages */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Consistent section padding */
.section-padding {
  padding: 4rem 0;
}

/* Consistent main content area */
main {
  min-height: calc(100vh - 400px); /* Ensure minimum height for consistent layout */
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #fff;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
}
.bg-primary h3{
  color: #fff !important;
}

/* Ensure proper text contrast on light backgrounds */
.bg-light h2,
.bg-light h3,
.bg-light h4,
.bg-light p {
  color: var(--text-primary) !important;
}

.bg-light h3 {
  color: var(--secondary-color) !important;
}

/* Ensure white text on all gradient backgrounds with primary/secondary colors */
[class*="bg-gradient-to"] h1,
[class*="bg-gradient-to"] h2,
[class*="bg-gradient-to"] h3,
[class*="bg-gradient-to"] h4,
[class*="bg-gradient-to"] h5,
[class*="bg-gradient-to"] h6,
[class*="bg-gradient-to"] p {
  color: inherit !important;
}

/* Specific gradient background text rules */
.bg-gradient-to-r.from-primary h1,
.bg-gradient-to-r.from-primary h2,
.bg-gradient-to-r.from-primary h3,
.bg-gradient-to-r.from-primary h4,
.bg-gradient-to-br.from-primary h1,
.bg-gradient-to-br.from-primary h2,
.bg-gradient-to-br.from-primary h3,
.bg-gradient-to-br.from-primary h4,
.bg-gradient-to-r.from-secondary h1,
.bg-gradient-to-r.from-secondary h2,
.bg-gradient-to-r.from-secondary h3,
.bg-gradient-to-r.from-secondary h4 {
  color: #fff !important;
}

p {
  font-size: 1rem;
  color: var(--dark-secondary);
  line-height: 1.6;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.space-y-2 p{
  color:#fff !important;
}
/* Buttons */
.btn-primary {
  background-color: var(--accent-color);
  color: var(--dark-text);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  background-color: #FFE066; /* Lighter yellow shade for hover */
}

.btn-secondary {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-secondary:hover {
    color: var(--primary-hover);
    background-color: #fff;
    border: 1px solid var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary-color);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

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

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 4rem 0;
}

/* Header */
header {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Navigation */
nav a {
  color: var(--secondary-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

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

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.dropdown-content a:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

/* Hero Section */
.hero, .py-20 {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  padding: 5rem 0;
}

.hero h1, .py-20 h1 {
  color: white !important;
}

.hero h2, .py-20 h2 {
  color: white !important;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

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

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

.testimonial-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* FAQ */
.faq-item {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
  background-color: var(--primary-color);
  color: white;
  padding: 4rem 0;
}

.cta-section h2 {
  color: white !important;
}

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

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

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

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

.footer-links a {
  color: var(--light-bg);
  transition: color 0.3s ease;
}

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

/* Mobile Menu */
#mobile-menu {
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-menu {
  display: none;
  background-color: white;
  border-top: 1px solid var(--border-color);
}

.mobile-menu.show {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero, .py-20 {
    padding: 3rem 0;
  }

  .services-grid,
  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

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

  .mobile-menu-toggle {
    display: block;
  }

  nav.desktop {
    display: none;
  }

  /* Optimize for mobile performance */
  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  /* Reduce padding on mobile for better space utilization */
  .section-padding {
    padding: 3rem 0;
  }

  /* Optimize button sizes for touch */
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    min-height: 48px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .hero .flex {
    flex-direction: column;
  }

  /* Further optimize for small screens */
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-sireact-zeditor: 1.125rem;
  }

  /* Reduce container padding on very small screens */
  .container {
    padding: 0 0.75rem;
  }

  /* Optimize grid gaps for small screens */
  .services-grid,
  .features-grid,
  .testimonials-grid {
    gap: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

/* Focus States for Accessibility */
button:focus,
a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  header,
  footer,
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    display: none;
  }
}
