/* Cottenier Website - Mobile-First Emergency UX */

/* ===========================================
   CSS Variables
   =========================================== */
:root {
  /* Primary - Black */
  --color-primary: #0a0a0a;

  /* Action box - Vibrant orange */
  --color-action: #f97316;
  --color-action-hover: #ea580c;

  /* CTA Colors */
  --color-call: #dc2626;
  --color-call-hover: #b91c1c;
  --color-whatsapp: #22c55e;
  --color-whatsapp-hover: #16a34a;

  /* Orange accent */
  --color-orange: #f97316;
  --color-orange-light: #fed7aa;

  /* Neutrals */
  --color-white: #ffffff;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-600: #525252;
  --color-gray-800: #262626;

  /* Fixed heights */
  --header-height: 52px;
  --sticky-height: 60px;

  /* Container width */
  --container-width: 1366px;
}

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

html, body {
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.4;
  color: var(--color-gray-800);
  background: var(--color-primary);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ===========================================
   Mobile Homepage Layout - Viewport Fit
   Using CSS Grid to fill exactly one screen
   =========================================== */
.home-layout {
  display: grid;
  grid-template-rows: var(--header-height) auto minmax(100px, 1fr) auto auto auto var(--sticky-height);
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport for mobile browsers */
}

/* Grid order: header, hero-banner, hero-image, trust-bar, service-grid, action-box, sticky-cta */

/* ===========================================
   Header - Fixed Top Bar
   =========================================== */
.header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: var(--header-height);
  max-width: var(--container-width);
  margin: 0 auto;
}

.header__hamburger {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-orange);
}

.header__lang {
  display: flex;
  gap: 4px;
}

.header__lang a {
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  opacity: 0.5;
}

.header__lang a.active {
  opacity: 1;
  background: var(--color-orange);
  border-radius: 4px;
}

/* Nav Overlay */
.nav-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-primary);
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: 1rem;
}

.nav-overlay.is-open {
  display: flex;
}

.nav-overlay a {
  color: var(--color-white);
  font-size: 1.125rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ===========================================
   Hero Banner
   =========================================== */
.hero-banner {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 1.5rem 1rem;
}

.hero-banner__title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-banner__subtitle {
  font-size: 1rem;
  color: var(--color-orange);
  margin-top: 0.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ===========================================
   Hero Image - Fills available space
   =========================================== */
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

/* ===========================================
   Trust Bar - Google Reviews
   =========================================== */
.trust-bar {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.trust-bar__stars {
  color: #fbbf24;
  font-size: 1rem;
  letter-spacing: 1px;
}

.trust-bar__text {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* ===========================================
   Action Box
   =========================================== */
.action-box {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 1rem;
  display: block;
}

.action-box__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.action-box__subtitle {
  font-size: 0.875rem;
  color: var(--color-orange);
}

.action-box__btn {
  display: inline-block;
  margin-top: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--color-orange);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ===========================================
   Service Grid - 2x2
   =========================================== */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.service-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-transform: uppercase;
  line-height: 1.3;
  min-height: 90px;
}

/* Tile colors - all black with orange text */
.service-tile:nth-child(1) {
  background: var(--color-primary);
  color: var(--color-orange);
}
.service-tile:nth-child(2) {
  background: var(--color-primary);
  color: var(--color-orange);
  border-left: 1px solid #222;
}
.service-tile:nth-child(3) {
  background: var(--color-primary);
  color: var(--color-orange);
  border-top: 1px solid #222;
}
.service-tile:nth-child(4) {
  background: var(--color-primary);
  color: var(--color-orange);
  border-top: 1px solid #222;
  border-left: 1px solid #222;
}

/* ===========================================
   Sticky CTA - Bottom Bar
   =========================================== */
.sticky-cta {
  display: flex;
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.sticky-cta__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-white);
}

.sticky-cta__btn--call {
  background: var(--color-call);
}

.sticky-cta__btn--whatsapp {
  background: var(--color-whatsapp);
}

.sticky-cta__btn svg {
  width: 18px;
  height: 18px;
}

/* ===========================================
   Below Fold Content (scrollable)
   =========================================== */
.section {
  padding: 1.5rem 1rem;
}

.section--gray {
  background: var(--color-gray-100);
}

.section__title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

/* ===========================================
   Footer
   =========================================== */
.footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1.5rem 1rem;
  padding-bottom: calc(1.5rem + var(--sticky-height));
}

.footer__inner {
  max-width: var(--container-width);
  margin: 0 auto;
}

.footer__content {
  display: block;
}

.footer__info p {
  font-size: 0.8125rem;
  opacity: 0.85;
  margin-bottom: 0.375rem;
}

.footer a {
  color: inherit;
}

.footer__cta {
  display: none;
}

.footer__whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-whatsapp);
  color: var(--color-white);
  padding: 0.875rem 1.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}

