/*
 * DINAX Website Stylesheet
 *
 * This stylesheet defines the visual identity of the DINAX website.  
 * Colours, spacing and typography are driven by CSS custom properties for easy maintenance.  
 */

/* CSS Variables for theme colours and metrics */
:root {
  --color-primary: #ff6a00;
  --color-dark: #111111;
  --color-gray: #2a2a2a;
  --color-light-gray: #f7f7f7;
  --color-bg: #ffffff;
  --radius: 12px;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin-bottom: .5rem;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 0 0;
}

/* Header */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.logo img {
  height: 50px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-dark);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

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

.btn-primary:hover {
  background-color: #e05c00;
}

.btn-secondary {
  background-color: var(--color-gray);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #1b1b1b;
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Hero Section */
.hero-section {
  background-color: var(--color-light-gray);
  padding: 4rem 0 2rem;
}

.hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  flex: 1 1 50%;
  padding-right: 1rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.hero-buttons a:not(:last-child) {
  margin-right: 1rem;
}

.hero-image {
  flex: 1 1 40%;
  text-align: right;
}

.hero-image img {
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Categories */
.categories-section {
  padding: 3rem 0;
}

.categories-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background-color: var(--color-light-gray);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.category-card h3 {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

/* Why Section */
.why-section {
  background-color: var(--color-primary);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.why-section h2 {
  margin-bottom: 2rem;
  color: #fff;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.why-card {
  background-color: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.why-card h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.why-card p {
  font-weight: 500;
  color: #fff;
}

/* Stats Section */
.stats-section {
  background-color: var(--color-dark);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2rem;
}

.stat-item {
  flex: 1 1 200px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-item p {
  font-size: 1rem;
}

/* Products Section */
.products-section {
  padding: 3rem 0;
  background-color: var(--color-light-gray);
}

.products-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.products-slider {
  position: relative;
  overflow: hidden;
}

.products-wrapper {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
}

.product-card {
  background-color: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 220px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  flex: 0 0 auto;
}

.product-card h3 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.product-card .price {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.product-card .rating i {
  color: #ffc107;
  font-size: 0.85rem;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.slider-btn.prev {
  left: 0.5rem;
}

.slider-btn.next {
  right: 0.5rem;
}

.slider-btn:hover {
  background-color: rgba(0,0,0,0.7);
}

/* References Section */
.references-section {
  padding: 3rem 0;
}

.references-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 1.5rem;
  margin-top: 1rem;
}

.reference-item {
  flex: 1 1 200px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Blog Section */
.blog-section {
  padding: 3rem 0;
  background-color: var(--color-light-gray);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.blog-card {
  background-color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.blog-card img {
  width: 100%;
  height: auto;
}

.blog-content {
  padding: 1rem;
}

.blog-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.blog-content p {
  font-size: 0.95rem;
  color: var(--color-gray);
}

/* AI Advisor Section */
.ai-section {
  padding: 3rem 0;
  background-color: #fff;
}

.ai-section .ai-chat {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

#ai-input {
  flex: 1 1 400px;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  resize: vertical;
}

#ai-send {
  flex: 0 0 auto;
}

.ai-output {
  margin-top: 1rem;
  background-color: var(--color-light-gray);
  padding: 1rem;
  border-radius: var(--radius);
  min-height: 50px;
}

/* Footer */
.site-footer {
  background-color: var(--color-dark);
  color: #fff;
  padding-top: 3rem;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-about {
  flex: 1 1 300px;
}

.footer-about p {
  margin-top: 1rem;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-links {
  flex: 1 1 200px;
}

.footer-links h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ccc;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-contact {
  flex: 1 1 250px;
}

.footer-contact h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-contact p {
  line-height: 1.5;
  font-size: 0.95rem;
}

.social-icons a {
  margin-right: 0.5rem;
  color: #ccc;
  font-size: 1.25rem;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  background-color: #000;
  padding: 1rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: #999;
}

/* Responsive styling */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-content {
    padding-right: 0;
  }
  .main-nav ul {
    flex-direction: column;
    background-color: var(--color-bg);
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    border: 1px solid #eee;
    padding: 1rem;
    display: none;
  }
  .main-nav ul.active {
    display: flex;
  }
  .mobile-nav-toggle {
    display: block;
  }
}