/* ===== Toscanacasa Hammamet — theme tokens ===== */
:root{
  --green: #1e9747;
  --green-dark: #146334;
  --green-light: #59c98a;
  --wine: #662047;
  --wine-dark: #4a1734;
  --wine-light: #8a3468;
  --gold: #e0ad55;
  --cream: #fdf9f0;
  --sand: #f6e9d3;
  --sand-dark: #e7d6b3;
  --ink: #2b2420;
  --ink-soft: #5c4a3a;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(43,36,32,0.10);
  --shadow-lg: 0 20px 50px rgba(43,36,32,0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --ff-head: "Poppins", "Segoe UI", sans-serif;
  --ff-body: "Inter", "Segoe UI", sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; overflow-x: hidden; width:100%; }
body{
  margin:0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  width:100%;
  position:relative;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family: var(--ff-head); margin:0 0 .5em; line-height:1.15; font-weight:700; color: var(--wine-dark); }
p{ margin:0 0 1em; color: var(--ink-soft); }
.container{ width:100%; max-width:1180px; margin:0 auto; padding:0 24px; }
section{ padding: 96px 0; }
.section-tag{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.8rem; letter-spacing:.14em; text-transform:uppercase;
  font-weight:700; color: var(--green);
  background: rgba(30,151,71,.09); padding:6px 14px; border-radius:999px;
  margin-bottom:16px;
}
.section-head{ max-width: 640px; margin: 0 auto 56px; text-align:center; }
.section-head h2{ font-size: clamp(1.7rem, 3vw, 2.5rem); }
.section-head p{ font-size:1.05rem; }
.section-head.left{ text-align:left; margin-left:0; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 14px 28px; border-radius: 999px; font-weight:600; font-size:.95rem;
  border: 2px solid transparent; cursor:pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary{ background: var(--wine); color: var(--white); box-shadow: var(--shadow); }
.btn-primary:hover{ background: var(--wine-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline{ border-color: var(--white); color: var(--white); }
.btn-outline:hover{ background: var(--white); color: var(--wine); transform: translateY(-2px); }
.btn-ghost{ border-color: var(--wine); color: var(--wine); background: transparent; }
.btn-ghost:hover{ background: var(--wine); color:var(--white); }
.btn-green{ background: var(--green); color:var(--white); box-shadow: var(--shadow); }
.btn-green:hover{ background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-sm{ padding: 10px 20px; font-size:.85rem; }
.btn svg{ width:18px; height:18px; }
.btn:disabled{ opacity:.65; cursor:not-allowed; transform:none !important; }

/* ===== Header / Nav ===== */
.site-header{
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  background: rgba(253,249,240,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(102,32,71,0.08);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled{ box-shadow: 0 6px 24px rgba(43,36,32,.08); }
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px; max-width:1180px; margin:0 auto;
}
.brand{ display:flex; align-items:center; }
.brand img{ height:58px; width:auto; }

.nav-links{ display:flex; align-items:center; gap:6px; }
.nav-links a{
  padding:10px 16px; font-weight:600; font-size:.92rem; border-radius:999px; color:var(--ink);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover, .nav-links a.active{ background: rgba(30,151,71,.1); color: var(--green-dark); }

.nav-actions{ display:flex; align-items:center; gap:10px; }
.lang-toggle{
  display:flex; border:1.5px solid var(--wine); border-radius:999px; overflow:hidden;
  font-family: var(--ff-head); font-size:.78rem; font-weight:700;
}
.lang-toggle button{
  padding:7px 13px; background:transparent; border:0; cursor:pointer; color: var(--wine);
  transition: background .2s ease, color .2s ease;
}
.lang-toggle button.active{ background: var(--wine); color:var(--white); }

.nav-toggle{
  display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:8px;
}
.nav-toggle span{ width:26px; height:3px; background: var(--wine); border-radius:3px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity:0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* ===== Hero ===== */
.hero{
  position:relative; padding-top: 168px; padding-bottom: 90px;
  background: linear-gradient(180deg, #fdf7ec 0%, #f6e9d3 100%);
  overflow:hidden;
}
.hero .container{ display:grid; grid-template-columns: .8fr 1.2fr; gap:48px; align-items:center; max-width:1320px; }
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px; background: rgba(102,32,71,.08); color: var(--wine);
  padding:7px 16px; border-radius:999px; font-size:.8rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  margin-bottom: 20px;
}
.hero h1{ font-size: clamp(2.2rem, 4.4vw, 3.4rem); color: var(--wine-dark); }
.hero h1 em{ font-style:normal; color: var(--green); }
.hero p.lead{ font-size:1.12rem; max-width:520px; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:14px; margin-top:30px; }
.hero-stats{ display:flex; gap:32px; margin-top:48px; flex-wrap:wrap; }
.hero-stats div strong{ display:block; font-family:var(--ff-head); font-size:1.7rem; color: var(--wine); font-variant-numeric: tabular-nums; }
.hero-stats div span{ font-size:.82rem; color:var(--ink-soft); font-weight:600; }
.hero-media{ position:relative; }
.hero-media img{
  width:100%; height: clamp(440px, 38vw, 680px); object-fit:cover;
  border-radius: 28px; box-shadow: var(--shadow-lg);
}
.hero-media .float-badge{
  position:absolute; bottom:-22px; left:-22px; background:var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding:16px 20px; display:flex; align-items:center; gap:12px; max-width:300px;
}
.hero-media .float-badge .ic{ width:44px; height:44px; border-radius:12px; background: var(--green); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.hero-media .float-badge .ic svg{ width:24px; height:24px; stroke:var(--white); }
.hero-media .float-badge strong{ display:block; font-size:.95rem; color:var(--wine-dark); }
.hero-media .float-badge span{ font-size:.78rem; color:var(--ink-soft); }

/* ===== Trust strip ===== */
.trust-strip{ background: var(--wine); padding: 18px 0; }
.trust-strip .container{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:16px; }
.trust-strip span{ color: rgba(255,255,255,.92); font-size:.86rem; font-weight:600; display:flex; align-items:center; gap:8px; }
.trust-strip svg{ width:18px; height:18px; stroke: var(--gold); flex-shrink:0; }

/* ===== About ===== */
.about .container{ display:grid; grid-template-columns: .9fr 1.1fr; gap:64px; align-items:center; }
.about-media{ position:relative; text-align:center; }
.about-media img{ max-width:380px; margin:0 auto; filter: drop-shadow(0 22px 36px rgba(43,36,32,.22)); }
.badges{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; margin-top:28px; }
.badge-card{
  background: var(--white); border-radius: var(--radius-sm); padding:18px; box-shadow: var(--shadow);
  display:flex; gap:12px; align-items:flex-start;
}
.badge-card .ic{ width:38px; height:38px; border-radius:10px; background: rgba(30,151,71,.12); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.badge-card .ic svg{ width:20px; height:20px; stroke: var(--green); }
.badge-card strong{ display:block; font-size:.92rem; color:var(--wine-dark); margin-bottom:2px; }
.badge-card p{ font-size:.82rem; margin:0; }
.about-stats{ display:flex; gap:20px; margin-top:8px; flex-wrap:wrap; border-top:1px solid var(--sand-dark); padding-top:26px; }
.about-stats div strong{ display:block; font-family:var(--ff-head); font-size:1.9rem; color:var(--green); font-variant-numeric: tabular-nums; }
.about-stats div span{ font-size:.8rem; color: var(--ink-soft); font-weight:600; }

/* ===== Services ===== */
.service-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:28px; }
.service-card{
  background: var(--white); border-radius: var(--radius); padding: 34px 28px; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease; position:relative; overflow:hidden;
}
.service-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card .num{ position:absolute; top:18px; right:22px; font-family:var(--ff-head); font-weight:700; font-size:2.4rem; color: rgba(102,32,71,.07); }
.service-card .ic{ width:58px; height:58px; border-radius:16px; background: var(--green); display:flex; align-items:center; justify-content:center; margin-bottom:20px; }
.service-card .ic svg{ width:30px; height:30px; stroke: var(--white); }
.service-card:nth-child(2) .ic{ background: var(--wine); }
.service-card:nth-child(3) .ic{ background: var(--gold); }
.service-card h3{ font-size:1.25rem; }
.service-card ul{ margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.service-card ul li{ font-size:.88rem; color: var(--ink-soft); display:flex; align-items:center; gap:8px; }
.service-card ul li::before{ content:""; width:6px; height:6px; border-radius:50%; background: var(--green); flex-shrink:0; }

.property-types{ margin-top:64px; }
.property-types h3{ text-align:center; font-size:1.3rem; margin-bottom:32px; }
.type-strip{ display:grid; grid-template-columns: repeat(5,1fr); gap:18px; }
.type-card{
  background: var(--white); border-radius: var(--radius-sm); padding:24px 14px; text-align:center; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.type-card:hover{ transform: translateY(-4px); }
.type-card .ic{ width:50px; height:50px; margin:0 auto 12px; border-radius:50%; background: rgba(102,32,71,.09); display:flex; align-items:center; justify-content:center; }
.type-card .ic svg{ width:26px; height:26px; stroke: var(--wine); }
.type-card span{ font-size:.85rem; font-weight:700; color: var(--wine-dark); }

/* ===== Listings ===== */
.listings{ background: var(--sand); }
.listing-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:30px; }
.listing-card{
  background: var(--white); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease; display:flex; flex-direction:column;
}
.listing-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.listing-media{ position:relative; }
.listing-media img{ width:100%; height: 210px; object-fit: cover; }
.listing-tag{
  position:absolute; top:14px; left:14px; background: var(--green); color:var(--white);
  padding:6px 14px; border-radius:999px; font-size:.75rem; font-weight:700; letter-spacing:.03em;
}
.listing-price{
  position:absolute; bottom:14px; right:14px; background: var(--wine); color:var(--white);
  padding:8px 16px; border-radius:999px; font-size:.9rem; font-weight:700; box-shadow: var(--shadow);
}
.listing-body{ padding:22px 24px 26px; display:flex; flex-direction:column; gap:10px; flex:1; }
.listing-body h3{ font-size:1.12rem; }
.listing-loc{ display:flex; align-items:center; gap:6px; font-size:.85rem; color: var(--green-dark); font-weight:600; }
.listing-loc svg{ width:15px; height:15px; stroke: var(--green-dark); }
.listing-desc{ font-size:.9rem; margin-bottom:4px; }
.listing-specs{ display:flex; gap:14px; flex-wrap:wrap; padding:12px 0; border-top:1px dashed var(--sand-dark); border-bottom:1px dashed var(--sand-dark); margin:4px 0 8px; }
.listing-specs span{ display:flex; align-items:center; gap:6px; font-size:.82rem; font-weight:600; color: var(--ink-soft); }
.listing-specs svg{ width:16px; height:16px; stroke: var(--wine); }
.listing-actions{ display:flex; gap:10px; margin-top:auto; }
.listing-actions .btn{ flex:1; padding:11px 14px; font-size:.83rem; }

.listings-more{ text-align:center; margin-top:48px; }

/* ===== Contact ===== */
.contact{ background: var(--wine); color: var(--white); position:relative; overflow:hidden; }
.contact::before{
  content:""; position:absolute; width:600px; height:600px; border-radius:50%;
  background: rgba(255,255,255,.04); top:-260px; right:-200px;
}
.contact h2{ color:var(--white); }
.contact .section-tag{ color: var(--gold); background: rgba(255,255,255,.1); }
.contact .container{ position:relative; display:grid; grid-template-columns: 1fr 1fr; gap:60px; }
.contact-info p{ color: rgba(255,255,255,.82); }
.contact-list{ display:flex; flex-direction:column; gap:18px; margin:28px 0; }
.contact-list li{ display:flex; align-items:center; gap:14px; }
.contact-list .ic{ width:44px; height:44px; border-radius:12px; background: rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.contact-list .ic svg{ width:22px; height:22px; stroke: var(--gold); }
.contact-list strong{ display:block; font-size:.95rem; }
.contact-list span, .contact-list a{ font-size:.85rem; color: rgba(255,255,255,.78); }
.social-row{ display:flex; gap:12px; margin-top:8px; }
.social-row a{
  width:44px; height:44px; border-radius:50%; background: rgba(255,255,255,.1); display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, transform .2s ease;
}
.social-row a:hover{ background: var(--gold); transform: translateY(-3px); }
.social-row svg{ width:20px; height:20px; stroke: var(--white); }

.map-embed{
  margin-top:24px; border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-lg);
  background: var(--white);
}
.map-embed iframe{ display:block; width:100%; filter: grayscale(.15) contrast(1.02); }
.map-embed .map-link{
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding:12px; font-size:.82rem; font-weight:700; color: var(--wine-dark);
  background: var(--cream); transition: background .2s ease;
}
.map-embed .map-link:hover{ background: var(--sand); }

.contact-form{ background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-lg); color: var(--ink); }
.contact-form h3{ font-size:1.2rem; }
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.contact-form label{ font-size:.8rem; font-weight:700; color: var(--wine-dark); display:block; margin-bottom:6px; }
.contact-form input, .contact-form textarea, .contact-form select{
  width:100%; padding:12px 14px; border-radius:10px; border:1.5px solid var(--sand-dark); background: var(--cream);
  font-family: var(--ff-body); font-size:.92rem; margin-bottom:16px; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus{ outline:2px solid var(--green); background: var(--white); }
.contact-form textarea{ resize:vertical; min-height:100px; }
.contact-form .btn{ width:100%; }
.form-status{
  margin:14px 0 0; font-size:.85rem; font-weight:600; text-align:center; min-height:1.2em;
  color: var(--ink-soft);
}
.form-status.success{ color: var(--green-dark); }
.form-status.error{ color: var(--wine); }

/* ===== Footer ===== */
.site-footer{ background: var(--ink); color: rgba(255,255,255,.72); padding: 56px 0 24px; }
.footer-top{ display:grid; grid-template-columns: 1.3fr 1fr 1fr; gap:40px; padding-bottom:36px; border-bottom:1px solid rgba(255,255,255,.1); }
.footer-brand{ display:flex; align-items:center; margin-bottom:14px; }
.footer-brand img{ height:52px; width:auto; filter: brightness(0) invert(1); }
.site-footer h4{ color:var(--white); font-size:.95rem; margin-bottom:16px; }
.site-footer ul{ display:flex; flex-direction:column; gap:10px; }
.site-footer a{ font-size:.88rem; color: rgba(255,255,255,.65); transition: color .2s ease; }
.site-footer a:hover{ color: var(--gold); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding-top:22px; font-size:.8rem; }
.footer-bottom .social-row a{ width:36px; height:36px; }
.footer-bottom .social-row svg{ width:17px; height:17px; }

/* ===== WhatsApp float ===== */
.wa-float{
  position: fixed; right:22px; bottom:22px; width:58px; height:58px; border-radius:50%;
  background: var(--green); display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-lg); z-index:400;
  transition: transform .2s ease;
}
.wa-float:hover{ transform: scale(1.08); }
.wa-float svg{ width:28px; height:28px; stroke:var(--white); fill:none; }

/* ===== Reveal animation ===== */
.reveal{ opacity:0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:none; }

/* ===== Responsive ===== */
@media (max-width: 980px){
  .hero .container{ grid-template-columns:1fr; max-width:1180px; }
  .hero-media{ order:-1; max-width:640px; margin:0 auto; }
  .hero-media img{ height: clamp(320px, 60vw, 480px); }
  .about .container{ grid-template-columns:1fr; }
  .about-media{ max-width:480px; margin:0 auto; }
  .service-grid{ grid-template-columns: repeat(2,1fr); }
  .type-strip{ grid-template-columns: repeat(3,1fr); }
  .listing-grid{ grid-template-columns: repeat(2,1fr); }
  .contact .container{ grid-template-columns:1fr; }
  .footer-top{ grid-template-columns:1fr 1fr; }
}

@media (max-width: 760px){
  section{ padding: 64px 0; }
  .nav-links{
    position:fixed; inset: 74px 16px auto 16px; background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); flex-direction:column; align-items:stretch; padding:14px;
    transform: translateY(-16px); opacity:0; pointer-events:none; transition: all .25s ease;
  }
  .nav-links.open{ transform:none; opacity:1; pointer-events:auto; }
  .nav-links a{ padding:12px 16px; }
  .nav-toggle{ display:flex; padding:8px 0 8px 6px; }
  .nav{ padding:12px 14px; gap:6px; }
  .nav-actions{ gap:4px; }
  .nav-actions .btn-sm{ padding:9px 14px; font-size:.75rem; }
  .lang-toggle button{ padding:5px 8px; font-size:.7rem; }
  .brand img{ height:40px; }
  .hero{ padding-top:150px; }
  .hero-stats{ gap:22px; }
  .hero-media .float-badge{ left:8px; bottom:-16px; padding:12px 14px; }
  .service-grid{ grid-template-columns:1fr; }
  .type-strip{ grid-template-columns: repeat(2,1fr); }
  .listing-grid{ grid-template-columns:1fr; }
  .form-row{ grid-template-columns:1fr; }
  .footer-top{ grid-template-columns:1fr; gap:28px; }
  .trust-strip .container{ justify-content:center; text-align:center; }
}

@media (max-width: 480px){
  .nav-actions .btn-primary.btn-sm{ display:none; }
}

@media (max-width: 420px){
  .hero-actions .btn{ width:100%; }
  .hero-stats{ justify-content:space-between; width:100%; }
}
