/* ==========================================
   1. IMPORTS & BASE RESETS
   ========================================== */
@import "https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap";

* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.5;
  color: rgba(12, 3, 27, 0.7);
  background: rgba(76, 201, 240, 0.1);
}

.container {
  width: 82%;
  margin: 0 auto;
}

img {
  display: block;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
}

section {
  margin-top: 6rem;
}

section > h2 {
  text-align: center;
}

section > p {
  text-align: center;
  width: 90%;
  margin: 0.6rem auto 2.5rem;
}

/* ==========================================
   2. BUTTONS & UI COMPONENTS
   ========================================== */
.btn {
  display: inline-block;
  width: -moz-fit-content;
  width: fit-content;
  padding: 0.75rem 1rem;
  border-radius: 3rem;
  background: #f72585;
  color: #fff;
  cursor: pointer;
  transition: all 400ms ease;
}

.btn:hover {
  background: #f84c9b;
  box-shadow: 0 1rem 1.6rem rgba(12, 3, 27, 0.15);
}

.btn-primary {
  display: inline-block;
  width: -moz-fit-content;
  width: fit-content;
  padding: 0.75rem 1rem;
  border-radius: 3rem;
  background: #480ca8;
  color: #fff;
  cursor: pointer;
  transition: all 400ms ease;
}

.btn-primary:hover {
  background: #580fce;
  box-shadow: 0 1rem 1.6rem rgba(12, 3, 27, 0.15);
}

/* ==========================================
   3. NAVIGATION
   ========================================== */
nav {
  width: 100%;
  height: 5rem;
  position: fixed;
  z-index: 10;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4cc9f0, #ffffff);
  color: #480ca8;
  box-shadow: 0 1rem 1rem rgba(12, 3, 27, 0.1);
}

nav h1,
nav h2,
nav h3,
nav h4,
nav h5 {
  color: #480ca8;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .container .logo {
  padding: 0.5rem;
  width: 10rem;
  transition: all 200ms ease;
}

nav .container .logo:hover {
  margin: -0.5rem;
}

nav .container .btn {
  color: #fff;
  font-weight: 600;
}

nav .container ul {
  display: flex;
  gap: 3rem;
  align-items: center;
}

nav .container ul li a {
  font-weight: 600;
}

nav .container button {
  display: none;
}

nav .container a {
  color: #480ca8;
  font-weight: 500;
  font-size: 0.9rem;
}

nav .container .nav__logo h2 {
  color: #480ca8;
}

/* Nav Media Queries */
@media screen and (max-width: 1024px) {
  nav .container button {
    display: inline-block;
    background: rgba(0, 0, 0, 0);
    color: #480ca8;
    font-size: 2rem;
  }

  nav .container button#close__nav-btn {
    display: none;
  }

  nav .container ul {
    position: fixed;
    right: 5%;
    top: 5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    display: none;
  }

  nav .container ul li {
    width: 100%;
    opacity: 0;
    animation: flipNavItem 400ms ease forwards;
  }

  nav .container ul li:nth-child(2) {
    animation-delay: 200ms;
  }

  nav .container ul li:nth-child(3) {
    animation-delay: 400ms;
  }

  nav .container ul li:nth-child(4) {
    animation-delay: 600ms;
  }

  nav .container ul li:nth-child(5) {
    animation-delay: 800ms;
  }

  nav .container ul li a {
    color: #fff;
    height: 100%;
    display: block;
    padding: 1.5rem 2rem;
    border-radius: 0;
    background: linear-gradient(#4cc9f0, #34c2ee);
  }

  nav .container ul li a.btn {
    background: #f72585;
  }
}

@keyframes flipNavItem {
  0% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
    opacity: 1;
  }
}

/* ==========================================
   4. HEADER
   ========================================== */