.footer__whatsapp-btn:hover {
  background: var(--color-whatsapp-hover);
}

.footer__whatsapp-btn svg {
  width: 20px;
  height: 20px;
}

.footer__call-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-white);
  font-size: 0.875rem;
  opacity: 0.9;
}

.footer__call-link:hover {
  opacity: 1;
}

.footer__bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer__bottom p {
  font-size: 0.75rem;
  opacity: 0.6;
  margin: 0;
}

/* ===========================================
   Inner Pages
   =========================================== */
.page-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
}

.page-layout .main {
  flex: 1;
  padding: 1rem;
  margin-top: var(--header-height);
}

.page-layout .main h1 {
  font-size: 1.375rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.page-layout .main h2 {
  font-size: 1.125rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--color-primary);
}

.page-layout .main p {
  margin-bottom: 0.75rem;
  color: var(--color-gray-800);
  font-size: 0.9375rem;
}

.page-layout .main ul,
.page-layout .main ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-gray-800);
}

.page-layout .main li {
  margin-bottom: 0.375rem;
}

.page-layout .main a {
  color: var(--color-action);
}

.page-layout .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.page-layout .footer {
  margin-top: auto;
}

/* Service cards */
.services {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 6px;
  padding: 1rem;
}

.service-card__title {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.service-card__description {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  margin-bottom: 0.5rem;
}

.service-card__link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-action);
}

/* Trust */
.trust {
  text-align: center;
  padding: 0.75rem;
}

.trust__rating {
  font-size: 1.125rem;
  color: #eab308;
}

.trust__count {
  font-size: 0.75rem;
  color: var(--color-gray-600);
}

/* ===========================================
   Larger Phones (400px+)
   =========================================== */
@media (min-height: 750px) {
  .hero-banner {
    padding: 2rem 1rem;
  }

  .hero-banner__title {
    font-size: 1.75rem;
  }

  .hero-banner__subtitle {
    font-size: 1rem;
    margin-top: 0.5rem;
  }

  .trust-bar {
    padding: 1rem;
  }

  .trust-bar__stars {
    font-size: 1.125rem;
  }

  .trust-bar__text {
    font-size: 0.875rem;
  }

  .service-tile {
    min-height: 100px;
    font-size: 1rem;
    padding: 1.5rem;
  }

  .action-box {
    padding: 2rem 1rem;
  }

  .action-box__title {
    font-size: 1.125rem;
  }

  .action-box__subtitle {
    font-size: 0.9375rem;
  }

  .sticky-cta__btn {
    font-size: 1rem;
  }
}

/* ===========================================
   Tablet (768px+)
   =========================================== */
