/* layout.css - Improved grid systems, layout components, and structural styles */

/* Container and layout utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space);
}

/* Site structure */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

/* Enhanced Header Design */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.header-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  padding: 0 var(--space);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Bodoni Moda", serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--azur) 0%, #1e4d8a 100%);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(43, 108, 176, 0.2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.main-nav a {
  padding: 0.6rem 1.2rem;
  font-weight: 500;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 8px;
  color: var(--ink);
}

.main-nav a:not(.btn):hover {
  background: rgba(43, 108, 176, 0.08);
  color: var(--link);
}

.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--link);
  transition: width 0.3s ease;
}

.main-nav a:not(.btn):hover::after {
  width: calc(100% - 2rem);
}

.main-nav .btn {
  margin-left: 1rem;
  box-shadow: 0 2px 8px rgba(43, 108, 176, 0.15);
}

/* Enhanced Footer Design */
.site-footer {
  background: linear-gradient(135deg, #0F172A 0%, #1a2438 100%);
  color: #fff;
  margin-top: 6rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--azur), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  padding: 4rem var(--space) 3rem;
}

.footer-col {
  animation: fadeInUp 0.5s ease;
}

.footer-title {
  color: #fff;
  font-family: "Bodoni Moda", serif;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--azur);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.875rem;
  position: relative;
  padding-left: 16px;
}

.footer-links li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--azur);
  transition: transform 0.2s ease;
}

.footer-links li:hover::before {
  transform: translateX(4px);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #fff;
}

.footer-address {
  font-style: normal;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.footer-address span {
  display: flex;
  align-items: center;
  margin: 0.75rem 0;
}

.footer-address i {
  color: var(--azur);
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.footer-address a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-address a:hover {
  color: var(--azur);
}

.legal-strip {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem var(--space);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.legal-strip small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* Grid systems */
.grid {
  display: grid;
  gap: var(--space);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Section spacing */
.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.section-lg {
  padding: 7rem 0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Responsive design */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-grid {
    height: 64px;
  }
}

@media (max-width: 768px) {
  .header-grid {
    height: auto;
    flex-direction: column;
    padding: 1rem var(--space);
  }

  .brand {
    margin-bottom: 1rem;
  }

  .main-nav {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-nav a {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  .main-nav a:not(.btn)::after {
    display: none;
  }

  .main-nav .btn {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 2rem;
  }

  .legal-strip {
    text-align: center;
    padding: 1.5rem var(--space);
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 640px) {
  .site-footer {
    margin-top: 4rem;
  }

  .footer-grid {
    padding: 3rem var(--space) 2rem;
  }

  .legal-strip small {
    font-size: 0.75rem;
  }
}