/* ==========================================================
   Kenchikuya — Global Styles (CSS rewrite)
   - Organized, DRY, responsive, and GoDaddy-linter friendly
   - Keeps existing class hooks used across templates
   - Grid with flexbox fallback for older parsers
   ========================================================== */

/* ----------------------------------------------------------
   0) Root variables & reset
----------------------------------------------------------- */
:root{
  --brand-teal: #00BCD4;
  --brand-teal-dark: #0097A7;
  --accent: #FF5722;
  --ink: #333333;
  --muted-ink: #555555;
  --bg: #fafafa;
  --card: #ffffff;
  --soft: #f5f5f5;
  --line: #dddddd;
  --nav-ink: #ffffff;
  --nav-bg: var(--brand-teal);
  --link: var(--brand-teal);
  --link-hover: var(--brand-teal-dark);
  --shadow-1: 0 2px 6px rgba(0,0,0,0.08);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.12);
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --max-w-narrow: 800px;
  --max-w: 1200px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3{
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0 0 .5em 0;
}

p { margin: 0 0 1em 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----------------------------------------------------------
   1) Navigation
----------------------------------------------------------- */
nav{
  background: var(--nav-bg);
  color: var(--nav-ink);
  padding: var(--space-4);
}
nav a{
  color: var(--nav-ink);
  margin-right: var(--space-4);
}
nav a:hover{ text-decoration: underline; }

.logo-container{ display: flex; align-items: center; padding: .5em; margin: 0 1em; }
.logo-img{ width: 100px; height: auto; margin-right: 1em; }
@media (max-width: 768px){ .logo-img{ width: 50px; } }
@media (max-width: 480px){ .logo-img{ width: 30px; } }

.business-name{
  font-family: 'Brush Script MT', cursive;
  font-size: 3.5em; margin: 0;
}
@media (max-width: 768px){ .business-name{ font-size: 20px; } }
@media (max-width: 480px){ .business-name{ font-size: 16px; } }

