/* ============================================================
   GABRIEL CUNHA — WRITER WEBSITE
   Classic Light Blue Theme (Stephenie Meyer Inspired)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Elsie&display=swap');

/* Fonte AbhayaLibre */
@font-face {
  font-family: 'AbhayaLibre';
  src: url('assets/AbhayaLibre-Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── RESET & BASE ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --primary-color: #2a405a; /* Even Stronger Blue */
  --secondary-color: #8db0d3;
  --bg-color: #ffffff; /* Brighter white background */
  --text-main: #333333;
  --text-light: #5a6b7c;
  --border-color: #d1dde8;

  --font-serif: 'Cinzel', 'Lora', Georgia, serif;
  --font-sans: 'Open Sans', Helvetica, Arial, sans-serif;
  --font-hand: 'La Belle Aurore', cursive;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-serif); /* Base is serif for author feel */
  font-size: 17px;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Elegant fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Floating Particles */
#particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  bottom: -20px;
  background-color: #e4f0fa; /* Light pastel blue */
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(228, 240, 250, 0.4);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Elsie', serif;
  font-weight: 400;
  color: var(--primary-color);
  margin-bottom: 0.85em;
  letter-spacing: 0.5px;
}

p {
  margin-bottom: 1.6em;
  color: var(--text-light); /* Softer text for reading */
  font-family: var(--font-sans);
  font-weight: 300;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--text-main); }

/* ============================================================
   INTERNAL PAGES HEADER
   ============================================================ */
.internal-page {
  background-color: var(--bg-color);
}

.internal-header {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  position: relative;
  box-shadow: 0 4px 20px rgba(99, 133, 166, 0.15);
}

.site-title-small {
  font-family: 'Elsie', serif;
  color: #ffffff;
  font-size: 2.4rem;
  letter-spacing: 1px;
  text-decoration: none;
  font-weight: 400;
  display: inline-block;
  animation: titleGlow 4s ease-in-out infinite alternate;
}
.site-title-small:hover {
  opacity: 0.9;
}

@keyframes titleGlow {
  0% {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0,0,0,0.3);
    transform: translateY(0);
  }
  100% {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 25px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
  }
}
.site-title-small:hover {
  opacity: 0.8;
}

/* ============================================================
   HERO / LANDING VIEW (index.html)
   ============================================================ */