header {
  background: linear-gradient(135deg, #480ca8, #4cc9f0);
  color: #fff;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

header h1,
header h2,
header h3,
header h4,
header h5 {
  color: #fff;
}

header .container {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 45% 45%;
  gap: 10%;
  align-items: center;
  justify-content: space-between;
}

header .container .header__content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -3px;
  padding-top: 1rem;
  font-weight: 300;
}

header .container .header__content h1 span {
  font-weight: 600;
}

header .container .header__content p {
  margin: 1rem 0 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

/* Header Media Queries */
@media screen and (max-width: 1024px) {
  header {
    height: 70vh;
    padding-top: 3rem;
  }

  header .container {
    gap: 1rem;
  }

  header .container .header__content h1 {
    font-size: 2rem;
    letter-spacing: 0.5px;
  }

  header .container .header__content h2 {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 600px) {
  header {
    height: 100vh;
    padding-top: 3rem;
  }

  header .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ==========================================
   5. SERVICES SECTION
   ========================================== */
#services .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

#services .container article {
  background: linear-gradient(135deg, #480ca8, #4cc9f0);
  color: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: -moz-fit-content;
  height: fit-content;
  transition: all 1000ms ease;
  text-align: center;
}

#services .container article h1,
#services .container article h2,
#services .container article h3,
#services .container article h4,
#services .container article h5 {
  color: #fff;
}

#services .container article:hover {
  background: linear-gradient(135deg, #4cc9f0, #ffffff);
  color: #480ca8;
  margin-top: -0.5rem;
}

#services .container article:hover h1,
#services .container article:hover h2,
#services .container article:hover h3,
#services .container article:hover h4,
#services .container article:hover h5 {
  color: #480ca8;
}

#services .container article i {
  font-size: 2rem;
  text-align: center;
}

/* Services Media Queries */
@media screen and (max-width: 1024px) {
  #services .container {
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }

  #services .container article {
    padding: 1.2rem;
    gap: 0.8rem;
  }

  #services .container article:hover {
    margin: 0;
  }
}

@media screen and (max-width: 600px) {
  #services .container {
    grid-template-columns: 1fr;
  }

  #services .container article div h4 {
    margin-bottom: 0.8rem;
  }
}

/* ==========================================
   6. SPECIALISTS SECTION
   ========================================== */
#specialists .container {
  width: 70%;
  display: grid;
  grid-template-columns: repeat(3, 2fr);
  gap: 2rem;
}

#specialists article {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 1.5rem rgba(12, 3, 27, 0.1);
  position: relative;
  transition: all 700ms ease;
}

#specialists article:hover {
  box-shadow: none;
}

#specialists article:hover .specialist__image::before {
  left: 0;
  border-radius: 1rem;
}

#specialists article:hover .specialist__socials,
#specialists article:hover .specialist__whatsapp {
  opacity: 1;
  visibility: visible;
}

#specialists article .specialist__image {
  height: auto !important; /* Removes the fixed 25rem vertical stretch */
    max-height: 18rem;       /* Optional: caps max height if image is huge */
    width: 100%;
    position: relative;
    border-radius: 1rem;
  overflow: hidden;
  
}

#specialists article .specialist__image img {
  width: 100%;
  height: 100%;
  display: block;          /* Eliminates inline baseline whitespace */
  object-fit: cover;       /* Crops cleanly without stretching */
}

#specialists article .specialist__image::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: -100%;
  background: linear-gradient(
    135deg,
    rgba(84, 235, 114, 0.7),
    rgba(72, 12, 168, 0.7)
  );
  border-radius: 50%;
  transition: all 1s ease;
}

#specialists article .specialist__details {
  margin: 1rem 0;
  text-align: center;
}

#specialists article .specialist__socials {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#specialists article .specialist__socials a {
  background: #fff;
  color: #480ca8;
  padding: 0.4rem;
  display: flex;
  font-size: 0.8rem;
  border-radius: 50%;
  transition: all 400ms ease;
}

#specialists article .specialist__socials a:hover {
  background: #480ca8;
  color: #fff;
}

#specialists article .specialist__whatsapp {
  background: #54eb72;
  color: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 50%;
  padding: 1rem;
  border-radius: 50%;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: all 1s 400ms ease;
}

