/* =========================================================
   Global Educonnects — Custom Stylesheet
   ========================================================= */

:root {
  --primary: #1a1a1a;
  --primary-dark: #000000;
  --secondary: #e2231a;
  --accent: #ff4136;
  --bg-light: #f8fafc;
  --dark-text: #16232e;
  --gray-text: #5a6b7b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.16);
  --transition: all 0.35s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--dark-text);
  background-color: var(--bg-light);
  overflow-x: hidden;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ===== Utility ===== */
.section-padding {
  padding: 90px 0;
}
.bg-light-section {
  background: #f5f5f5;
}

.section-tag {
  display: inline-block;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
  position: relative;
  padding-left: 30px;
}
.section-tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.section-title {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 18px;
}

.section-desc {
  color: var(--gray-text);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 18px;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #fff !important;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(255, 65, 54, 0.35);
  transition: var(--transition);
}
.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(255, 65, 54, 0.45);
  color: #fff;
}

.btn-outline-light-custom {
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 28px;
  border-radius: 50px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}
.btn-outline-light-custom:hover {
  background: #fff;
  color: var(--primary);
}

.btn-call-now {
  background: var(--primary);
  color: #fff !important;
  border-radius: 50px;
  padding: 9px 22px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(26, 26, 26, 0.3);
}
.btn-call-now:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ===== Navbar ===== */
#mainNav {
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(12px);
  transition: var(--transition);
  padding: 14px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}
#mainNav.scrolled {
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.logo-img {
  height: 52px;
  transition: var(--transition);
}
#mainNav.scrolled .logo-img {
  height: 42px;
}

.navbar-nav .nav-link {
  color: var(--dark-text);
  font-weight: 500;
  margin: 0 8px;
  position: relative;
}
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary);
}

/* ===== Hero ===== */
.hero-section {
  margin-top: 0;
  position: relative;
}
.carousel-item {
  height: 92vh;
  min-height: 560px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(26, 26, 26, 0.72) 45%,
    rgba(226, 35, 26, 0.55) 100%
  );
}

/* Persistent text overlay — sits above the carousel, never remounts, so slide
   changes cannot move or replay it. Only its text content is swapped by JS. */
.hero-content-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  pointer-events: none;
}
.hero-content-overlay .container {
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 720px;
  min-height: 320px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
.hero-content.hero-fading {
  opacity: 0;
}
.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}
.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.carousel-indicators .active {
  opacity: 1;
}
.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

/* ===== Counter Strip ===== */
.counter-strip {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 50px 0;
  color: #fff;
  margin-top: -1px;
}
.counter-strip i {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 10px;
  display: inline-block;
}
.counter-strip h3 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.counter-strip p {
  margin-bottom: 0;
  opacity: 0.9;
}

/* ===== About ===== */
.about-img-wrap {
  position: relative;
}
.about-badge {
  position: absolute;
  bottom: -25px;
  right: 15px;
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 230px;
}
.about-badge i {
  font-size: 1.8rem;
  color: var(--accent);
}
.about-badge span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.highlight-box {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  transition: var(--transition);
}
.highlight-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.highlight-box i {
  font-size: 1.6rem;
  color: var(--secondary);
}
.highlight-box p {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===== Service Cards ===== */
.service-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  height: 100%;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.service-img {
  height: 220px;
  overflow: hidden;
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-img img {
  transform: scale(1.1);
}
.service-body {
  padding: 26px;
}
.service-body h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}
.service-body p {
  color: var(--gray-text);
  font-size: 0.95rem;
  margin-bottom: 18px;
  min-height: 48px;
}

.btn-service {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-service:hover {
  background: var(--secondary);
  color: #fff;
}

/* ===== Why Choose Us ===== */
.why-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  height: 100%;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}
.why-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-bottom-color: var(--accent);
}
.why-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.why-icon i {
  font-size: 2rem;
  color: #fff;
}
.why-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 12px;
}
.why-card p {
  color: var(--gray-text);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ===== Gallery ===== */
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  height: 220px;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.12);
}
.gallery-item::after {
  content: "\F52A";
  font-family: "bootstrap-icons";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  background: rgba(26, 26, 26, 0.45);
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover::after {
  opacity: 1;
}

/* ===== Gallery Modal ===== */
.gallery-modal-content {
  background: transparent;
  border: none;
  position: relative;
}
.gallery-modal-close {
  position: absolute;
  top: -42px;
  right: 0;
  z-index: 2;
  opacity: 1;
}
.gallery-modal-content img {
  border-radius: var(--radius-md);
}

/* ===== CTA ===== */
.cta-section {
  position: relative;
  padding: 90px 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.92),
    rgba(226, 35, 26, 0.85)
  );
}
.cta-section h2 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 28px;
  opacity: 0.95;
}

/* ===== Contact ===== */
.contact-info-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  height: 100%;
}
.contact-info-card h3 {
  margin-bottom: 24px;
  font-size: 1.4rem;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 0.98rem;
}
.contact-list li i {
  font-size: 1.2rem;
  color: var(--accent);
  margin-top: 3px;
}
.contact-list li a {
  color: #fff;
}
.contact-list li a:hover {
  color: var(--accent);
}
.working-hours {
  background: rgba(255, 255, 255, 0.1);
  padding: 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.working-hours h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.working-hours p {
  margin: 0;
  opacity: 0.9;
}

.form-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dark-text);
}
.form-control,
.form-select {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.15);
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 400px;
}
.map-wrap iframe {
  display: block;
}

/* ===== Footer ===== */
.footer {
  background: #0d0d0d;
  color: #cccccc;
  padding: 22px 0;
  text-align: center;
}
.footer p {
  font-size: 0.9rem;
  margin: 0;
}

/* ===== Floating Buttons ===== */
.floating-buttons {
  position: fixed;
  bottom: 96px;
  right: 26px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border: none;
  animation: pulse 2.4s infinite;
}
.fab-call {
  background: var(--primary);
}
.fab-btn:hover {
  transform: scale(1.1);
  color: #fff;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 26, 26, 0.4);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(26, 26, 26, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 26, 26, 0);
  }
}

/* ===== Enquire Now Side Tab ===== */
.enquire-tab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1045;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px 12px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
.enquire-tab i {
  writing-mode: horizontal-tb;
}
.enquire-tab:hover {
  background: var(--primary);
  padding-right: 18px;
}

/* ===== Scroll To Top ===== */
#scrollTopBtn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 1050;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
#scrollTopBtn:hover {
  background: var(--secondary);
  transform: translateY(-4px);
}

/* ===== Modal ===== */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  overflow: hidden;
}
.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
}
.btn-close {
  filter: invert(1) brightness(1.5);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .navbar-collapse {
    background: #fff;
    margin-top: 14px;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content {
    min-height: 260px;
  }
  .carousel-item {
    height: 70vh;
    min-height: 480px;
  }
  .hero-content-overlay {
    padding-top: 90px;
  }
  .section-title {
    font-size: 1.9rem;
  }
  .cta-section {
    background-attachment: scroll;
  }
}

@media (max-width: 575px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .hero-content {
    min-height: 220px;
  }
  .carousel-item {
    height: 78vh;
    min-height: 460px;
  }
  .hero-content-overlay {
    padding-top: 80px;
  }
  .about-badge {
    position: static;
    margin-top: 16px;
    max-width: 100%;
  }
  .floating-buttons {
    right: 16px;
    bottom: 86px;
  }
  #scrollTopBtn {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
  .fab-btn {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  .contact-info-card {
    padding: 26px;
  }
  .enquire-tab {
    padding: 12px 8px;
    font-size: 0.85rem;
  }
}