/* Dropdown */
.dropdown{ position: relative; display: inline-block; }
.dropbtn{
  background: transparent; color: var(--nav-ink); border: 0;
  cursor: pointer; font-size: inherit; padding: 0 10px;
}
.dropdown-content{
  display: none; position: absolute; background: #f9f9f9; min-width: 220px;
  box-shadow: var(--shadow-2); z-index: 3; border-radius: var(--radius-s); overflow: hidden;
}
.dropdown-content a{
  color: var(--ink); padding: 12px 16px; display: block;
}
.dropdown-content a:hover{ background: #f1f1f1; }
.dropdown:hover .dropdown-content{ display: block; }
.dropdown:hover .dropbtn{ color: var(--brand-teal); }

/* Small sticker label */
.sticker{
  background: var(--accent); color: #fff; font-size: .75rem;
  padding: 2px 6px; border-radius: 3px; margin-left: 5px; vertical-align: middle;
}

/* ----------------------------------------------------------
   2) Buttons
----------------------------------------------------------- */
button, .cta-button, .contact-button{
  background: var(--brand-teal); color: #fff; border: 0;
  padding: .75em 1.5em; font-size: 1em; cursor: pointer;
  border-radius: var(--radius-s);
  transition: background-color .25s ease, transform .05s ease;
  text-decoration: none; display: inline-block;
}
button:hover, .cta-button:hover, .contact-button:hover{
  background: var(--brand-teal-dark); text-decoration: underline;
}
button:active, .cta-button:active, .contact-button:active{
  transform: translateY(1px);
}
.contact-button{
  background: #004080; font-weight: 700;
}
.contact-button:hover{ background: #0059b3; }

/* ----------------------------------------------------------
   3) Forms
----------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="time"], textarea, .form-control{
  width: 100%; margin-bottom: 1em; padding: .6em .75em;
  border: 1px solid #ccc; border-radius: var(--radius-s); background: #fff;
}
textarea{ min-height: 140px; resize: vertical; }
.error{ color: #d00; font-size: .85rem; margin-top: .25rem; }
.recaptcha{ margin: 1rem 0; }

/* ----------------------------------------------------------
   4) Flash Messages
----------------------------------------------------------- */
.flash-messages{
  background: #ffeb3b; padding: 1em; margin: 1em 0; border-radius: var(--radius-s);
}
.flash-messages ul{ list-style: none; margin: 0; padding: 0; }
.flash-messages li{ margin: .2em 0; }

/* ----------------------------------------------------------
   5) Home
----------------------------------------------------------- */
.home-container{
  background-image: url('../images/background/bg_2.webp');
  background-size: cover; background-position: center; background-attachment: fixed;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; position: relative; color: #fff; text-align: center;
}
.home-container::before{
  content: ""; position: absolute; inset: 0; background: rgba(3,126,240,.5); z-index: 1;
}
.home-container > *{ position: relative; z-index: 2; max-width: var(--max-w-narrow); }
.home-container audio{ margin-top: 20px; width: 100%; max-width: 300px; }

/* Ensure home service boxes stay dark-on-light for legibility */
.home-container .service-box{ background: #fff; color: var(--ink); }
.home-container .service-box h2{ color: var(--brand-teal); }

/* ----------------------------------------------------------
   6) Grids: gallery/projects with flex fallback
----------------------------------------------------------- */
.container, .gallery-container, .projects-container, .dynamic-photo-grid{
  max-width: var(--max-w); margin: 2rem auto; padding: 1rem; background: var(--card); color: var(--ink);
  border-radius: var(--radius-m);
}

.dynamic-photo-grid h2, .gallery-container h1, .projects-container h1{
  text-align: center; margin-bottom: 1.5rem; color: var(--brand-teal);
}

/* Primary grid */
.photo-grid, .gallery-grid, .projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

/* Flex fallback for older parsers/linters */
@supports not (display: grid){
  .photo-grid, .gallery-grid, .projects-grid{
    display: flex; flex-wrap: wrap; gap: 1rem;
  }
  .photo-grid > *, .gallery-grid > *, .projects-grid > *{
    flex: 1 1 260px; min-width: 260px;
  }
}

.photo-item, .gallery-item, .project-card{
  background: var(--soft); border-radius: var(--radius-m); overflow: hidden; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease; box-shadow: var(--shadow-1);
}
.photo-item img, .gallery-item img, .project-card img{
  width: 100%; height: auto; display: block; aspect-ratio: 4/3; object-fit: cover;
}
.project-card:hover, .gallery-item:hover{ transform: translateY(-4px); box-shadow: var(--shadow-2); }

/* Figure caption (used in services gallery) */
figure.gallery-item{ margin: 0; }
figure.gallery-item figcaption{ padding: .5rem .75rem; font-size: .9rem; color: var(--muted-ink); }

/* ----------------------------------------------------------
   7) About & Bio pages
----------------------------------------------------------- */
.about-container {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 2rem;
  background: var(--card);
  color: var(--ink);
}
.about-container h2 { color: var(--brand-teal); margin-top: 1.5rem; }
.about-container a { color: var(--brand-teal); }
.about-container a:hover { text-decoration: underline; }

/* Hero */
.about-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.about-photo img {
  width: 320px; height: 320px;
  object-fit: cover;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}
@media (max-width: 720px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-photo img { width: 100%; height: auto; }
}

/* Why choose us */
.why-choose-us { list-style: disc; margin-left: 1.5rem; }
.why-choose-us li { margin: .5rem 0; }

/* Bio alternating rows */
.about-section { padding: 80px 20px; }
.about-section + .about-section { margin-top: 40px; }
.section-1-bg { background: #f0f8ff; }
.section-2-bg { background: #ffffff; }
.section-3-bg { background: #f9f9f9; }

.section-1-content,
.section-2-content,
.section-3-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 1200px;
  width: 100%;
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}
.section-1-content { flex-direction: row-reverse; }
.section-2-content { flex-direction: row; }
.section-3-content { flex-direction: row-reverse; }

/* Shared column sizing */
.section-1-content .image-wrapper,
.section-2-content .image-wrapper,
.section-3-content .image-wrapper {
  flex: 1 1 360px;
  max-width: 520px;
}
.section-1-content .text-wrapper,
.section-2-content .text-wrapper,
.section-3-content .text-wrapper {
  flex: 1 1 420px;
  max-width: 680px;
}

/* Photo presentation */
.image-wrapper img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: #fff;
}

/* Section 1 photo — smaller by default */
.section-1-content .image-wrapper {
  flex: 1 1 350px;
  max-width: 420px;
  height: 400px;
}
.section-1-content .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

/* Shapes */
.circle-shape img { aspect-ratio: 1 / 1; border-radius: 50%; }
.square-shape img { aspect-ratio: 1 / 1; border-radius: var(--radius-l); }

/* Responsive stack */
@media (max-width: 900px) {
  .section-1-content,
  .section-2-content,
  .section-3-content {
    flex-direction: column !important;
    text-align: left;
  }
  .section-1-content .image-wrapper,
  .section-2-content .image-wrapper,
  .section-3-content .image-wrapper,
  .section-1-content .text-wrapper,
  .section-2-content .text-wrapper,
  .section-3-content .text-wrapper {
    max-width: 720px;
  }
}

/* Bio button — always visible text */
.bio-button,
a.cta-button,
a.contact-button {
  color: #fff !important;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25); /* readability */
}


/* ----------------------------------------------------------
   8) Services page
----------------------------------------------------------- */
.services-container{
  max-width: 900px; margin: 0 auto; padding: 2rem; background: #f1f1f1; color: var(--ink);
  border-radius: var(--radius-m);
}
.service-section{
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line);
}
.service-section h2{ color: var(--brand-teal); font-size: 1.6rem; }
.service-section h3{ font-size: 1.2rem; margin-top: 1rem; }

.service-overview{
  display: flex; flex-wrap: wrap; justify-content: space-around; gap: 1.5rem; margin: 2rem 0;
}
.service-box{
  flex: 1 1 45%; background: #f9f9f9; border: 1px solid var(--line); padding: 1.5rem;
  box-shadow: var(--shadow-1); border-radius: var(--radius-m); transition: transform .2s ease, box-shadow .2s ease;
}
.service-box:hover{ transform: translateY(-5px); box-shadow: var(--shadow-2); }
.service-box h2{ color: var(--brand-teal); font-size: 1.5rem; }

/* ----------------------------------------------------------
   9) Contact / Testimonials / Policy
----------------------------------------------------------- */
.contact-container, .testimonials-container, .policy-container{
  max-width: var(--max-w-narrow); margin: 0 auto; padding: 2rem; background: var(--card);
  border-radius: var(--radius-m);
}

/* ----------------------------------------------------------
   10) Footer
----------------------------------------------------------- */
footer{
  background: #333; color: #fff; padding: 1.5rem 0; margin-top: 2rem;
}
.footer-container{ max-width: var(--max-w); margin: 0 auto; padding: 1rem; }
.footer-top{ display: flex; align-items: flex-start; margin-bottom: 1rem; }
.footer-left{ margin-right: 1.5rem; }
.footer-logo{ width: 80px; height: auto; }
.footer-info a{ color: #fff; text-decoration: underline; }
.footer-info a:hover{ text-decoration: none; }
.footer-nav, .footer-mid, .footer-bottom{ text-align: center; margin-bottom: 1rem; }
.footer-nav a, .footer-mid a{ color: #fff; text-decoration: underline; margin: 0 .5rem; }
.footer-nav a:hover, .footer-mid a:hover{ text-decoration: none; }
.footer-bottom p{ font-size: .9rem; margin: 0; }
@media (max-width: 600px){
  .footer-top{ flex-direction: column; align-items: center; text-align: center; }
  .footer-left{ margin-right: 0; margin-bottom: .5rem; }
}

/* ----------------------------------------------------------
   11) Utilities
----------------------------------------------------------- */
.hidden{ display: none !important; }
.center{ text-align: center; }
.m-0{ margin: 0 !important; }
.mt-1{ margin-top: var(--space-2) !important; }
.mt-2{ margin-top: var(--space-4) !important; }
.mt-3{ margin-top: var(--space-5) !important; }
.mb-0{ margin-bottom: 0 !important; }
.mb-1{ margin-bottom: var(--space-2) !important; }
.mb-2{ margin-bottom: var(--space-4) !important; }
.mb-3{ margin-bottom: var(--space-5) !important; }
.p-0{ padding: 0 !important; }
.p-1{ padding: var(--space-2) !important; }
.p-2{ padding: var(--space-4) !important; }
.p-3{ padding: var(--space-5) !important; }

/* Accessibility: focus ring */
:focus-visible{
  outline: 2px dashed var(--brand-teal);
  outline-offset: 2px;
}
