/* Layout Template - 15 Essential Layout Types
   Based on analysis of Embuild website structure */

/* ===== CSS Variables for Consistency ===== */
:root {
  --primary-color: #029453;
  --secondary-color: #184382;
  --accent-color: #10cfc9;
  --text-dark: #333;
  --text-light: #555;
  --text-muted: #999;
  --bg-light: #fff;
  --bg-gray: #f2f4f5;
  --bg-dark: #333;
  --border-color: #d9dbdc;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --font-primary: 'DM Sans', sans-serif;
  --border-radius: 5px;
  --spacing-xs: 10px;
  --spacing-sm: 20px;
  --spacing-md: 40px;
  --spacing-lg: 60px;
  --spacing-xl: 80px;
}

/* ===== Base Reset & Typography ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
}

/* ===== 1. HEADER LAYOUT ===== */
.header {
  background: var(--bg-light);
  padding: var(--spacing-sm) 0;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 100;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

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

.header__logo svg {
  height: 70px;
  width: auto;
}

.header__name {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.header__menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header__navigation {
  display: flex;
  gap: var(--spacing-sm);
}

.header__navigation a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.header__navigation a:hover {
  background: var(--bg-gray);
}

.header__languages {
  display: flex;
  gap: 10px;
}

.header__languages a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  padding: 5px 10px;
}

/* ===== 2. HERO SECTION LAYOUT ===== */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  color: white;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  text-align: left;
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.hero__subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--accent-color);
}

.hero__tagline {
  font-size: 1.2rem;
  max-width: 600px;
}

/* ===== 3. CONTAINER LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.container--wide {
  max-width: 1400px;
}

.container--narrow {
  max-width: 800px;
}

/* ===== 4. FLEX GRID LAYOUT ===== */
.flex-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.flex-grid--cols-2 .flex-grid__item {
  flex: 1 1 calc(50% - var(--spacing-sm));
}

.flex-grid--cols-3 .flex-grid__item {
  flex: 1 1 calc(33.333% - var(--spacing-md));
}

.flex-grid--cols-4 .flex-grid__item {
  flex: 1 1 calc(25% - var(--spacing-md));
}

.flex-grid--cols-5 .flex-grid__item {
  flex: 1 1 calc(20% - var(--spacing-md));
}

