/* ============================================
   Coastal Alarm Systems - Modern Clean Design
   ============================================ */

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

:root {
  --primary: #0d2137;
  --primary-light: #1a3a5c;
  --accent: #00b4d8;
  --accent-hover: #0096c7;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-600);
  background: var(--white);
}

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

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

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

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

/* Typography */
h1, h2, h3, h4 {
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }

p {
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
}

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

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo svg {
  width: 40px;
  height: 40px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-list a {
  font-weight: 500;
  color: var(--gray-600);
  padding: 8px 0;
  position: relative;
}

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

.nav-list a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* Hero */
.hero {
  min-height: 600px;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('assets/pexels-thomas-veillon-451521767-29866272.jpg') center/cover no-repeat;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  color: var(--white);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

.hero-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Services */
.services {
  padding: 100px 0;
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header p {
  color: var(--gray-400);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-body {
  padding: 24px;
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  color: var(--gray-400);
  font-size: 15px;
}

/* Why Us */
.why-us {
  padding: 100px 0;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 60px;
}

.why-item {
  text-align: center;
  padding: 32px 24px;
  background: var(--gray-50);
  border-radius: 16px;
  transition: background 0.3s;
}

.why-item:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

.why-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.why-item h4 {
  margin-bottom: 8px;
}

.why-item p {
  font-size: 14px;
  color: var(--gray-400);
  margin: 0;
}

/* Areas */
.areas {
  padding: 80px 0;
  background: var(--primary);
  color: var(--white);
}

.areas h2 {
  color: var(--white);
  text-align: center;
  margin-bottom: 32px;
}

.areas-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.area-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contact Form */
.contact-section {
  padding: 100px 0;
  background: var(--gray-50);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 24px;
}

.contact-info p {
  color: var(--gray-400);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.contact-item-text h4 {
  margin-bottom: 4px;
  font-size: 16px;
}

.contact-item-text p {
  margin: 0;
  font-size: 15px;
  color: var(--gray-400);
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  transition: border-color 0.2s;
  font-family: inherit;
}

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

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.form-checkbox label {
  font-size: 14px;
  color: var(--gray-400);
  margin: 0;
}

.form-checkbox a {
  color: var(--accent);
}

.btn-submit {
  width: 100%;
  padding: 16px;
}

/* Page Hero */
.page-hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

/* Content Section */
.content-section {
  padding: 80px 0;
}

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

.content-section article h2 {
  margin-top: 40px;
  margin-bottom: 16px;
}

.content-section article ul {
  margin: 16px 0 16px 24px;
}

.content-section article li {
  margin-bottom: 8px;
}

/* Services Detail */
.service-detail {
  padding: 80px 0;
}

.service-detail:nth-child(even) {
  background: var(--gray-50);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.service-grid.reverse {
  direction: rtl;
}

.service-grid.reverse > * {
  direction: ltr;
}

.service-grid img {
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.service-grid h2 {
  margin-bottom: 16px;
}

.service-features {
  list-style: none;
  margin: 24px 0;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--gray-600);
}

.service-features li::before {
  content: '';
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Map */
.map-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.map-section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.map-wrapper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-wrapper iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* Business Model */
.bm-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--gray-200);
}

.bm-section:last-child {
  border-bottom: none;
}

.bm-section h2 {
  margin-bottom: 20px;
}

/* Footer */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

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

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

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

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

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-disclaimer {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copyright {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gray-800);
  padding: 24px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.cookie-content a {
  color: var(--accent);
}

.cookie-buttons {
  display: flex;
  gap: 12px;
}

.cookie-buttons button {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

#cookie-accept {
  background: var(--accent);
  color: var(--white);
  border: none;
}

#cookie-reject {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#cookie-settings {
  background: transparent;
  color: var(--accent);
  border: none;
  text-decoration: underline;
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.cookie-modal.visible {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-modal-content h2 {
  margin-bottom: 24px;
}

.cookie-category {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-category-header h4 {
  margin: 0;
}

.cookie-category p {
  font-size: 14px;
  color: var(--gray-400);
  margin: 0;
}

.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gray-200);
  border-radius: 24px;
  transition: 0.3s;
}

.cookie-toggle-slider::before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--accent);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background: var(--gray-400);
  cursor: not-allowed;
}

.cookie-modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.cookie-modal-buttons button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#cookie-save {
  background: var(--accent);
  color: var(--white);
  border: none;
}

#cookie-cancel {
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

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

.cta-section .btn:hover {
  background: var(--gray-100);
}

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

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  
  .nav-list {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 0;
  }
  
  .nav-list.open {
    display: flex;
  }
  
  .nav-list li {
    border-bottom: 1px solid var(--gray-200);
  }
  
  .nav-list a {
    display: block;
    padding: 16px 0;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }
  
  .services-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper,
  .service-grid {
    grid-template-columns: 1fr;
  }
  
  .service-grid.reverse {
    direction: ltr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}