.landing-view {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Background Image Overlay Container */
.hero-image-wrapper {
  width: 100%;
  flex: 1;
  min-height: 0;
  position: relative;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: block;
}

/* Raise image on desktop to show more houses (if houses are at bottom) */
@media (min-width: 769px) {
  .hero-banner-img {
    background-position: center 70%; /* Move image down to show more bottom (houses) */
  }
}

/* Hamburger Menu Top Right */
.hamburger-menu {
  position: absolute;
  top: 30px;
  right: 40px;
  z-index: 100;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.internal-page .hamburger-menu span {
  background-color: var(--primary-color);
}
.hamburger-menu span {
  display: block;
  width: 32px;
  height: 2px;
  background-color: #fff; /* White lines against the painting */
  transition: 0.3s;
}

/* Overlay Navigation */
.overlay-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(82, 117, 153, 0.45); /* Blurry translucent blue */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.overlay-nav.active {
  opacity: 1;
  pointer-events: auto;
}

.close-menu {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.close-menu:hover {
  transform: scale(1.1);
  color: #e6ebf0;
}

.overlay-nav .nav-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.overlay-nav .nav-item {
  font-family: 'Elsie', serif;
  font-weight: 400;
  font-size: 2.2rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 4px;
  position: relative;
  transition: color 0.3s ease;
}
.overlay-nav .nav-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background-color: #ffffff;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.overlay-nav .nav-item:hover {
  text-decoration: none;
  color: #e6ebf0;
}
.overlay-nav .nav-item:hover::after {
  width: 100%;
  background-color: #e6ebf0;
}

/* Bottom Solid Bar */
.hero-bottom-bar {
  background-color: #ffffff;
  width: 100%;
  flex: 0 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 15px 40px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.site-title-bar {
  font-family: 'Elsie', cursive;
  font-weight: 400;
  color: var(--primary-color);
  font-size: 2.6rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin: 0;
  display: inline-block;
}

.quote-bar {
  font-family: 'Romelio Handwriting', cursive;
  color: #000000;
  font-size: 1.8rem;
  line-height: 1.2;
  text-align: right;
  margin-right: 20px;
  display: flex;
  align-items: center;
}

/* ============================================================
   MAIN CONTENT (BELOW FOLD/INTERNAL)
   ============================================================ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 30px;
}
.main-content-inner {
  padding-top: 60px;
  padding-bottom: 60px;
  animation: fadeIn 0.8s ease-out forwards;
}

.section-block {
  margin-bottom: 80px;
}

.section-block h2 {
  font-family: 'Elsie', serif;
  font-weight: 400;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 70px auto;
  width: 70%;
}

.welcome-text {
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
}
.welcome-text p {
  font-style: italic;
  font-size: 1.4rem;
  color: var(--primary-color);
  font-family: var(--font-serif);
  line-height: 2;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: center;
}
.about-image {
  position: relative;
  overflow: visible;
}
.about-image img {
  width: auto;
  max-width: 100%;
  max-height: 650px;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  object-fit: contain;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.9;
  text-align: justify;
}

/* ── BOOKS ── */
.books-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.book-row {
  display: flex;
  gap: 50px;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.03);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book-row:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(99, 133, 166, 0.12);
}
.book-cover {
  width: 260px;
  flex-shrink: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}
.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 4px;
}.book-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.book-details h3 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}
.book-details p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 25px;
}
.book-details .button {
  max-width: 240px;
}
.read-more {
  font-family: var(--font-sans);
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color);
  border-bottom: 1px solid var(--secondary-color);
  padding-bottom: 4px;
  display: inline-block;
  align-self: flex-start;
}
.read-more:hover {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}

/* ── FORMS ── */
.simple-form {
  max-width: 650px;
  margin: 40px auto;
  font-family: var(--font-sans);
  background: #ffffff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(99, 133, 166, 0.05);
}
.simple-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.simple-form input,
.simple-form textarea {
  width: 100%;
  padding: 15px 15px 15px 0;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  margin-bottom: 35px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-main);
  transition: border-color 0.3s ease;
}
.simple-form input:focus,
.simple-form textarea:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
}
.simple-form textarea {
  resize: vertical;
  min-height: 100px;
}
.button {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 24px;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}
.button:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 133, 166, 0.3);
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  padding: 50px 0;
  margin-top: 60px;
  background-color: transparent;
  border-top: 1px solid var(--border-color);
}
.footer p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.footer-links {
  margin-top: 15px;
  font-size: 0.85rem;
}
.footer-links a {
  margin: 0 15px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-sans);
  font-weight: 600;
}
.footer-links a:hover {
  color: var(--text-main);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-bottom-bar {
    flex-direction: column;
    padding: 20px;
    align-items: center;
    gap: 10px;
  }
  .site-title-bar {
    font-size: 2rem;
    text-align: center;
  }
  .quote-bar {
    text-align: center;
    margin-right: 0;
    font-size: 1.6rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 0; /* Zero: espaçamento controlado por margin em cada elemento */
  }
  .about-grid .about-text {
    display: contents; /* h2 e p viram itens diretos do grid */
  }
  .about-text h2 {
    order: -1;            /* Sobe o título para antes da imagem */
    margin-bottom: 18px;  /* Espaço do título até a foto */
  }

  .about-image {
    max-width: 300px;
    max-height: 70vh;
    margin: 0 auto 22px; 
    overflow: visible;
  }
  .about-image img {
    max-height: 70vh;
    width: auto;
    margin: 0 auto;
  }
  .about-text p {
    margin-bottom: 0.5em !important; /* Força parágrafos próximos, sobrepõe o global 1.6em */
    line-height: 1.75;
  }
  .book-row { flex-direction: column; align-items: center; text-align: center; }
  .hamburger-menu { top: 20px; right: 20px; }
  .hamburger-menu span { background-color: var(--primary-color); } /* fallback color for mobile if bg is light */
}
