/* ========================================
   CSS VARIABLES & GLOBAL STYLES
   ======================================== */

:root {
  --primary-color: #faec70; /* Light yellow theme */
  --secondary-color: #ffd54f;
  --accent-color: #ffc107;
  --text-color: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--text-color);
  background-color: #fffef2;
  overflow-x: hidden;
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */

.navbar {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-logo-image {
  width: 200px;
}

.navbar-brand {
  font-weight: 700;
  color: var(--text-color);
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  margin: 0 10px;
  padding: 8px 16px !important;
  border-radius: 7px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background-color: #ffd700; /* Yellow background on hover */
  transform: translateY(-2px); /* Optional: slight lift effect */
}

.nav-link.active {
  background-color: #ffd700;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

/* ========================================
   HERO SECTION STYLES
   ======================================== */

.hero-section {
  height: 100vh;
  overflow: hidden;
}

#heroCarousel {
  height: 100%;
}

.carousel-item {
  height: 100vh;
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-caption {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  padding: 20px;
  position: absolute;
  bottom: 0px;
  top: 0px;
  left: 0px;
  right: 0px;
}

.carousel-control-prev,
.carousel-control-next {
  z-index: 3;
}

/* Page Heading Section */
.page-heading {
  position: relative;
  height: 300px;
  margin-top: 90px;
  background: url("../images/swamy\(3\).jpeg") no-repeat center center;
  background-size: cover;
}

.page-heading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.page-heading .page-heading-content {
  z-index: 1;
}

/* ========================================
   SECTION TITLES & COMMON ELEMENTS
   ======================================== */

.section-title {
  position: relative;
  margin-bottom: 40px;
  padding-bottom: 15px;
  text-align: center;
  font-weight: 700;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--accent-color);
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.about-button,
.cta-button {
  display: inline-block;
  background-color: #ffd700;
  color: black;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background-color: #ffc000;
}

/* ========================================
   CARD STYLES
   ======================================== */

/* About Cards */
.about-card {
  height: 280px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  border-radius: 15px;
  background-color: white;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Icon Box */
.icon-box {
  width: 80px;
  height: 80px;
  background-color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto 20px;
}

.icon-box i {
  font-size: 30px;
  color: #fff;
}

/* Cards with Background Images */
.card-with-bg {
  height: 300px;
  border: none;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-overlay {
  position: absolute;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  color: white;
  z-index: 2;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.card-text {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0;
}

.section-padding {
  padding: 80px 0;
}

.section-padding-garland {
  padding: 120px 0 80px 0;
}

/* Individual card backgrounds */
.card-1 {
  background-image: url("../images/wedding-image.avif");
}
.card-2 {
  background-image: url("../images/engagement.avif");
}
.card-3 {
  background-image: url("../images/seemantham.jpg");
}
.card-4 {
  background-image: url("../images/Upanayanam.jpg");
}
.card-5 {
  background-image: url("../images/fire-homam.jpg");
}
.card-6 {
  background-image: url("../images/meeting-conference.avif");
}

/* Card hover effects */
.card-with-bg:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card-with-bg:hover .card-overlay {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  transition: background 0.3s ease;
}

.card-content a:hover {
  text-decoration: underline;
}

/* Premium Cards */
.premium-card {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Mission/Vision Cards */
.mission-vision-card {
  background-color: var(--primary-color);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  transition: transform 0.3s;
  height: 100%;
}

.mission-vision-card:hover {
  transform: translateY(-10px);
}

/* Team Cards */
.team-card {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  transition: transform 0.3s;
}

.team-card:hover {
  transform: translateY(-10px);
}

.team-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-info {
  padding: 20px;
  text-align: center;
}

.team-social {
  margin-top: 15px;
}

.team-social a {
  display: inline-block;
  width: 35px;
  height: 35px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 35px;
  margin: 0 5px;
  transition: background-color 0.3s;
}

.team-social a:hover {
  background-color: var(--accent-color);
}

/* Testimonial Cards */
.testimonial-card {
  background-color: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 20px;
}

.testimonial-stars {
  color: var(--accent-color);
  margin-bottom: 15px;
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: 20px;
}

/* Award Cards */
.award-card {
  background-color: var(--primary-color);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
  transition: transform 0.3s;
}

.award-card:hover {
  transform: translateY(-10px);
}

.award-icon {
  font-size: 40px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

/* ========================================
   GALLERY STYLES
   ======================================== */

.gallery-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-card img {
  width: 100%;
  height: 300px;
  transition: transform 0.3s ease;
  border-radius: 15px;
}

.gallery-card:hover img {
  transform: scale(1.05);
  cursor: pointer;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
}
.gallery-card:hover {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

/* ========================================
   TIMELINE STYLES
   ======================================== */

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background-color: var(--accent-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  min-height: 150px;
}

.timeline-panel {
  position: relative;
  float: left;
  width: 46%;
  padding: 20px;
  border-radius: 15px;
  background-color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.border-radius-15 {
  border-radius: 15px;
}

.timeline-item:nth-child(even) .timeline-panel {
  float: right;
}

.timeline-item:nth-child(odd) .timeline-panel:after {
  content: "";
  position: absolute;
  top: 50%;
  right: -4px;
  width: 20px;
  height: 20px;
  transform: rotate(45deg) translateY(-50%);
  background-color: white;
}

.timeline-item:nth-child(even) .timeline-panel:after {
  content: "";
  position: absolute;
  top: 50%;
  left: -15px;
  width: 20px;
  height: 20px;
  transform: rotate(45deg) translateY(-50%);
  background-color: white;
}

.timeline-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  text-align: center;
  line-height: 50px;
  font-weight: bold;
  z-index: 1;
}

/* ========================================
   CONTACT SECTION STYLES
   ======================================== */

.contact-section {
  text-align: center;
  padding: 60px 20px;
  position: relative;
  min-height: 400px;
  z-index: 1;
}

.garland-decoration {
  background-image: url("../images/thoranam1.png");
  background-repeat: repeat-x;
  background-size: 200px auto;
  height: 65px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.contact-section h1 {
  font-size: 3rem;
  color: #333;
  margin-top: 40px;
  font-weight: 700;
}

.contact-section p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 30px;
  z-index: 1;
}

#contact {
  background-color: rgb(245, 245, 224);
  padding-top: 100px;
  padding-bottom: 60px;
}

.contact-form {
  padding: 40px;
  border-radius: 15px;
  background-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-form .form-control {
  border: 1px solid #ddd;
  padding: 12px;
  margin-bottom: 20px;
}
/* Form input styling with space for absolute error messages */
.contact-form .form-group {
  margin-bottom: 30px; /* Extra space for error messages */
}

/* Parsley validation styling - absolute positioning for error messages */
.contact-form .form-control.parsley-error {
  border-color: #dc3545 !important;
  border-width: 2px !important;
}

.contact-form .form-control.parsley-success {
  border-color: #28a745 !important;
  border-width: 2px !important;
}

.contact-form .parsley-errors-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  position: absolute !important;
  bottom: -22px !important; /* Position in the margin space */
  left: 0 !important;
  right: 0 !important;
  z-index: 10 !important;
  background: transparent !important;
}

.contact-form .parsley-errors-list li {
  font-size: 0.875em !important;
  color: #dc3545 !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  line-height: 1.2 !important;
  background: transparent !important;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  margin-right: 8px;
}

/* Success/Error message styling */
#form-messages {
  animation: slideIn 0.3s ease-in;
  margin-bottom: 20px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Map Container */
.map-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========================================
   UTILITY STYLES
   ======================================== */

.center-content {
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.left-banana {
  position: absolute;
  left: -100px;
  top: 45px;
}

.left-banana img {
  height: 400px;
}

.right-banana {
  position: absolute;
  right: -100px;
  top: 45px;
}

.right-banana img {
  height: 400px;
}

/* Square Image */
.square-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.25rem 0 0 0.25rem;
}

.card .row.align-items-center {
  height: 100%;
}

.facility-image {
  height: 204px;
  width: 100%;
  object-fit: cover;
  border-radius: 15px 0 0 15px;
}

.card .row.g-0 {
  height: 100%;
}

/* Responsive iframe wrapper */
.responsive-iframe-wrapper iframe {
  width: 100%;
  height: 350px;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

footer {
  background-color: #29166f;
  padding: 50px 0 20px;
  color: white;
  position: relative;
}

.footer-address i {
  /* color: var(--accent-color); */
  margin-right: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;

  color: #fff;
  border-radius: 50%;
  margin-right: 10px;
  text-decoration: none;
  transition: background-color 0.3s;
  font-size: 18px;
}

.social-links a:hover {
  background-color: var(--accent-color);
}

.copyright {
  border-top: 1px solid #ddd;
  padding-top: 20px;
  margin-top: 30px;
}

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Responsive on small screens */
@media (max-width: 992px) {
  .responsive-iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
  }

  .responsive-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
  }
}

@media (max-width: 768px) {
  .facility-image {
    border-radius: 15px 15px 0 0;
  }
  .garland-decoration {
    background-size: 200px auto;
    background-repeat: repeat-x;
    background-position: top center;
    height: 65px;
    width: 100%;
  }

  .card-container {
    flex-direction: column;
    align-items: center;
  }

  /* Mobile Timeline Fixes */
  .timeline:before {
    left: 30px;
    margin-left: 0;
  }

  .timeline-item {
    margin-bottom: 40px;
    min-height: auto;
  }

  .timeline-panel {
    float: none !important;
    width: calc(100% - 80px);
    margin-left: 60px;
    padding: 15px;
  }

  .timeline-item:nth-child(odd) .timeline-panel:after,
  .timeline-item:nth-child(even) .timeline-panel:after {
    content: "";
    position: absolute;
    top: 20px;
    left: -10px;
    right: auto;
    width: 15px;
    height: 15px;
    transform: rotate(45deg);
    background-color: white;
  }

  .timeline-badge {
    left: 30px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .facility-image {
    border-radius: 15px 15px 0 0;
  }
  .timeline:before {
    left: 25px;
  }

  .timeline-panel {
    width: calc(100% - 70px);
    margin-left: 50px;
    padding: 12px;
  }

  .timeline-panel h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .timeline-panel p {
    font-size: 14px;
    line-height: 1.4;
  }

  .timeline-badge {
    left: 25px;
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 11px;
  }

  .timeline-item:nth-child(odd) .timeline-panel:after,
  .timeline-item:nth-child(even) .timeline-panel:after {
    left: -8px;
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 991px) and (min-width: 769px) {
  .timeline:before {
    left: 50px;
  }

  .timeline-panel {
    width: calc(100% - 100px);
    float: right !important;
  }

  .timeline-badge {
    left: 50px;
  }

  .timeline-item:nth-child(odd) .timeline-panel:after,
  .timeline-item:nth-child(even) .timeline-panel:after {
    left: -10px;
    right: auto;
  }
}
