/*
 * Stylesheet for the Doces LeiteMel institutional website
 *
 * The design adopts a warm palette inspired by coconut and caramel.  The
 * colors are defined using CSS variables at the root of the document
 * so they can be easily tweaked if the brand guidelines evolve.
 */

/* CSS reset and basic typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--secondary-color);
}

/* Color palette based on the LeiteMel logo */
:root {
  --primary-color: #5e3a19;   /* rich brown, used for headers and accents */
  --secondary-color: #f9f6ef; /* light beige, used for backgrounds */
  --accent-color: #c39c6e;    /* honey‑gold tone for highlights */
  --dark-color: #3c2a18;      /* darkest brown for text */
  --light-color: #ffffff;     /* pure white for contrast */
  --main-foreground : #5e3a19; /* main text color */
}

a {
    color: var(--main-foreground);
    -webkit-transition: all .4s 
ease;
    -ms-transition: all .4s ease;
    -moz-transition: all .4s ease;
    -o-transition: all .4s ease;
    transition: all .4s 
ease;
}

ul, ol {
    margin-top: 0;
    margin-bottom: 10px;
}

ul {
    display: block;
    list-style-type: disc;
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 40px;
    unicode-bidi: isolate;
}

li {
    display: list-item;
    unicode-bidi: isolate;
}

b, strong {
    font-weight: 700;
}
/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  color: var(--primary-color);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* Header and navigation */
header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--secondary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 80px;
  transition: height 0.3s ease;
}

.logo-small img {
  height: 50px;
}


.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  height: 3px;
  width: 25px;
  background-color: var(--primary-color);
  margin: 4px 0;
  transition: all 0.3s ease;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Hero section */
.hero {
  background-image: url('../assets/images/abstract-bg.png');
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px; /* to compensate for fixed header */
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(94, 58, 25, 0.4);
  /* semi‑transparent overlay for contrast */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: var(--light-color);
}

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

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

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--light-color);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s;
}

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

/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.section-title h2 {
  font-size: 2rem;
}

/* About section */
.about {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.about-image {
  flex: 1 1 300px;
  min-height: 320px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1 1 400px;
}

.about-text p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* Products preview section */
.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--light-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  border:#5e3a19 solid 1px
}

.product-card img {
  width: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.product-card .card-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.product-card p {
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.product-card a {
  align-self: flex-start;
}

/* Segment section (who we serve) */
.segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.segment {
  background-color: var(--light-color);
  border: 2px solid var(--accent-color);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.segment h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.segment p {
  font-size: 0.9rem;
  color: var(--dark-color);
}

/* Call to action section */
.cta {
  background-color: var(--primary-color);
  color: var(--light-color);
  text-align: center;
  padding: 3rem 1rem;
  border-radius: 8px;
  margin-bottom: 10px;
}

.cta h3 {
  margin-bottom: 1rem;
  color: var(--light-color);
}

.cta .btn {
  background-color: var(--accent-color);
  color: var(--dark-color);
}

.cta .btn:hover {
  background-color: var(--light-color);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--light-color);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

footer a {
  color: var(--accent-color);
}

/* Contact page */
.contact-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

.contact-info {
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.contact-form {
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background-color: var(--accent-color);
  color: var(--dark-color);
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-form button:hover {
  background-color: var(--primary-color);
  color: var(--light-color);
}

/* Page hero (internal pages) */
.page-hero {
  background-image: url('../assets/images/abstract-bg.png');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 100px 0 60px 0;
  margin-top: 60px; /* offset for fixed header */
  text-align: center;
  color: var(--light-color);
}

.page-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(94, 58, 25, 0.4);
  z-index: 1;
}

.page-hero h1 {
  position: relative;
  z-index: 2;
  font-size: 2.5rem;
}

.btn-whatsapp {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 9999;
    color: #fff;
    background-color: #4dc247;
    box-shadow: 0 0 6px rgba(0,0,0,.3);
    border-radius: 50%;
    padding: 10px;
}

.btn-whatsapp .icon-wrapper {
  width: 32px;    /* largura visível */
  height: 32px;   /* altura visível */
  overflow: hidden;
}

.icon-wrapper img {
    width: 125px;
    height: 30px;
    margin-left: 2px;
    margin-top: 0px;
}

.container .alert {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

.container .alert p {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0;
}

.container .alert .errors {
    color: red;
}

.container .alert .success {
    color: green;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-inner nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--secondary-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
    display: none;
  }
  .header-inner nav ul.show {
    display: flex;
  }
  .header-inner nav li {
    margin: 0;
    padding: 0.5rem 1rem;
    width: 100%;
  }
  .nav-toggle {
    display: flex;
  }
}

@media (min-width: 768px) {
    .btn-whatsapp {
        bottom: 15px;
    }
}