@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary: #0f172a;       /* Deep slate navy */
  --primary-light: #1e293b; /* Dark slate */
  --accent: rgb(93, 173, 226);        /* Sky blue main accent */
  --accent-hover: rgb(52, 152, 219);  /* Hover sky blue */
  --text-dark: #0f172a;     /* Near black */
  --text-muted: #475569;    /* Medium slate gray */
  --text-light: #f8fafc;    /* Clean off-white */
  --bg-light: #f8fafc;      /* Light gray background */
  --bg-card: #ffffff;       /* Pure white card */
  --border-color: #e2e8f0;  /* Soft border border */
  
  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Grid details */
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--accent);
  margin-top: 8px;
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

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

/* Navigation Bar */
.navbar {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 0;
  color: var(--text-light);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: padding var(--transition-normal), background-color var(--transition-normal);
}

.navbar.shrunk {
  padding: 0.75rem 0;
  background-color: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-md);
}

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

.navbar-brand h3 {
  color: var(--text-light);
  margin-bottom: 0;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.navbar-brand span {
  color: var(--accent);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent);
}

#mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition-fast);
}

#mobile-menu-toggle:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  #mobile-menu-toggle {
    display: block;
  }

  .navbar-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    gap: 1.25rem;
  }

  .navbar-nav.active {
    display: flex;
  }

  .nav-item-whatsapp {
    width: 100%;
    margin-top: 0.5rem;
  }

  .nav-item-whatsapp .button {
    width: 100%;
  }
}

/* Button Component */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background-color: var(--accent);
  color: var(--primary);
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.button:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-outline {
  background-color: transparent;
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.3);
}

.button-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border-color: var(--text-light);
}

.button-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-light);
}

.button-primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--text-light);
}

/* Hero Section */
#hero {
  position: relative;
  min-height: 90vh;
  background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.85)), 
              url('https://lh3.googleusercontent.com/NG4eRqkxnwWKib73j4tGETCoNQn4rPtJL-N_S2Gq5V7XGPUZT4TWyrDkdA4eVhklBEbQUArUf9AgCwnJRbwivIEGFvhx7JEC_xJzD3GOwVqHnPWyGrpzARXh_9AZ0Q=w1620-rw-v1-e365') no-repeat center center/cover;
  display: flex;
  align-items: center;
  color: var(--text-light);
  padding-top: 80px;
}

#hero h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 800px;
}

#hero p {
  font-size: 1.25rem;
  color: rgba(248, 250, 252, 0.85);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

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

/* Scroll Down Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-family: var(--font-headings);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator .wheel {
  width: 4px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 15px); }
}

/* Service Detail Hero */
#service-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  color: var(--text-light);
  padding-top: 100px;
  margin-bottom: 3rem;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#service-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.85));
  z-index: 1;
}

#service-hero .container {
  position: relative;
  z-index: 2;
}

#service-hero h1 {
  color: var(--text-light);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

#service-hero p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  font-size: 1.15rem;
  margin-bottom: 0;
}

/* Sections General */
section {
  padding: 6rem 0;
}

section.bg-alt {
  background-color: #f1f5f9;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-images img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

.about-images img:hover {
  transform: scale(1.03);
}

.about-images img.offset-down {
  transform: translateY(2rem);
}

.about-images img.offset-down:hover {
  transform: translateY(2rem) scale(1.03);
}

@media (max-width: 576px) {
  .about-images img {
    height: 200px;
  }
}

/* Cards & Services */
.services-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(93, 173, 226, 0.4);
}

.card-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.card:hover .card-title {
  color: var(--accent-hover);
}

.card-subcopy {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-action {
  margin-top: auto;
}

/* Reviews Section */
#check {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-light);
  text-align: center;
  position: relative;
  overflow: hidden;
}

#check::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(var(--accent), transparent 70%);
  top: -150px;
  right: -150px;
  opacity: 0.15;
}

#check h2 {
  color: var(--text-light);
}

.reviews-container {
  max-width: 800px;
  margin: 3rem auto 0 auto;
}

.review-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
  text-align: left;
}

.review-stars {
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.review-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
}

.review-author {
  margin-top: 1.5rem;
  font-family: var(--font-headings);
  font-weight: 600;
  color: var(--accent);
}

.review-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

.checkatrade-logo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #ffffff;
  color: #1b4b72;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.checkatrade-logo-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: #1b4b72;
  text-decoration: none;
}

.checkatrade-logo-btn span {
  color: #e30613;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-method {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(93, 173, 226, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-method h4 {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.contact-method p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.contact-method a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Forms and Inputs */
form {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 576px) {
  .form-group-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.15);
}

/* Native Form Validation styling */
.form-control:user-valid:not(:placeholder-shown) {
  border-color: #10b981;
}

.form-control:user-invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  background-color: #fef2f2;
}

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

/* Success State styling */
.form-success-message {
  display: none;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  font-family: var(--font-headings);
}

.form-success-message h4 {
  color: #065f46;
  margin-bottom: 0.5rem;
}

.form-success-message p {
  color: #047857;
  margin-bottom: 0;
}

/* Footer styling */
footer {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.footer-brand h3 {
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.footer-brand h3 span {
  color: var(--accent);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}

.footer-links h4 {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
  margin-top: 6px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-certs {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-certs img {
  max-width: 70px;
  height: auto;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  background-color: white;
  padding: 8px;
  border-radius: 8px;
}

.footer-certs img:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: transform var(--transition-normal);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
}

.whatsapp-float img {
  width: 32px;
  height: 32px;
}

/* Service Content Details layout */
.service-details-container {
  padding: 2rem 0 6rem 0;
}

.service-layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 992px) {
  .service-layout-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.service-content-main h2 {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.service-content-main h2:first-of-type {
  margin-top: 0;
}

.service-content-main ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.service-content-main ul li {
  margin-bottom: 0.5rem;
}

.service-image-showcase {
  margin: 2.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 400px;
}

.service-image-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.sidebar-box h4 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.sidebar-box h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--accent);
  margin-top: 6px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: #f8fafc;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-dark);
  border: 1px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
  background-color: rgba(93, 173, 226, 0.08);
  color: var(--accent-hover);
  border-color: rgba(93, 173, 226, 0.2);
}

.sidebar-menu a::after {
  content: '→';
  font-weight: bold;
}

/* ==========================================================================
   SCROLL-DRIVEN ANIMATIONS
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-in {
      from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
    
    @keyframes reveal-out {
      from {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      to {
        opacity: 0;
        transform: translateY(-40px) scale(0.96);
      }
    }

    /* Apply reveal-in animation on elements as they enter/exit view */
    .scroll-reveal {
      animation: reveal-in auto linear backwards;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
    
    .card-grid-reveal > * {
      animation: reveal-in auto linear backwards;
      animation-timeline: view();
      animation-range: entry 5% cover 25%;
    }
  }
}

/* Fallback class added via IntersectionObserver if scroll-timeline is not supported */
.scroll-reveal-fallback {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-fallback.revealed {
  opacity: 1;
  transform: translateY(0);
}
