/* Base styles and small visual improvements */
:root{--brand:#0B77BF}
body{font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif}

/* Local Font Awesome fallback */
@font-face {
  font-family: "Font Awesome 6 Brands";
  src: url("../fonts/fa-brands-400.woff2") format("woff2"),
       url("../fonts/fa-brands-400.woff") format("woff"),
       url("../fonts/fa-brands-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.fab {
  font-family: "Font Awesome 6 Brands" !important;
}

.hero-section{background:linear-gradient(135deg,rgba(11,119,191,.95),rgba(21,129,201,.85));min-height: 52vh}
.icon-circle {
  width: 48px; /* Reduced from 56px for more compact look */
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem auto; /* Reduced bottom margin from 1rem */
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

/* Optimized icon circle for action cards */
.actions-cards-container .icon-circle {
  width: 48px !important;
  height: 48px !important;
  font-size: 1.1rem !important;
  margin: 0 auto 0.5rem auto !important;
}
.service-card{border:0;box-shadow:0 0.25rem 0.75rem rgba(0,0,0,.05)}
/* Modern Cookie Banner */
.cookiealert {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: -200px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1080;
  color: #2c3e50;
  font-size: 14px;
  line-height: 1.5;
}

.cookiealert.show {
  bottom: 20px;
  transform: translateY(0);
}

.cookiealert::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, #0b77bf, #1581c9);
  border-radius: 16px;
  z-index: -1;
  opacity: 0.1;
}

.cookiealert .container {
  padding: 0;
  max-width: none;
}

.cookiealert p {
  margin: 0 0 16px 0;
  color: #495057;
  font-weight: 400;
}

.cookiealert strong {
  color: #0b77bf;
  font-weight: 600;
  font-size: 15px;
}

.cookiealert a {
  color: #0b77bf;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.cookiealert a:hover {
  color: #1581c9;
  border-bottom-color: #1581c9;
  text-decoration: none;
}

.cookiealert .acceptcookies {
  background: linear-gradient(135deg, #0b77bf, #1581c9);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(11, 119, 191, 0.3);
  min-width: 120px;
  justify-content: center;
}

.cookiealert .acceptcookies:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 119, 191, 0.4);
  background: linear-gradient(135deg, #1581c9, #0b77bf);
}

.cookiealert .acceptcookies:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11, 119, 191, 0.3);
}

.cookiealert .fas {
  font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cookiealert {
    left: 16px;
    right: 16px;
    padding: 20px;
    font-size: 13px;
  }
  
  .cookiealert .container {
    flex-direction: column;
    text-align: center;
  }
  
  .cookiealert p {
    margin-bottom: 16px;
  }
  
  .cookiealert .acceptcookies {
    width: 100%;
    padding: 14px 24px;
  }
}