@media (min-width: 768px) {
  :root {
    --header-height: 70px;
  }

  /* Homepage layout - block instead of grid */
  .home-layout {
    display: block;
    min-height: auto;
  }

  /* Header - horizontal nav */
  .header__inner {
    padding: 0 2rem;
  }

  .header__hamburger {
    display: none;
  }

  /* Desktop navigation - always visible */
  .nav-overlay {
    display: flex !important;
    position: static;
    background: transparent;
    flex-direction: row;
    padding: 0;
    gap: 0.25rem;
    flex: 1;
    justify-content: flex-start;
    margin-left: 2rem;
  }

  .nav-overlay a {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-bottom: none;
    color: var(--color-white);
    opacity: 0.8;
    transition: opacity 0.2s;
    white-space: nowrap;
  }

  .nav-overlay a:hover {
    opacity: 1;
  }

  /* Hero section - side by side with container */
  .hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 450px;
    max-width: var(--container-width);
    margin: 0 auto;
  }

  .hero-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    text-align: left;
  }

  .hero-banner__title {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .hero-banner__subtitle {
    font-size: 1.125rem;
    margin-top: 0.75rem;
  }

  .hero-image {
    height: 450px;
    object-fit: cover;
    filter: grayscale(100%);
  }

  /* Trust bar with container */
  .trust-bar {
    padding: 1rem 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
  }

  .trust-bar__stars {
    font-size: 1.125rem;
  }

  .trust-bar__text {
    font-size: 0.9375rem;
  }

  /* Service grid - 4 columns with container */
  .service-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    max-width: var(--container-width);
    margin: 0 auto;
  }

  .service-tile {
    min-height: 120px;
    font-size: 0.9375rem;
    padding: 1.5rem 1rem;
  }

  /* Reset borders for 4-col layout */
  .service-tile:nth-child(1),
  .service-tile:nth-child(2),
  .service-tile:nth-child(3),
  .service-tile:nth-child(4) {
    border: none;
    border-right: 1px solid #222;
  }

  .service-tile:nth-child(4) {
    border-right: none;
  }

  /* Action box with container */
  .action-box {
    padding: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
  }

  .action-box__title {
    font-size: 1.25rem;
  }

  .action-box__btn {
    margin-top: 0.75rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
  }

  /* Sticky CTA - hide on desktop */
  .sticky-cta {
    display: none;
  }

  /* Footer with container - no extra padding needed since sticky CTA is hidden */
  .footer {
    padding: 3rem 2rem;
  }

  .footer__content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
  }

  .footer__info p {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .footer__cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
  }

  .footer__whatsapp-btn {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
  }

  .footer__whatsapp-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Inner pages */
  .page-layout .main {
    margin-top: var(--header-height);
    padding: 2.5rem 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .page-layout .main h1 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
  }

  .page-layout .main h2 {
    font-size: 1.25rem;
    margin: 1.75rem 0 0.625rem;
  }

  .page-layout .main p,
  .page-layout .main ul,
  .page-layout .main ol {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Service cards grid - 2 columns */
  .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .service-card {
    padding: 1.25rem;
  }

  .service-card__title {
    font-size: 1rem;
  }

  .service-card__description {
    font-size: 0.875rem;
  }
}

/* ===========================================
   Desktop (1024px+)
   =========================================== */
@media (min-width: 1024px) {
  .header {
    padding: 0 3rem;
  }

  .nav-overlay a {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  .hero-section {
    min-height: 500px;
  }

  .hero-banner {
    padding: 4rem;
  }

  .hero-banner__title {
    font-size: 3rem;
  }

  .hero-banner__subtitle {
    font-size: 1.25rem;
    margin-top: 1rem;
  }

  .hero-image {
    height: 500px;
  }

  .service-tile {
    min-height: 140px;
    font-size: 1rem;
    padding: 2rem 1.5rem;
  }

  .action-box {
    padding: 2.5rem;
  }

  .action-box__title {
    font-size: 1.5rem;
  }

  .page-layout .main {
    padding: 3rem 2rem;
    max-width: 960px;
  }

  .page-layout .main h1 {
    font-size: 2.25rem;
  }
}

/* ===========================================
   Large Desktop (1200px+)
   =========================================== */
@media (min-width: 1200px) {
  .header {
    padding: 0 4rem;
  }

  .nav-overlay a {
    padding: 0.5rem 1.25rem;
  }

  .hero-section {
    min-height: 550px;
  }

  .hero-banner {
    padding: 5rem;
  }

  .hero-banner__title {
    font-size: 3.5rem;
  }

  .hero-image {
    height: 550px;
  }

  .service-tile {
    min-height: 160px;
    font-size: 1.0625rem;
  }

  .page-layout .main {
    max-width: 1000px;
    padding: 3.5rem 2rem;
  }

  .page-layout .main h1 {
    font-size: 2.5rem;
  }

  .page-layout .main h2 {
    font-size: 1.375rem;
  }
}