/* Specialists Media Queries */
@media screen and (max-width: 1024px) {
  #specialists .container {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 600px) {
  #specialists .container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   7. SWIPER / TESTIMONIALS
   ========================================== */
.swiper {
  width: 82%;
}

.swiper .swiper-wrapper {
  margin-bottom: 3rem;
}

.swiper .swiper-wrapper .swiper-slide {
  background: linear-gradient(135deg, #480ca8, #4cc9f0);
  color: #fff;
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  cursor: default;
  font-size: 0.9rem;
  text-align: center;
  height: -moz-max-content;
  height: max-content;
  height: 12rem;
  justify-content: center;
  align-items: center;
}

.swiper .swiper-wrapper .swiper-slide h1,
.swiper .swiper-wrapper .swiper-slide h2,
.swiper .swiper-wrapper .swiper-slide h3,
.swiper .swiper-wrapper .swiper-slide h4,
.swiper .swiper-wrapper .swiper-slide h5 {
  color: #fff;
}

.swiper .swiper-wrapper .swiper-slide p {
  margin-bottom: 1.5rem;
}

.swiper .swiper-wrapper .swiper-slide .petowner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.swiper .swiper-wrapper .swiper-slide .petowner .avatar {
  width: 2.5rem;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
}

.swiper .swiper-wrapper .swiper-slide .petowner patient__info {
  text-align: center;
}

.swiper .swiper-pagination-bullet {
  background: #480ca8;
}

/* Swiper Media Queries */
@media screen and (max-width: 600px) {
  .swiper .swiper-wrapper .swiper-slide {
    padding: 1.5rem;
  }
}

/* ==========================================
   8. APPOINTMENT SECTION
   ========================================== */
#appointment .container {
  background: linear-gradient(135deg, #4cc9f0, #ffffff);
  color: #480ca8;
  padding: 5rem 3rem 3rem 3rem;
  display: grid;
  grid-template-columns: 47% 47%;
  gap: 6%;
  border-radius: 2.5rem;
}

#appointment .container h1,
#appointment .container h2,
#appointment .container h3,
#appointment .container h4,
#appointment .container h5 {
  color: #480ca8;
}

#appointment .container .info p {
  margin: 0.5rem 0 2.5rem;
}

#appointment .container .info article {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

#appointment .container .info article small {
  margin-top: 0.5rem;
  display: block;
}

#appointment .container .info article .info__icon {
  background-color: #f72585;
  color: #fff;
  padding: 0.5rem 0.5rem;
  border-radius: 0.5rem;
  height: -moz-fit-content;
  height: fit-content;
  font-size: 1.2rem;
  justify-content: center;
  align-items: center;
  animation: all 100ms ease;
}

#appointment .container .info article .info__icon:hover {
  background-color: #480ca8;
}

#appointment .container .form__group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
}

#appointment .container .form__group label {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #480ca8;
  font-family: "Montserrat", sans-serif;
}

#appointment .container .form__group select {
  padding: 1rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
}

#appointment .container .form__group input {
  padding: 1rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  color: #480ca8;
  font-family: "Montserrat", sans-serif;
}

#appointment .container .form__group input:focus {
  outline: none;
  border-color: #4cc9f0;
}

#appointment .container button {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: #4cc9f0;
  color: #fff;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
}

#appointment .container button:hover {
  background-color: #f72585;
  transition: all 200ms ease;
}

/* Appointment Media Queries */
@media screen and (max-width: 600px) {
  #appointment .container {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
    width: auto;
    height: -moz-fit-content;
    height: fit-content;
  }

  #appointment .container .info article {
    gap: 0;
  }

  #appointment .container .info article small {
    display: flex;
  }

  #appointment .container .info h2,
  #appointment .container .info p {
    text-align: center;
    display: flex;
  }

  #appointment .container .form__group label {
    white-space: normal;
  }

  #appointment .container .form__group select,
  #appointment .container .form__group input {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==========================================
   9. FOOTER & CONTACT SECTION
   ========================================== */
footer {
  background: #0c031b;
  color: rgba(255, 255, 255, 0.7);
  padding-top: 6rem;
  margin-top: 6rem;
}

