/* ============================================
   OPTIMA HEATING & PLUMBING - Design System
   ============================================ */

/* CSS Variables - Modern UK Palette */
:root {
  /* Primary Colors - Navy Blue */
  --primary-blue: #0056b3;
  --primary-blue-light: #0d6efd;
  --primary-blue-dark: #004494;
  
  /* Emergency/Important Color - Red */
  --emergency-red: #dc3545;
  --emergency-red-light: #e74c3c;
  --emergency-red-dark: #c82333;
  
  /* Accent Colors - Teal/Cyan */
  --accent-blue: #00a8cc;
  --accent-blue-light: #4fc3dc;
  --accent-blue-dark: #0087a3;
  
  /* Secondary Accent - Warm Amber/Gold */
  --accent-gold: #f59e0b;
  --accent-gold-light: #fbbf24;
  --accent-gold-dark: #d97706;
  
  /* Sky Blue (for softer accents) */
  --sky-blue: #29b6f6;
  --sky-blue-light: #4fc3f7;
  --sky-blue-dark: #0288d1;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --light-blue-bg: #F0F4F8;
  --gray-50: #F0F4F8;
  --gray-100: #E8EEF5;
  --gray-200: #D9E2EC;
  --gray-300: #BCCCDC;
  --gray-400: #9FB3C8;
  --gray-500: #829AB1;
  --gray-600: #627D98;
  --gray-700: #486581;
  --gray-800: #344E66;
  --gray-900: #243B53;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--light-blue-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

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

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

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-emergency:hover {
  background: var(--emergency-red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-blue-light) 100%);
  color: var(--white);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

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

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
  box-shadow: var(--shadow-xl);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.navbar-logo svg {
  stroke: var(--white);
}

.navbar-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.navbar-logo span {
  color: var(--sky-blue);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-menu a {
  color: var(--white);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--sky-blue);
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sky-blue);
  transition: width var(--transition-base);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

/* Dropdown Menu */
.navbar-menu-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 1001;
}

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

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--gray-700);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

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

.dropdown-menu a::after {
  display: none;
}

.dropdown-arrow {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform var(--transition-fast);
}

.navbar-menu-item:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.navbar-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--white);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

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

/* Mobile Navigation */
.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  z-index: 999;
}

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

.mobile-menu a {
  display: block;
  padding: 1rem;
  color: var(--gray-700);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-200);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Hero Section */
.hero {
  padding: 10rem 0 5rem;
  background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 50%, var(--accent-blue-dark) 100%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--light-blue-bg), transparent);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
  color: var(--white);
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  text-shadow: 0 1px 5px rgba(0,0,0,0.2);
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--white);
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.trust-item-small {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-size: 0.875rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.section-gray {
  background: var(--off-white);
}

/* Section with Image */
.section-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.section-image-container {
  position: relative;
}

.section-image-container::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--accent-blue) 100%);
  border-radius: var(--radius-xl);
  z-index: -1;
  opacity: 0.3;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  height: 100%;
}

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

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 30px;
  height: 30px;
  color: var(--white);
}

.card-icon.accent {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-dark) 100%);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

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

.card p {
  margin-bottom: 0;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 1rem;
  transition: gap var(--transition-fast);
}

.card-link:hover {
  gap: 0.75rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

/* Trust Section */
.trust-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.trust-item {
  text-align: center;
  padding: 2rem;
}

.trust-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.trust-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.trust-item h3 {
  margin-bottom: 0.5rem;
}

.trust-item p {
  margin-bottom: 0;
}

/* Testimonials */
.testimonials {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue-dark) 100%);
  color: var(--white);
}

.testimonials h2,
.testimonials p {
  color: var(--white);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-blue);
}

.testimonial-name {
  font-weight: 600;
}

.testimonial-location {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Emergency Banner */
.emergency-banner {
  background: linear-gradient(135deg, var(--emergency-red) 0%, var(--emergency-red-dark) 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.emergency-banner h2,
.emergency-banner p {
  color: var(--white);
}

.emergency-phone {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  display: inline-block;
  margin: 1.5rem 0;
  text-decoration: none;
  transition: all var(--transition-base);
}

.emergency-phone:hover {
  color: var(--white);
  transform: scale(1.05);
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 4rem 0 2rem;
}

.footer h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

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

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

.footer-links a {
  color: var(--gray-300);
  transition: color var(--transition-fast);
}

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

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

.footer-contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

/* WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  transition: all var(--transition-base);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.2);
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  color: var(--white);
}

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

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

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-main);
  transition: border-color var(--transition-fast);
}

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

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

.form-error {
  color: #DC2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-input.error,
.form-textarea.error {
  border-color: #DC2626;
}

.form-input.error + .form-error,
.form-textarea.error + .form-error {
  display: block;
}

/* Page Header */
.page-header {
  padding: 6rem 0 3rem;
  background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 50%, var(--accent-blue-dark) 100%);
  position: relative;
  overflow: hidden;
  background-image: url('https://images.unsplash.com/photo-1585704032915-c3400ca199e7?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 40, 71, 0.9) 0%, rgba(30, 58, 95, 0.85) 50%, rgba(0, 135, 163, 0.8) 100%);
  z-index: 0;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.page-header p {
  font-size: 1.25rem;
  max-width: 600px;
  color: var(--white);
  text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-slow);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .navbar-cta {
    display: none;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .emergency-phone {
    font-size: 2rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding: 0 1rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .card {
    padding: 1.5rem;
  }
  
  .navbar-logo {
    font-size: 1.25rem;
  }
}
