/* Global Styles */
:root {
  --primary-color: #38344b;
  --secondary-color: #272527;
  --accent-color: #856b65;
  --light-color: #f2e9e4;
  --dark-color: #22223b;
  --text-color: #333333;
  --background-color: #765454;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding-top: 60px; /* Adjusted for fixed nav height */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
}

/* Header */
header {
  background-color: var(--light-color);
  padding: 2rem 0;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

header h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tagline {
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-style: italic;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem;
  background-color: var(--primary-color);
  position: fixed;   /* Changed from sticky to fixed */
  top: 0;
  left: 0;           /* Added for full width */
  right: 0;          /* Added for full width */
  z-index: 1001;     /* Increased z-index slightly */
  box-shadow: var(--shadow);
}

.menu-button {
  background: none;
  border: none;
  color: white;
  padding: 0.8rem 1.2rem;
  margin: 0 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--border-radius);
}

.menu-button:hover {
  background-color: var(--accent-color);
  color: var(--dark-color);
}

.menu-button.active {
  background-color: var(--accent-color);
  color: var(--dark-color);
}

/* Hamburger Menu Icon (hidden by default) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.8rem;
  cursor: pointer;
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 1002; /* Must be higher than the nav z-index */
}

/* Content */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.page-content {
  display: none;
}

.page-content.active {
  display: block;
}

/* Hero Sections */
.hero, .hero-povesti, .hero-despre, .hero-servicii, .hero-cum-functioneaza, .hero-contact {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--light-color);
  margin-bottom: 3rem;
  border-radius: var(--border-radius);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(242, 233, 228, 0.8));
}

.hero h2, .hero-povesti h2, .hero-despre h2, .hero-servicii h2, .hero-cum-functioneaza h2, .hero-contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.hero p, .hero-povesti p, .hero-despre p, .hero-servicii p, .hero-cum-functioneaza p, .hero-contact p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--secondary-color);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
}

.cta-button:hover {
  background-color: var(--dark-color);
  color: white;
  transform: translateY(-2px);
}

/* Features Section */
.features {
  text-align: center;
  margin-bottom: 4rem;
}

.features h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* How It Works Section */
.how-it-works {
  text-align: center;
  margin-bottom: 4rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

/* Testimonials Section */
.testimonials {
  text-align: center;
  margin-bottom: 4rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--secondary-color);
}

/* Contact Section */
.contact {
  text-align: center;
  padding: 2rem;
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  margin-bottom: 4rem;
}

.contact-form {
  max-width: 600px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.submit-button:hover {
  background-color: var(--dark-color);
  transform: translateY(-2px);
}

/* Stories Page */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.story-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.story-image {
  height: 200px;
  background-color: var(--secondary-color);
  background-size: cover;
  background-position: center;
}

.story-card h3 {
  padding: 1.5rem 1.5rem 0.5rem;
  font-size: 1.3rem;
}

.story-excerpt {
  padding: 0 1.5rem 1rem;
  color: #666;
}

.story-link {
  display: block;
  padding: 0.5rem 1.5rem 1.5rem;
  color: var(--primary-color);
  font-weight: 600;
  transition: var(--transition);
}

.story-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.share-story {
  text-align: center;
  padding: 3rem;
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

/* About Us Page */
.despre-section {
  margin-bottom: 4rem;
}

.despre-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.despre-image {
  height: 400px;
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.team-member {
  text-align: center;
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.member-image {
  width: 150px;
  height: 150px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.member-role {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-card {
  text-align: center;
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.value-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Services Page */
.services-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.service-card-large {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card-large:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.service-features {
  list-style-position: inside;
  margin-left: 1rem;
}

.service-features li {
  margin-bottom: 0.5rem;
}

.pricing-cta {
  text-align: center;
  padding: 3rem;
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

/* How It Works Page (Detailed) */
.process-detailed {
  margin-bottom: 4rem;
}

.process-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.step-number-large {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: bold;
  margin-right: 2rem;
}

.step-content {
  flex-grow: 1;
}

.step-content ul {
  list-style-position: inside;
  margin-left: 1rem;
}

.step-content li {
  margin-bottom: 0.5rem;
}

.faq-section {
  margin-bottom: 4rem;
}

.faq-item {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.faq-item h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.process-cta {
  text-align: center;
  padding: 3rem;
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

/* Contact Page (Extended) */
.contact-details {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.contact-method:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-note {
  font-size: 0.9rem;
  color: #666;
}

.contact-form-container {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.map-container {
  margin-bottom: 3rem;
}
.map-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.map-placeholder {
  height: 400px;
  background-color: #f5f5f5;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.close-modal {
  color: #aaa;
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--dark-color);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 2rem;
  text-align: center;
}

.footer-links {
  margin-top: 1rem;
}

.footer-link {
  color: var(--light-color);
  margin: 0 1rem;
}

.footer-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Fade-in animation for content */
.page-content.active {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.story-image.position-top {
  background-position: center top;
}


/* =================================== */
/* ========== Responsive Design ========== */
/* =================================== */

@media (max-width: 992px) {
  .despre-container,
  .services-section,
  .contact-details {
    grid-template-columns: 1fr;
  }
}

/* Updated and Combined Mobile Styles */
@media (max-width: 768px) {
  body {
    padding-top: 60px; /* Adjust for header area (was 110px, which is too much) */
  }

  body.menu-open {
    overflow: hidden; /* Prevent scrolling when menu is open */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on small screens */
    -webkit-transform: translateZ(0); /* Fix for Safari rendering bugs */
    transform: translateZ(0); /* Fix for Safari rendering bugs */
  }

  /* Hides the default nav and prepares it for slide-in */
  nav {
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transform: translateX(100%); /* Hide menu off-screen to the right */
    transition: transform 0.3s ease-in-out;
    padding-top: 80px; /* Space for content inside the menu */
    box-shadow: none;
  }

  /* Slides the nav into view when active */
  nav.active {
    transform: translateX(0);
  }

  /* Styles for buttons inside the mobile menu */
  .menu-button {
    width: 80%;
    margin: 0.5rem 0;
    font-size: 1.2rem;
  }

  /* Adjust grids for single-column layout */
  .feature-grid,
  .steps,
  .testimonial-grid,
  .stories-grid,
  .team-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  /* Font size adjustments for smaller screens */
  .hero h2,
  .hero-povesti h2,
  .hero-despre h2,
  .hero-servicii h2,
  .hero-cum-functioneaza h2,
  .hero-contact h2 {
    font-size: 2rem;
  }

  .hero p,
  .hero-povesti p,
  .hero-despre p,
  .hero-servicii p,
  .hero-cum-functioneaza p,
  .hero-contact p {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .process-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .step-number-large {
    margin-right: 0;
    margin-bottom: 1.5rem;
  }
  
  .content {
    padding: 1rem;
  }

  /* Modal mobile responsiveness */
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 1rem;
  }

  .story-featured-image {
    width: 100%;
    height: auto;
  }
}