footer .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4rem;
  font-size: 0.85rem;
}

footer .container article {
  gap: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

footer .container article > h3 {
  color: #fff;
}

/* Logo */
footer .container article .logo img {
  width: 7rem;
  height: auto;
  transition: all 200ms ease;
}

footer .container article .logo img:hover {
  transform: translateX(0.5rem);
}

/* Links & Anchors Base Styling */
footer .container a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 300ms ease;
}

footer .container a:hover {
  color: #fff;
}

/* ------------------------------------------
   CONTACT SECTION FIX (Vertical Stack)
   ------------------------------------------ */
footer .container article .contact__links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

footer .container article .contact__links .contact__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

footer .container article .contact__links .contact__item i {
  font-size: 1.25rem;
  flex-shrink: 0; /* Prevents icons from shrinking */
}

/* WhatsApp Specific Highlight */
footer .container article .contact__links .contact__item.whatsapp__btn {
  color: #25d366;
  font-weight: 500;
}

footer .container article .contact__links .contact__item.whatsapp__btn:hover {
  color: #1ebd56;
}

/* ------------------------------------------
   SOCIAL ICONS (Horizontal Row)
   ------------------------------------------ */
footer .container article .footer__socials {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

footer .container article .footer__socials a:hover {
  color: #f72585;
}

/* Copyright */
footer .copyright {
  margin: 0 auto;
  text-align: center;
  padding: 1rem;
  margin-top: 3.5rem;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

footer .copyright a {
  color: #fff;
}

footer .copyright a:hover {
  color: #f72585;
}

/* ==========================================
   MEDIA QUERIES (TABLET & MOBILE)
   ========================================== */
@media screen and (max-width: 1024px) {
  footer .container {
    gap: 2.5rem;
  }
}

@media screen and (max-width: 600px) {
  footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  footer .container article {
    align-items: center; /* Centers elements in mobile column view */
  }

  footer .container article .logo img {
    margin: 0 auto;
  }

  footer .container article .contact__links {
    align-items: center;
  }

  footer .container article .contact__links .contact__item {
    justify-content: center;
  }

  footer .container .btn,
  footer .container .footer__socials {
    justify-content: center;
    margin: 0 auto;
  }
}

/* Base Reset & Box Sizing */
  #gallery * {
    box-sizing: border-box;
  }

  /* Gallery Container Grid Layout */
  #gallery .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Forces exactly 2 equal columns on laptops */
    gap: 2rem; /* Space between images */
    width: 82%;
    margin: 0 auto;
  }

  /* Ensure images resize smoothly */
  #gallery .gallery__image {
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
  }
  
  #gallery .gallery__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile Compatibility */
@media screen and (max-width: 600px) {
  #gallery .container {
    grid-template-columns: 1fr; /* Drops to 1 column on mobile phones */
    gap: 1rem;
  }
}

/* ==========================================
   CONTACT LINKS OVERLAP FIX
   ========================================== */

/* Force vertical line-by-line stacking */
.contact__links_list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.8rem !important;
  width: 100% !important;
  margin: 0.8rem 0 !important;
}

/* Individual link rows */
.contact__link_item {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  width: 100% !important;
  transition: transform 0.2s ease, color 0.3s ease !important;
}

.contact__link_item i {
  font-size: 1.25rem !important;
  flex-shrink: 0 !important; /* Prevents icon from shrinking or overlapping text */
}

.contact__link_item span {
  display: inline-block !important;
  word-break: break-all !important; /* Ensures long emails wrap properly on small mobile screens */
}

/* Hover States */
.contact__link_item:hover {
  color: #4cc9f0 !important;
  transform: translateX(4px);
}

/* WhatsApp Accent */
.contact__link_item.whatsapp__link {
  color: #25d366 !important;
  font-weight: 500 !important;
}

.contact__link_item.whatsapp__link:hover {
  color: #1ebd56 !important;
}

/* Center alignment for mobile screens */
@media screen and (max-width: 600px) {
  .contact__links_list {
    align-items: center !important;
  }
  
  .contact__link_item {
    justify-content: center !important;
  }
}