/* LibriMondo Monochrome Sophisticated CSS */

/* === FONT IMPORTS === */
@import url('https://fonts.googleapis.com/css?family=Merriweather:700,900&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap');

:root {
  --color-primary: #204156;
  --color-secondary: #D9A441;
  --color-accent: #F7F4EF;
  --color-black: #111111;
  --color-white: #ffffff;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #cccccc;
  --color-gray-400: #999999;
  --color-gray-500: #666666;
  --color-gray-600: #444444;
  --color-gray-700: #222222;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08), 0 1.5px 4px rgba(0,0,0,0.04);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
  --font-display: 'Merriweather', serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

html {
  box-sizing: border-box;
  font-size: 18px;
  background: var(--color-white);
  color: var(--color-black);
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-body);
  background: var(--color-accent);
  color: var(--color-black);
  margin: 0;
  min-height: 100vh;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-black);
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 900;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.2rem;
  line-height: 1.1;
  margin-bottom: 0.6em;
}
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3em;
}
p, ul, ol, address {
  font-family: var(--font-body);
  color: var(--color-gray-700);
  font-size: 1rem;
  margin-bottom: 1.1em;
}
strong {
  font-weight: 700;
  color: var(--color-black);
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover, a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* === LAYOUT CONTAINERS === */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* === HEADER & NAVIGATION === */
header {
  background: var(--color-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
  min-height: 70px;
}
nav > a img {
  height: 44px;
  width: auto;
  display: block;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li {
  margin: 0;
}
nav ul li a {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-black);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
nav ul li a:hover, nav ul li a:focus {
  background: var(--color-gray-100);
  color: var(--color-primary);
}
.cta-button {
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 28px;
  border-radius: 24px;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  margin-left: 16px;
  letter-spacing: 0.02em;
  display: inline-block;
}
.cta-button:hover, .cta-button:focus {
  background: var(--color-secondary);
  color: var(--color-black);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  text-decoration: none;
}

/* === MOBILE NAVIGATION === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-black);
  cursor: pointer;
  margin-left: 12px;
  z-index: 120;
  transition: color var(--transition);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  color: var(--color-secondary);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17,17,17,0.98);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 40px 24px 24px 24px;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  align-self: flex-end;
  margin-bottom: 32px;
  cursor: pointer;
  transition: color var(--transition);
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.mobile-nav a {
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-secondary);
}

/* Hide desktop nav on mobile, show burger */
@media (max-width: 1024px) {
  nav ul, nav .cta-button {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 1025px) {
  .mobile-menu {
    display: none !important;
  }
}

/* === HERO SECTION === */
.hero {
  background: linear-gradient(120deg, var(--color-white) 60%, var(--color-gray-100) 100%);
  padding: 60px 0 40px 0;
  margin-bottom: 60px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero .content-wrapper {
  align-items: center;
  text-align: center;
  gap: 18px;
}
.hero h1 {
  color: var(--color-primary);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.3em;
}
.hero p {
  color: var(--color-gray-600);
  font-size: 1.15rem;
  margin-bottom: 1.2em;
}

/* === FLEXBOX LAYOUTS === */
.feature-grid, .featured-books-grid, .recent-posts-grid, .book-covers-carousel, .new-books-carousel, .event-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.feature-grid {
  gap: 24px;
  justify-content: space-between;
}
.featured-books-grid, .recent-posts-grid, .new-books-carousel {
  gap: 24px;
  justify-content: flex-start;
}
.book-covers-carousel {
  gap: 20px;
  justify-content: flex-start;
}
.event-highlights {
  gap: 20px;
  justify-content: flex-start;
}

.feature {
  background: var(--color-gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 340px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition: box-shadow var(--transition), background var(--transition);
  position: relative;
}
.feature:hover, .feature:focus-within {
  background: var(--color-white);
  box-shadow: var(--shadow-elevated);
}
.feature h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 700;
}
.feature a {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 8px;
  transition: color var(--transition);
}
.feature a:hover, .feature a:focus {
  color: var(--color-secondary);
}

/* Cards and Card Containers */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 220px;
  max-width: 340px;
  transition: box-shadow var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: var(--shadow-elevated);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--color-gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  color: var(--color-black);
  font-style: italic;
  font-size: 1.05rem;
  transition: box-shadow var(--transition), background var(--transition);
}
.testimonial-card span {
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary);
  margin-left: 12px;
  font-size: 0.98rem;
}
.testimonial-card:hover, .testimonial-card:focus-within {
  background: var(--color-white);
  box-shadow: var(--shadow-elevated);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* === BLOG FEATURED POST === */
.featured-post {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 28px 22px;
  margin-top: 24px;
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.featured-post h3 {
  color: var(--color-secondary);
  margin-bottom: 0.5em;
}

/* === MAP SECTION === */
.map {
  background: var(--color-gray-200);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-top: 18px;
  font-size: 1rem;
  color: var(--color-gray-700);
}

/* === ADDRESS === */
address {
  font-style: normal;
  color: var(--color-gray-600);
  font-size: 0.98rem;
  margin-bottom: 1em;
}

/* === FOOTER === */
footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 40px 0 24px 0;
  margin-top: 60px;
}
footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0 0 18px 0;
  padding: 0;
}
footer nav ul li a {
  color: var(--color-white);
  font-weight: 600;
  font-size: 1rem;
  transition: color var(--transition);
}
footer nav ul li a:hover, footer nav ul li a:focus {
  color: var(--color-secondary);
}
footer address {
  color: var(--color-gray-300);
  margin-bottom: 12px;
}
footer p {
  color: var(--color-gray-400);
  font-size: 0.95rem;
  margin: 0;
}

/* === BUTTONS === */
button, .button {
  font-family: var(--font-body);
  font-weight: 700;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  background: var(--color-black);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 1rem;
}
button:hover, .button:hover, button:focus, .button:focus {
  background: var(--color-secondary);
  color: var(--color-black);
}

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-black);
  color: var(--color-white);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
  z-index: 3000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  font-size: 1rem;
  animation: cookieBannerIn 0.5s cubic-bezier(.4,0,.2,1);
}
@keyframes cookieBannerIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.cookie-banner button, .cookie-banner .button {
  padding: 8px 22px;
  font-size: 1rem;
  border-radius: 20px;
  margin: 0;
  background: var(--color-white);
  color: var(--color-black);
  border: none;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
  box-shadow: none;
}
.cookie-banner button:hover, .cookie-banner button:focus {
  background: var(--color-secondary);
  color: var(--color-black);
}
.cookie-banner .cookie-settings {
  background: transparent;
  color: var(--color-secondary);
  border: 1.5px solid var(--color-secondary);
  transition: background var(--transition), color var(--transition), border var(--transition);
}
.cookie-banner .cookie-settings:hover, .cookie-banner .cookie-settings:focus {
  background: var(--color-secondary);
  color: var(--color-black);
}

/* === COOKIE MODAL === */
.cookie-modal-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(17,17,17,0.85);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
}
.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: var(--color-white);
  color: var(--color-black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  padding: 36px 32px 28px 32px;
  min-width: 320px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: cookieModalIn 0.4s cubic-bezier(.4,0,.2,1);
  position: relative;
}
@keyframes cookieModalIn {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-modal h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 0.5em;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.cookie-modal .cookie-category label {
  font-weight: 600;
  color: var(--color-black);
}
.cookie-modal .cookie-category input[type="checkbox"] {
  accent-color: var(--color-secondary);
  width: 18px;
  height: 18px;
}
.cookie-modal .cookie-category .always-on {
  color: var(--color-gray-500);
  font-size: 0.98rem;
  margin-left: 8px;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-gray-500);
  cursor: pointer;
  transition: color var(--transition);
}
.cookie-modal .cookie-modal-close:hover, .cookie-modal .cookie-modal-close:focus {
  color: var(--color-secondary);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  .container {
    max-width: 98vw;
    padding: 0 12px;
  }
  .section {
    padding: 32px 10px;
  }
  .hero {
    padding: 40px 0 24px 0;
  }
}
@media (max-width: 900px) {
  .feature-grid, .featured-books-grid, .recent-posts-grid, .book-covers-carousel, .new-books-carousel {
    gap: 16px;
  }
  .feature, .card {
    min-width: 180px;
    max-width: 100%;
    padding: 18px 12px;
  }
}
@media (max-width: 768px) {
  nav {
    padding: 0 8px;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .feature-grid, .featured-books-grid, .recent-posts-grid, .book-covers-carousel, .new-books-carousel {
    flex-direction: column;
    gap: 18px;
  }
  .feature, .card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 16px 10px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 10px;
  }
  .content-grid {
    flex-direction: column;
    gap: 16px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 10px;
    font-size: 0.98rem;
  }
  .cookie-modal {
    padding: 22px 10px 18px 10px;
    min-width: 0;
  }
}
@media (max-width: 480px) {
  .hero {
    padding: 24px 0 10px 0;
  }
  .section {
    padding: 18px 4px;
    margin-bottom: 32px;
  }
  .cookie-banner {
    padding: 12px 4px;
    font-size: 0.95rem;
  }
}

/* === MICRO-INTERACTIONS === */
.feature, .card, .testimonial-card, .cta-button, button, .cookie-banner button, .cookie-banner .button, .cookie-modal {
  transition: box-shadow var(--transition), background var(--transition), color var(--transition), border var(--transition), transform var(--transition);
}
.feature:active, .card:active, .testimonial-card:active, .cta-button:active, button:active {
  transform: translateY(2px) scale(0.98);
}

/* === UTILITY CLASSES === */
.hide {
  display: none !important;
}

/* === ACCESSIBILITY === */
:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* === END === */
