/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #1e3a8a;
  --text-gray: #6b7280;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  --green: #16a34a;
  --hover-blue: #1e40af;
  --border-gray: #e5e7eb;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

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

/* Navbar */
.navbar {
  background: var(--primary-blue);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo img {
  height: 80px;
  width: auto;
  transition: transform 0.3s ease;
}

.nav-logo img:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--primary-blue);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--hover-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--hover-blue);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

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

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--primary-blue);
  margin: 3px 0;
  transition: 0.3s;
}

/* Main Content */
.main-content {
  margin-top: 70px;
  min-height: 100vh;
}

.convenios-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.main-title {
  text-align: center;
  color: var(--primary-blue);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.description-text {
  max-width: 900px;
  margin: 0 auto 3rem;
  text-align: center;
}

.description-paragraph {
  color: var(--text-gray);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.highlight-text {
  color: var(--primary-blue);
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  margin: 2rem 0 3rem;
}

/* Convenios Grid */
.convenios-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.convenio-item {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.convenio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.convenio-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.convenio-item:hover img {
  transform: scale(1.05);
}

/* Reembolso Section */
.reembolso-section {
  margin: 4rem 0;
}

.section-title {
  text-align: center;
  color: var(--primary-blue);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

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

.reembolso-item {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reembolso-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.reembolso-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* WhatsApp CTA */
.whatsapp-cta {
  text-align: center;
  margin: 3rem 0;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--green);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.whatsapp-button:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.whatsapp-icon {
  width: 24px;
  height: 24px;
}

/* Contact Info */
.contact-info {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 30px;
  height: 30px;
  color: var(--white);
}

.contact-text {
  flex: 1;
  min-width: 250px;
}

.contact-text p {
  color: var(--text-gray);
  font-size: 1.1rem;
  line-height: 1.6;
}

.consultation-button {
  background: var(--primary-blue);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.consultation-button:hover {
  background: var(--hover-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Footer */
.footer {
  background: var(--primary-blue);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo img {
  height: 100px;
  width: auto;
}

.footer-description {
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item strong {
  display: block;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.privacy-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.privacy-link:hover {
  color: var(--white);
}

.copyright {
  color: #cbd5e1;
  font-size: 0.9rem;
}

/* Admin Panel Styles */
.admin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.admin-overlay.active {
  display: flex;
}

.admin-modal {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.admin-panel {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-gray);
  padding-bottom: 1rem;
}

.admin-title {
  color: var(--primary-blue);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.close-admin {
  background: #ef4444;
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-admin:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-group label {
  color: var(--primary-blue);
  font-weight: 600;
}

.form-group input {
  padding: 0.8rem;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.login-button {
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-button:hover {
  background: var(--hover-blue);
  transform: translateY(-2px);
}

.error-message {
  color: #ef4444;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.5rem;
}

.admin-section {
  margin-bottom: 3rem;
}

.admin-section-title {
  color: var(--primary-blue);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.add-image-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-image-btn:hover {
  background: #15803d;
  transform: translateY(-2px);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-image-item {
  position: relative;
  background: var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2/1;
}

.admin-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-image-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-image-item:hover .admin-image-controls {
  opacity: 1;
}

.admin-btn {
  background: var(--white);
  color: var(--primary-blue);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.admin-btn.delete {
  background: #ef4444;
  color: var(--white);
}

.admin-btn.delete:hover {
  background: #dc2626;
}

.file-input {
  display: none;
}

.category-selector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-option:hover {
  border-color: var(--primary-blue);
  background: var(--light-gray);
}

.category-option input[type="radio"] {
  margin: 0;
}

.category-option label {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-blue);
}

.upload-section {
  text-align: center;
  padding: 2rem;
  border: 2px dashed var(--border-gray);
  border-radius: 8px;
  margin: 1rem 0;
}

.upload-btn {
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-btn:hover {
  background: var(--hover-blue);
  transform: translateY(-2px);
}

.success-message {
  color: var(--green);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .convenios-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-left {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    gap: 1rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .main-title {
    font-size: 2.5rem;
  }

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

  .convenios-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .reembolso-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .description-paragraph {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .main-title {
    font-size: 2rem;
  }

  .convenios-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .convenio-item,
  .reembolso-item {
    padding: 0.8rem;
  }

  .whatsapp-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .contact-info {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .social-links {
    justify-content: center;
  }

  .admin-modal,
  .admin-panel {
    padding: 1.5rem;
    width: 95%;
  }

  .admin-title {
    font-size: 1.5rem;
  }

  .admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
  }

  .admin-section-title {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* Animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}