/* =============================================================
   Marianna Mascari – Main Stylesheet
   ============================================================= */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Variables --------------------------------------------- */
:root {
  --pink:        #d63f7a;
  --pink-light:  #f9eef4;
  --pink-hover:  #b83368;
  --dark:        #1a1a1a;
  --mid:         #555;
  --light-grey:  #f7f7f7;
  --border:      #e8e8e8;
  --max-width:   1100px;
  --radius:      6px;
}

/* ---- Typography -------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout ------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header / Nav ------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--dark);
}
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }

/* Nav links */
.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--dark);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: transform 0.2s;
}

/* ---- Hero (home page) -------------------------------------- */
.hero {
  padding: 4rem 0 2rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); }
.hero-subtitle { font-size: 1.05rem; color: var(--mid); margin-top: 1rem; }

/* ---- Gallery grid ------------------------------------------ */
.gallery-section { padding: 2rem 0 4rem; }
.gallery-section h2 { margin-bottom: 1.5rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  background: var(--light-grey);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---- News / Blog ------------------------------------------- */
.news-section { padding: 3rem 0 5rem; }
.news-header { margin-bottom: 2rem; }
.news-header h1 { margin-bottom: 0.5rem; }

.filter-bar { margin-bottom: 2rem; }
.filter-bar a {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background 0.15s, color 0.15s;
}
.filter-bar a:hover,
.filter-bar a.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* Post card */
.post-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--light-grey);
  position: relative;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-thumb .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card-thumb .play-badge svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.post-card-body {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.post-avatar svg { width: 18px; height: 18px; }
.post-author-date {
  font-size: 0.85rem;
  color: var(--mid);
}
.post-author-date strong { color: var(--dark); }

.post-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.post-card-excerpt {
  font-size: 0.95rem;
  color: var(--mid);
  flex: 1;
}
.post-card-footer {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: #aaa;
}

/* ---- Single post ------------------------------------------- */
.post-single { padding: 3rem 0 5rem; }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}
.post-back:hover { color: var(--dark); }

.post-header { margin-bottom: 2rem; }
.post-header .post-meta { margin-bottom: 1rem; }
.post-header h1 { margin-bottom: 0; }

.post-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
}

.post-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.post-video-wrap iframe,
.post-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
}
.post-content h2, .post-content h3 { margin: 1.75rem 0 0.75rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content ul li, .post-content ol li { margin-bottom: 0.35rem; }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--pink);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--mid);
  font-style: italic;
}

.post-share {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--mid);
}
.post-share a {
  color: var(--mid);
  transition: color 0.15s;
}
.post-share a:hover { color: var(--dark); }
.post-share svg { width: 20px; height: 20px; }

/* ---- About page -------------------------------------------- */
.about-section { padding: 4rem 0 5rem; }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--light-grey);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-text h1 { margin-bottom: 1.5rem; }
.about-text p { color: var(--mid); margin-bottom: 1rem; font-size: 1.05rem; }

/* ---- Contact page ------------------------------------------ */
.contact-section { padding: 4rem 0 5rem; }
.contact-inner { max-width: 600px; }
.contact-inner h1 { margin-bottom: 0.5rem; }
.contact-inner > p { color: var(--mid); margin-bottom: 2.5rem; }

.contact-form .field { margin-bottom: 1.25rem; }
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--pink);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}
.btn-primary { background: var(--dark); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { background: var(--pink-hover); }
.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--light-grey); }

.form-success {
  display: none;
  background: #f0faf4;
  border: 1px solid #b7e0c4;
  color: #2d6a4f;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

/* ---- Footer ------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--mid);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.footer-social a {
  color: var(--mid);
  transition: color 0.15s;
}
.footer-social a:hover { color: var(--dark); }
.footer-social svg { width: 20px; height: 20px; }

/* ---- Flash messages ---------------------------------------- */
.flash {
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.flash-success { background: #f0faf4; border: 1px solid #b7e0c4; color: #2d6a4f; }
.flash-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.flash-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1d4ed8; }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb { aspect-ratio: 16/8; }
  .about-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; gap: 0; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .nav-links.open a { padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
