/* =========================================================
   Casa Mia Home - BASE CSS (from current top.css)
   共通：Reset / Layout / Topbar / Header / Nav / Footer / Responsive
   ========================================================= */

:root{
  --bg:#ffffff;
  --text:#111;
  --muted:#666;
  --line:#e8e8e8;
  --dark:#111;
  --dark2:#1b1b1b;
  --card:#f6f6f6;
  --radius:16px;
  --max:1100px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans",
               "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  font-size: 16px;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; display:block; }

/* 現行CSSに合わせて container は 860px を優先 */
.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
  max-width: 860px;
}

/* =========================
   Top bar
   ========================= */
.topbar{
  background:#2a2a2a;
  color:#fff;
  font-size:16px;
  letter-spacing:.02em;
}
.topbar .inner{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  height:34px;
}

/* Topbar social icons */
.topbar-social{
  position:absolute;
  right:10px;
  display:flex;
  gap:8px;
}
.topbar-social a{
  width:22px;
  height:22px;
  border-radius:4px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.topbar-social img{
  width:100%;
  height:100%;
  display:block;
  opacity:.9;
}
.topbar-social a:hover img{
  opacity:1;
}

/* =========================
   Header (logo + nav + hamburger)
   ========================= */
.site-header{
  border-bottom:1px solid var(--line);
  background:#fff;
  position:sticky;
  top:0;
  z-index:50;
}

.header-inner{
  display:flex;
  align-items:center;
  gap:16px;
  padding:14px 0;
  position:relative;
}

/* Logo */
.brand{ margin:0; min-width:210px; }
.brand-link{ display:inline-flex; align-items:center; }
.brand-logo{
  height:40px;
  width:auto;
  display:block;
}

/* Desktop Nav (center) */
.site-nav{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  flex-wrap:wrap;
  font-size:14px;
  font-weight:600;
}
.site-nav a{
  padding:6px 4px;
  border-bottom:2px solid transparent;
  font-size: 1.3em;
  font-weight: normal;
}
.site-nav a:hover{ border-bottom-color:#111; }

/* Phone block inside nav (mobile only) */
.nav-phone{ display:none; }

/* Hamburger button */
.nav-toggle{
  display:none; /* PCでは非表示（後で@mediaで表示） */
  width:42px;
  height:42px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  cursor:pointer;

  /* 3本を縦に並べる */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;

  padding:0;
  margin-left:auto;
}
.nav-toggle-bar{
  display:block;
  width:22px;
  height:2px;
  background:#111;
  border-radius:2px;
}

/* PC右側の電話表示 */
.header-right{
  min-width: 150px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.header-right .tel{
  font-size:14px;
  color:#111;
  font-weight:800;
}

/* =========================
   Mobile overlay (menu open)
   ========================= */
.nav-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:40;
}
.nav-overlay.is-active{
  opacity:1;
  pointer-events:auto;
}

/* =========================
   Footer
   ========================= */
footer{
  background:var(--dark2);
  color:#fff;
  margin-top:20px;
}

.footer-top{
  padding:22px 0;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.footer-top .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

/* brand（後半の定義を採用して統合） */
.footer-brand{
  display:flex;
  align-items:center;
  gap:18px;
}

/* logo */
.footer-logo{
  height:32px;
  width:auto;
  display:block;
  opacity:.95;
}
.footer-logo:hover{ opacity:1; }

/* links */
.footer-links{
  display:flex;
  gap:22px;
  font-weight:700;
  font-size:15px;
  opacity:.95;
}

/* sns icons */
.footer-social{
  display:flex;
  align-items:center;
  gap:14px;
}
.footer-social img{
  width:22px;
  height:22px;
  display:block;
  opacity:.9;
  transition: opacity .15s ease, transform .15s ease;
}
.footer-social a:hover img{
  opacity:1;
  transform: translateY(-1px);
}

.footer-bottom{
  padding:16px 0 22px;
  font-size15px;
  background: #fff;
  color: #000;
}
.footer-bottom .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
/* コピーライトを一番下へ */
.footer-bottom .row > div:first-child{
  order:2;
  font-size:14px;
  opacity:.7;
}
.footer-legal{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  order:1;
}
.footer-legal a{ opacity:.85; }
.footer-legal a:hover{ opacity:1; }

.lang{
    margin-bottom: 1em;
    display: flex;
    padding-left: 10px;
}
.lang li{
    list-style-type: none;
}
.lang li a{
color: #000;
    background: #eaeaea;
    border-radius: 1px;
    margin-right: 10px;
    padding: 0.2em 0.5em;
    font-size: 13px;
}


/* =========================
   Contact cards
   ========================= */
.contact-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}
.contact-card{
  background:#fff;
  border-radius:18px;
  border:1px solid var(--line);
  overflow:hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.contact-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0,0,0,.08);
}
.contact-card .label{
  padding:14px 16px;
  font-weight:900;
  text-align:center;
  letter-spacing:.02em;
  font-size: 20px;
  background: #f6f6f6;
}
.contact-card .thumb{
  aspect-ratio: 4/2;
  overflow: hidden;
  background:#ddd;
}
.contact-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
/* =========================
   Responsive (tablet)
   ========================= */
@media (max-width: 920px){
  .brand{ min-width:auto; }
  .header-inner{ flex-wrap:wrap; }
}

/* =========================
   Responsive (mobile)
   - nav becomes dropdown
   - hamburger appears right
   - phone moves into nav (menu open)
   ========================= */
@media (max-width: 760px){

  /* Desktop right phone hidden on mobile */
  .header-right{ display:none; }

  /* show hamburger */
  .nav-toggle{ display:inline-flex; }

  /* nav dropdown */
  .site-nav{
    position:absolute;
    left:18px;
    right:18px;
    top:100%;
    margin-top:10px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    box-shadow: 0 18px 40px rgba(0,0,0,.10);
    padding:10px;
    display:none;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:0;
    z-index:60;
  }
  .site-nav.is-open{ display:flex; }

  .site-nav a{
    padding:12px 12px;
    border-bottom:1px solid var(--line);
  }

  /* phone block shown only on mobile */
  .nav-phone{
    display:block;
    padding:12px 12px 4px;
    border-top:1px solid var(--line);
  }
  .nav-phone-tel{
    display:inline-block;
    font-weight:900;
    font-size:14px;
    color:#111;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:12px;
    width:100%;
    text-align:center;
  }
  .nav-phone-hours{
    font-size:12px;
    color:var(--muted);
    text-align:center;
  }

  /* link separators */
  .site-nav a:last-of-type{
    border-bottom:none;
    border-bottom:1px solid var(--line);
  }

  .contact-grid{ grid-template-columns:1fr; gap:18px; }
}

/* PCではoverlayを使わない */
@media (min-width: 761px){
  .nav-overlay{ display:none; }
  .nav-toggle{ display:none; }

  .header-right .tel{
    font-size: 1.5em;
  }
  
  .contact-card .thumb{
    aspect-ratio: 4 / 4;
  }
  .contact-card .thumb img{
    transform: scale(1.4);
    object-position: 60% center;
  }
  .contact-grid{
    gap: 25px;
  }
}

/* Footer：480px以下だけスマート版 */
@media (max-width: 480px){

  .footer-top .row{
    flex-direction: column;
    align-items: flex-start;
    gap:14px;
  }

  .footer-brand{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .footer-social{
    gap:12px;
  }
  .footer-social img{
    width:20px;
    height:20px;
  }

  .footer-links{
    width:100%;
    display:flex;
    justify-content:space-between;
    gap:14px;
    flex-wrap:nowrap;
  }

  .footer-links a{
    flex:1;
    text-align:center;
    padding:10px 8px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:12px;
    font-size:13px;
    white-space:nowrap;
  }

  .footer-links a:nth-child(3){
    font-size:12px;
  }
}
