/* =========================================
   MÉLODIES ARTS — Design System & Global Styles
   ========================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --color-cream:       #F8F5F0;
  --color-cream-dark:  #EDE8E0;
  --color-navy:        #1E3A5F;
  --color-navy-light:  #2A4E82;
  --color-navy-dark:   #122540;
  --color-terra:       #C4763B;
  --color-terra-light: #D8915A;
  --color-terra-dark:  #A35E26;
  --color-white:       #FFFFFF;
  --color-text:        #2C2C2C;
  --color-text-light:  #6B6B6B;
  --color-border:      #E0D9CF;

  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Montserrat', Arial, sans-serif;

  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-pill:  50px;

  --shadow-sm:    0 2px 8px rgba(30,58,95,0.08);
  --shadow-md:    0 8px 32px rgba(30,58,95,0.12);
  --shadow-lg:    0 20px 60px rgba(30,58,95,0.18);

  --transition:   0.3s ease;
  --transition-slow: 0.6s ease;

  --max-width:    1200px;
  --section-pad:  100px 24px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--color-navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--color-text-light);
  font-size: 1rem;
  line-height: 1.8;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Titles --- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-terra);
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  max-width: 580px;
  margin: 0 auto;
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-terra), var(--color-terra-light));
  margin: 20px auto 0;
  border-radius: var(--radius-pill);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-terra);
  color: var(--color-white);
  border-color: var(--color-terra);
}

.btn-primary:hover {
  background: var(--color-terra-dark);
  border-color: var(--color-terra-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,118,59,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.82rem;
}

/* ==========================================
   NAVBAR
   ========================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(30, 58, 95, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-terra), var(--color-terra-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(196,118,59,0.4);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
}

.nav-logo-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  background: rgba(255,255,255,0.12);
}

.nav-link.active {
  color: var(--color-terra-light);
}

.nav-cta {
  background: var(--color-terra);
  color: var(--color-white) !important;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-weight: 600;
  font-size: 0.82rem;
}

.nav-cta:hover {
  background: var(--color-terra-dark);
  color: var(--color-white) !important;
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.nav-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 90vw);
  height: 100vh;
  background: var(--color-navy-dark);
  z-index: 1050;
  padding: 80px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.3);
}

.nav-mobile.open { right: 0; }

.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav-mobile a {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mobile a:hover, .nav-mobile a.active {
  color: var(--color-terra-light);
  padding-left: 8px;
}

.nav-mobile .btn-primary {
  margin-top: 24px;
  text-align: center;
  justify-content: center;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.7;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-social-link:hover {
  background: var(--color-terra);
  border-color: var(--color-terra);
  color: white;
  transform: translateY(-2px);
}

.footer-col h4 {
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul li a:hover {
  color: var(--color-terra-light);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-contact-item i {
  color: var(--color-terra);
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-contact-item span {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.footer-bottom a {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: var(--color-terra-light);
}

/* ==========================================
   CARDS
   ========================================== */

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-terra);
  background: rgba(196,118,59,0.1);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

/* ==========================================
   BADGES
   ========================================== */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.badge-navy    { background: rgba(30,58,95,0.1);  color: var(--color-navy); }
.badge-terra   { background: rgba(196,118,59,0.15); color: var(--color-terra-dark); }
.badge-green   { background: rgba(72,160,100,0.12); color: #2e7d52; }

/* ==========================================
   FORMS
   ========================================== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--color-terra);
  box-shadow: 0 0 0 3px rgba(196,118,59,0.15);
}

.form-control::placeholder {
  color: #BDBDBD;
}

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

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ==========================================
   SCROLL TO TOP
   ========================================== */

.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-terra);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--color-terra-dark);
  transform: translateY(-2px);
}

/* ==========================================
   PAGE HERO (inner pages)
   ========================================== */

.page-hero {
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy) 100%);
  padding: 160px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/images/hero.png') center/cover no-repeat;
  opacity: 0.08;
}

.page-hero .container { position: relative; }

.page-hero h1 { color: var(--color-white); margin-bottom: 16px; }

.page-hero p {
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 16px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}

.breadcrumb a:hover { color: var(--color-terra-light); }
.breadcrumb span { color: var(--color-terra-light); }

/* ==========================================
   SECTION UTILITIES
   ========================================== */

section { padding: var(--section-pad); }

.section-alt { background: var(--color-cream-dark); }
.section-dark {
  background: var(--color-navy);
  color: var(--color-white);
}
.section-dark h2, .section-dark h3 { color: var(--color-white); }
.section-dark p { color: rgba(255,255,255,0.75); }

/* ==========================================
   GRIDS
   ========================================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 72px 20px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section-header { margin-bottom: 40px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .btn { padding: 13px 24px; font-size: 0.85rem; }
}