@media (min-width: 769px) {
  .cookiealert {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 520px;
  }
  
  .cookiealert.show {
    transform: translateX(-50%) translateY(0);
  }
}
.whatsapp-float{position:fixed!important;right:20px;bottom:20px;background:#25D366!important;color:#fff!important;width:56px;height:56px;border-radius:50%;display:flex!important;align-items:center;justify-content:center;font-size:28px;box-shadow:0 0.5rem 1.5rem rgba(37,211,102,.4);z-index:9999!important;text-decoration:none!important;border:3px solid #fff;transition:all .3s ease}
.whatsapp-float:hover{transform:scale(1.1);color:#fff!important;box-shadow:0 0.75rem 2rem rgba(37,211,102,.6)}
.whatsapp-float i{font-size:28px;line-height:1;color:#fff!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important}
.whatsapp-float svg{width:30px!important;height:30px!important;fill:#fff!important}
/* Fallback for WhatsApp icon if Font Awesome fails */
.whatsapp-float::before{content:"";display:none}
.whatsapp-float.fallback::before{
  content: "";
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.9 3.516'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.whatsapp-float.fallback i{display:none!important}
/* Dynamic positioning when cookie banner is visible */
.cookiealert.show ~ .whatsapp-float{bottom:120px}
.navbar .nav-link.active{color:var(--brand)!important;font-weight:600}
/* Hover effects */
.service-card, .card {transition: transform 0.3s ease, box-shadow 0.3s ease;}
.service-card:hover, .card:hover {transform: translateY(-5px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);}

/* Custom grid for 5 cards layout */
@media (min-width: 1200px) {
  .col-xl-2-4 {
    flex: 0 0 auto;
    width: 20%;
  }
}

/* Enhanced action cards container for perfect layout */
@media (min-width: 1200px) {
  .actions-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
  }
  
  .actions-cards-container > .col-xl-2-4 {
    display: flex;
    max-width: 220px; /* Slightly smaller for better proportion */
    margin: 0 0.4rem 1rem 0.4rem; /* Reduced margins */
  }
  
  .actions-cards-container .card {
    width: 100%;
    margin: 0;
  }
  
  .actions-cards-container .card-body {
    padding: 1.25rem 0.75rem; /* Reduced horizontal padding */
  }
  
  .actions-cards-container h4 {
    font-size: 1.1rem; /* Slightly smaller heading */
    line-height: 1.3;
  }
  
  .actions-cards-container p {
    font-size: 0.9rem; /* Smaller text for better proportion */
    line-height: 1.4;
  }
}

/* Responsive adjustments for tablets */
@media (min-width: 992px) and (max-width: 1199px) {
  .actions-cards-container {
    justify-content: center;
  }
  
  /* 3 cards per row on lg screens, then 2 centered on next row */
  .col-lg-4:nth-child(n+4) {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Medium screens: 2 per row, then 1 centered */
@media (min-width: 768px) and (max-width: 991px) {
  .actions-cards-container .col-md-6:nth-child(5) {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Ensure proper spacing on all screen sizes */
.actions-cards-container .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,.125);
}

.actions-cards-container .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,.15);
}

/* Alternative CSS Grid layout (more modern approach) */
@supports (display: grid) {
  @media (min-width: 1200px) {
    .actions-cards-container {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 1rem;
      justify-items: stretch;
      align-items: stretch;
    }
    
    .actions-cards-container > .col-xl-2-4 {
      display: contents; /* Remove Bootstrap column constraints */
    }
    
    .actions-cards-container .card {
      display: flex;
      flex-direction: column;
      height: 100%;
      margin: 0;
      max-width: none;
    }
    
    .actions-cards-container .card-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
  }
}

/* Ensure cards are centered when they don't fill the row */
.row.justify-content-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Partner logos ensure in grayscale on page style */
/* Focus states for accessibility */
.btn:focus, .form-control:focus, .nav-link:focus {box-shadow: 0 0 0 0.2rem rgba(11, 119, 191, 0.25);}
/* Skip link for accessibility */
.skip-link{position:absolute;top:-40px;left:6px;background:#000;color:#fff;padding:8px;text-decoration:none;z-index:9999}
.skip-link:focus{top:6px}

/* Enhanced form styles for elderly users accessibility */
.form-enhanced {
  font-size: 1.1rem;
  line-height: 1.6;
}

.form-enhanced .form-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1.5;
}

.form-enhanced .form-control {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border: 2px solid #ced4da;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: #fff;
}

.form-enhanced .form-control:focus {
  border-color: #0b77bf;
  box-shadow: 0 0 0 0.25rem rgba(11, 119, 191, 0.15);
  background-color: #fff;
}

.form-enhanced .form-check {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.form-enhanced .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  margin-left: -2rem;
  border: 2px solid #6c757d;
  background-color: #fff;
}

.form-enhanced .form-check-input:checked {
  background-color: #0b77bf;
  border-color: #0b77bf;
}

.form-enhanced .form-check-input:focus {
  border-color: #0b77bf;
  box-shadow: 0 0 0 0.25rem rgba(11, 119, 191, 0.15);
}

.form-enhanced .form-check-label {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #495057;
  padding-left: 0.5rem;
  cursor: pointer;
}

.form-enhanced .mb-3 {
  margin-bottom: 2rem !important;
}

.form-enhanced .btn {
  font-size: 1.2rem;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
}

.form-enhanced .card-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.form-enhanced .card-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.form-enhanced .card-body {
  padding: 2rem 1.5rem;
}

.form-enhanced textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Improved contrast for better readability */
.form-enhanced .form-check-input:checked[type=radio] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-enhanced .form-check-input:checked[type=checkbox] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* Alert styles for better visibility */
.form-enhanced .alert {
  font-size: 1.1rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border-width: 2px;
}

.form-enhanced .alert-success {
  background-color: #d1e7dd;
  border-color: #198754;
  color: #0a3622;
}

.form-enhanced .alert-danger {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #58151c;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .form-enhanced .card-body {
    padding: 1.5rem 1rem;
  }
  
  .form-enhanced .form-label {
    font-size: 1.1rem;
  }
  
  .form-enhanced .form-control {
    font-size: 1rem;
  }
  
  .form-enhanced .btn {
    font-size: 1.1rem;
    width: 100%;
  }
}

/* Success button styling for forms */
.form-enhanced .btn-outline-primary {
  border: 2px solid #0b77bf;
  color: #0b77bf;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: colorPulse 3s ease-in-out infinite;
}

.form-enhanced .btn-outline-primary:hover {
  background-color: #0b77bf;
  border-color: #0b77bf;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 119, 191, 0.3);
  animation: none; /* Para a animação no hover */
}

.form-enhanced .btn-outline-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(11, 119, 191, 0.25);
  animation: none; /* Para a animação no focus */
}

.form-enhanced .btn-outline-primary i {
  font-size: 1.1rem;
}

/* Animação de mudança de cor sutil */
@keyframes colorPulse {
  0% {
    border-color: #0b77bf;
    color: #0b77bf;
    box-shadow: 0 2px 8px rgba(11, 119, 191, 0.2);
  }
  33% {
    border-color: #1581c9;
    color: #1581c9;
    box-shadow: 0 2px 12px rgba(21, 129, 201, 0.3);
  }
  66% {
    border-color: #0d6efd;
    color: #0d6efd;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.25);
  }
  100% {
    border-color: #0b77bf;
    color: #0b77bf;
    box-shadow: 0 2px 8px rgba(11, 119, 191, 0.2);
  }
}
