:root {
  --primary: #9b0707;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: var(--gray-700);
  background-color: var(--gray-50);
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  align-self: end;
}

.top-header {
  background-color: var(--gray-800);
  color: white;
  padding: 0.5rem 0;
}

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

.login-btn {
  background-color: #000000;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.login-btn:hover {
  background-color: rgba(83, 13, 13, 0.8);
}

.contact-info {
  display: flex;
  gap: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
}

.main-header {
  background-color: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo h1 {
  font-size: 1.5rem;
  font-weight: bold;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

nav {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  background: white;
  padding: 10px;
}

nav.active {
  display: block;
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--primary);
  flex-direction: column;
  padding: 1rem;
}

.nav-menu.active {
  display: flex;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    justify-content: flex-end;
  }
}

nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--primary);
  padding: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  display: block;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: block;
  align-items: center;
  justify-items: center;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: flex-end;
  }
}

.hero {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  color: white;
  background-color: var(--primary);
  opacity: 100%;
  background-image: url('/static/img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero h2 {
    font-size: 3.75rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 90vh;
    background-image: url('/static/img/heroM.jpg');
  }

  .hero h2 {
    font-size: 3.5rem;
  }
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 36rem;
}

.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-60%);
  animation: bounce 1.5s infinite;
}

.scroll-btn {
  font-size: 30px;
  text-decoration: none;
  color: rgb(0, 0, 0);
  background: rgba(255, 255, 255);
  padding: 2px 10px;
  border-radius: 50%;
  display: inline-block;
  transition: background 0.3s;
}

.scroll-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 1.875rem;
  font-weight: bold;
  text-align: center;
  color: var(--primary);
  margin-bottom: 4rem;
}

.bg-white {
  background-color: white;
}

.bg-gray {
  background-color: var(--gray-50);
}

.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
}

@media (max-width: 768px) {
  .about-content h3 {
    text-align: center;
  }
  
}

.about-image {
  text-align: center;
}

.about-image img {
  width: 80%;
  border-radius: 0.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.about-content h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.about-content p {
  text-align: justify;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.value-item {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.value-item h4 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.carousel {
  position: relative;
  max-width: 800px;
  margin: auto;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
}

.carousel img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 50%;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.contact-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-info-cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .contact-info-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contact-info-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-card {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-card i {
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.contact-main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

.map iframe {
  max-width: 100%;
  height: 450px;
  border: 0;
  border-radius: 0.8rem;
}

.contact-form {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-group label {
  color: var(--gray-700);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.3s;
  background-color: white;
  color: var(--gray-700);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(155, 7, 7, 0.2);
}

.form-group textarea {
  height: 8rem;
  resize: vertical;
}

footer {
  background-color: var(--primary);
  color: white;
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.scroll-to-top, .scroll-to-start {
  position: fixed;
  bottom: 20px;
  background-color: #9b0707;
  height: 60px;
  width: 60px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 25px;
  display: none;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.scroll-to-top {
  right: 30px;
}

@media (max-width: 768px) {
  .top-header .container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}