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

:root {
  /* Colors - Warm Minimalism */
  --bg-color: #FDFCF8;
  --surface-color: #FFFFFF;
  --text-main: #2C2C2C;
  --text-muted: #6B6B6B;
  --accent-color: #A98467;
  --accent-hover: #8C6A51;
  --success-color: #8A9A5B;
  --error-color: #D32F2F;
  --border-color: #EAEAEA;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

/* Navigation */
nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  position: relative;
  border-bottom: 1px solid transparent;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

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

.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--accent-color);
}

.nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  background-color: var(--text-main);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-sm:hover {
  background-color: var(--accent-color);
  transform: translateY(-1px);
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--text-main);
  color: var(--surface-color);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

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

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--text-main);
  color: var(--text-main);
  padding: 10px 22px;
  /* slight adjust for border */
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: var(--text-main);
  color: var(--surface-color);
}

.card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

/* Form Styles */
input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--surface-color);
  transition: var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(169, 132, 103, 0.1);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-main);
}

/* Footer */
footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--accent-color);
  font-weight: 600;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  min-width: 250px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left-color: var(--success-color);
}

.toast-error {
  border-left-color: var(--error-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Responsive Media Queries */
@media (max-width: 768px) {

  /* Fonts */
  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.75rem !important;
  }

  /* Navigation */
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  /* Footer */
  footer .container {
    flex-direction: column;
    gap: 30px;
  }

  /* Cards/Tables on Mobile */
  /* Utility class for converting tables to cards if needed, 
       or applied directly to specific tables via CSS */
  .mobile-table thead {
    display: none;
  }

  .mobile-table tbody,
  .mobile-table tr,
  .mobile-table td {
    display: block;
    width: 100%;
  }

  .mobile-table tr {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 15px;
    background: white;
  }

  .mobile-table td {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }

  .mobile-table td::before {
    content: attr(data-label);
    font-weight: 700;
    margin-right: 15px;
    text-align: left;
    color: var(--text-muted);
  }
}

/* Hero Slideshow */
.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: slideshow 18s infinite;
}

.hero-slide:nth-child(1) {
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  animation-delay: 6s;
}

.hero-slide:nth-child(3) {
  animation-delay: 12s;
}

/* 3 images, 18s total. Show for 6s each.
   Fade in: 1s
   Visible: 5s
   Fade out: 1s
   Hidden: 11s (Wait for others)
*/
@keyframes slideshow {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }

  5% {
    opacity: 1;
    transform: scale(1);
  }

  33% {
    opacity: 1;
    transform: scale(1.05);
  }

  38% {
    opacity: 0;
    transform: scale(1.1);
  }

  100% {
    opacity: 0;
  }
}

/* Gradient Overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.5));
  z-index: 0;
}

/* Featured Section */
.featured-section {
  padding: 60px 0;
  background: #fff;
  text-align: center;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Tag Pills */
.tag-pill {
  display: inline-block;
  padding: 8px 16px;
  background: white;
  border: 1px solid #EAEAEA;
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: #FFFDF9;
  /* Very light accent bg */
}

.tag-pill.highlight {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: #FFFDF9;
}

/* Featured Cards */
.featured-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #F0F0F0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.featured-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 8px 24px rgba(169, 132, 103, 0.12);
  transform: translateY(-4px);
}

.featured-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 8px;
}

.featured-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid #F0F0F0;
}

.featured-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #F9F9F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.featured-badge {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-title {
  font-size: 1.25rem;
  margin: 0;
  color: var(--text-main);
  font-family: 'Playfair Display', serif;
  text-align: left;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  opacity: 0.6;
}

.featured-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
  text-align: left;
}

.featured-cta {
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.featured-cta:hover {
  gap: 8px;
}

/* Share Modal */
.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  /* transparent click-thru when hidden */
}

.share-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.share-modal {
  background: white;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  text-align: center;
}

.share-modal-overlay.active .share-modal {
  transform: translateY(0);
}

.share-modal h3 {
  margin-bottom: 25px;
  font-size: 1.3rem;
}

.share-options {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.share-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: transform 0.2s;
  text-decoration: none;
  color: white;
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-twitter {
  background: #000;
}

.share-linkedin {
  background: #0077b5;
}

.share-copy {
  background: #f0f0f0;
  color: #333;
}