/* global.css - Shared styles for Header, Footer, and Modals */

:root {
  --primary-color: #000000;
  --secondary-color: #ffffff;
  --accent-color: #f2f2f2;
  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --border-color: #e5e5e5;
  --hover-bg: #f8f8f8;
  --font-family: "Inter", sans-serif;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  --border-radius-m: 8px;
  --border-radius-l: 12px;
}

/* Reset & Initial Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: #fafafa;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* --- Header --- */
.navbar {
  background-color: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo span {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.request-callback-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.request-callback-btn:hover {
  background-color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* --- Footer --- */
.site-footer {
  background-color: #333;
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-states h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #ccc;
}

.state-links {
  font-size: 13px;
  color: #999;
}

.state-links a {
  color: #fff;
  margin: 0 4px;
}

.state-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #444;
  font-size: 12px;
  color: #999;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  color: #999;
  transition: color 0.2s;
}

.social-links a:hover {
  color: #fff;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--secondary-color);
  width: 90%;
  max-width: 450px;
  border-radius: var(--border-radius-l);
  padding: 30px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  color: var(--text-secondary);
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--primary-color); }

.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 5px; }
.modal-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 25px; }

.callback-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; }
.form-group input, .form-group select {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-family);
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary-color); }

.modal-submit-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 10px;
}

.modal-submit-btn:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  transition: transform 0.3s ease;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
}
.floating-whatsapp:hover { transform: scale(1.1); }

/* WhatsApp Chat Widget */
.wa-chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  max-width: calc(100% - 40px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: bottom right;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wa-chat-widget.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.wa-chat-header { background: #0a5f54; padding: 16px; display: flex; justify-content: space-between; align-items: center; color: white; }
.wa-header-left { display: flex; align-items: center; gap: 12px; }
.wa-avatar { width: 40px; height: 40px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wa-header-info { display: flex; flex-direction: column; }
.wa-header-info h4 { margin: 0; font-size: 16px; font-weight: 600; }
.wa-header-info span { font-size: 13px; color: #e0e0e0; }
.wa-close-btn { background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 1; }
.wa-chat-body {
  background-color: #e5ddd5;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83v58.34h-58.34v-58.34l.83-.83h56.68zm-53.017 3.51v52.98h52.98v-52.98h-52.98zm26.509 23.364l1.657 1.657-1.657 1.657-1.657-1.657 1.657-1.657z' fill='%23d0c9c3' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
  padding: 20px;
  min-height: 200px;
}
.wa-chat-bubble { background: #fff; padding: 12px 16px; border-radius: 0 8px 8px 8px; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.1); width: 85%; }
.wa-chat-bubble::before { content: ""; position: absolute; top: 0; left: -8px; width: 0; height: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent #fff transparent transparent; }
.wa-bubble-name { color: #999; font-size: 13px; margin-bottom: 4px; font-weight: 500; }
.wa-bubble-msg { color: #111; font-size: 15px; line-height: 1.4; margin: 0; }
.wa-chat-footer { background: #fff; padding: 16px; border-top: 1px solid #f0f0f0; }
.wa-start-chat-btn { background: #25D366; color: white; width: 100%; padding: 12px; border-radius: 24px; font-weight: 600; text-align: center; display: block; text-decoration: none; border: none; }
.wa-branding { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; font-size: 10px; color: #999; }
.wa-branding span { font-weight: 700; color: #666; }

@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* --- Pagination Styles --- */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.pagination-wrapper nav {
  display: flex;
  gap: 8px;
}

.pagination-wrapper .pagination {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 8px;
}

.pagination-wrapper .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination-wrapper .page-item.active .page-link {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination-wrapper .page-item .page-link:hover:not(.active) {
  background: var(--hover-bg);
  border-color: #999;
}

.pagination-wrapper .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}
/* --- Pincode Verification Modal --- */
.pincode-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.pincode-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pincode-modal-card {
  background: white;
  width: 95%;
  max-width: 400px;
  padding: 50px 40px;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pincode-modal-overlay.active .pincode-modal-card {
  transform: scale(1);
}

#pincodeInput:focus {
  border-color: #000 !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

#pincodeSubmitBtn:hover {
  transform: translateY(-2px);
  background: #333 !important;
}

#pincodeSubmitBtn:active {
  transform: translateY(0);
}