.flex-grid__item {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== 5. CARD LAYOUT ===== */
.card {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card__header {
  margin-bottom: var(--spacing-sm);
}

.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  color: var(--text-dark);
}

.card__content {
  flex: 1;
  margin-bottom: var(--spacing-sm);
}

.card__footer {
  margin-top: auto;
}

.card--blue {
  background: var(--secondary-color);
  color: white;
}

.card--blue .card__title {
  color: white;
}

/* ===== 6. BUTTON SYSTEM ===== */
.btn {
  display: inline-block;
  padding: 15px 20px;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.2px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
}

.btn:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.btn--primary {
  background: var(--primary-color);
  color: white;
}

.btn--secondary {
  background: var(--secondary-color);
  color: white;
}

.btn--transparent {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 14px 19px;
}

/* ===== 7. IMAGE-TEXT LAYOUT ===== */
.image-text {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.image-text__image {
  flex: 1;
}

.image-text__image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.image-text__content {
  flex: 1;
}

.image-text__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.image-text__description {
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
}

.image-text--reverse {
  flex-direction: row-reverse;
}

/* ===== 8. NEWS/BLOG GRID LAYOUT ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.news-item {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-item__image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.news-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item__content {
  padding: var(--spacing-sm);
}

.news-item__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.news-item__meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.news-item__category {
  background: var(--bg-gray);
  padding: 4px 8px;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
}

/* ===== 9. SPONSORS/LOGOS LAYOUT ===== */
.sponsors {
  background: var(--bg-light);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.sponsors__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.sponsors__item {
  opacity: 0.7;
  transition: opacity 0.3s ease;
  max-width: 150px;
}

.sponsors__item:hover {
  opacity: 1;
}

.sponsors__item img {
  width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
}

/* ===== 10. FOOTER LAYOUT ===== */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.footer__partners {
  max-width: 40%;
}

.footer__navigation {
  display: flex;
  gap: var(--spacing-lg);
}

.footer__nav-column {
  min-width: 150px;
}

.footer__nav-title {
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.footer__nav-list {
  list-style: none;
}

.footer__nav-list li {
  margin-bottom: 8px;
}

.footer__nav-list a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__nav-list a:hover {
  color: var(--accent-color);
}

.footer__bottom {
  border-top: 1px solid #444;
  padding-top: var(--spacing-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer__legal {
  display: flex;
  gap: var(--spacing-sm);
}

.footer__legal a {
  color: white;
  text-decoration: none;
}

/* ===== 11. BREADCRUMBS LAYOUT ===== */
.breadcrumbs {
  padding: var(--spacing-sm) 0;
  background: var(--bg-gray);
}

.breadcrumbs__list {
  display: flex;
  list-style: none;
  gap: 10px;
}

.breadcrumbs__item::after {
  content: " / ";
  margin-left: 10px;
  color: var(--text-muted);
}

.breadcrumbs__item:last-child::after {
  display: none;
}

.breadcrumbs__link {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  color: var(--primary-color);
}

/* ===== 12. SIDEBAR LAYOUT ===== */
.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-dark);
  color: white;
  padding: var(--spacing-md);
  transition: right 0.3s ease;
  z-index: 1000;
}

.sidebar.is-open {
  right: 0;
}

.sidebar__menu {
  list-style: none;
}

.sidebar__menu li {
  margin-bottom: 15px;
}

.sidebar__menu a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.sidebar__menu a:hover {
  color: var(--accent-color);
}

/* ===== 13. HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 24px;
  height: 18px;
  justify-content: space-between;
}

.hamburger__line {
  width: 100%;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

.hamburger.is-active .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== 14. CTA SECTION LAYOUT ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.cta-section__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.cta-section__description {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  background: white;
  color: var(--primary-color);
  font-size: 1.1rem;
  padding: 20px 40px;
}

/* ===== 15. SOCIAL ICONS LAYOUT ===== */
.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-gray);
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons__link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.social-icons__link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .header__navigation {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero__title {
    font-size: 2.5rem;
  }
  
  .flex-grid--cols-2 .flex-grid__item,
  .flex-grid--cols-3 .flex-grid__item,
  .flex-grid--cols-4 .flex-grid__item,
  .flex-grid--cols-5 .flex-grid__item {
    flex: 1 1 100%;
  }
  
  .image-text {
    flex-direction: column;
  }
  
  .image-text--reverse {
    flex-direction: column;
  }
  
  .footer__top {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .footer__partners {
    max-width: 100%;
  }
  
  .footer__navigation {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .footer__bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-sm: 15px;
    --spacing-md: 25px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
  }
  
  .hero__title {
    font-size: 2rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== DEMO-SPECIFIC STYLES ===== */
.video-placeholder {
  background: #f0f0f0;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
}

.news-section-bg {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: var(--spacing-xl) var(--spacing-sm);
  border-radius: 10px;
}

.news-section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.news-section-subtitle {
  font-size: 1.2rem;
  color: #666;
}

.partner-placeholder {
  background: #ddd;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
}

.partner-story-title {
  margin: var(--spacing-sm) 0;
}

.partner-demo {
  background: #555;
  width: 200px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  color: white;
}

.social-fixed {
  position: fixed;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  z-index: 1000;
}

.social-fixed .social-icons {
  flex-direction: column;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.bg-white { background: var(--bg-light); }
.bg-gray { background: var(--bg-gray); }
.bg-dark { background: var(--bg-dark); }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-muted { color: var(--text-muted); }

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
}
