/* ==========================================================================
   AG FIN LAW - MAIN STYLESHEET
   Full Mobile Responsive Design (Zero Horizontal Scrollbar / Overflow Fix)
   ========================================================================== */

:root {
  --primary-navy: #0f172a;
  --primary-navy-light: #1e293b;
  --accent-amber: #f59e0b;
  --accent-amber-hover: #d97706;
  --accent-orange: #f97316;
  --accent-orange-hover: #ea580c;
  --accent-blue: #2563eb;
  --accent-blue-light: #eff6ff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Strict Global Overflow Fix --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Top Announcement Bar --- */
.top-announcement-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 0.85rem;
  color: #1e293b;
}

.top-announcement-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.top-announcement-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0; /* Prevents flex items from pushing width */
}

.badge-important {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.top-announcement-text {
  color: #334155;
  font-weight: 500;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-click-here {
  background: var(--accent-orange);
  color: #ffffff;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Header & Navbar Layout --- */
.site-header-dark {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.navbar-dark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-height: 76px;
  box-sizing: border-box;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  height: 52px;
  max-height: 52px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 5px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.brand-logo:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
  transform: translateY(-1px);
}

.logo-img-dark {
  height: 42px;
  max-height: 42px;
  max-width: 230px;
  width: auto;
  object-fit: contain;
  display: block;
}

.btn-consult-expert {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.25);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-consult-expert:hover {
  transform: translateY(-1px);
}

.nav-links-dark {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link-dark {
  font-weight: 600;
  color: var(--primary-navy);
  font-size: 0.88rem;
  padding: 8px 0;
  white-space: nowrap;
}

.nav-link-dark:hover {
  color: var(--accent-blue);
}

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-login-outline {
  background: transparent;
  border: 1px solid var(--primary-navy);
  color: var(--primary-navy);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-login-outline:hover {
  background: var(--primary-navy);
  color: #ffffff;
}

.mobile-toggle-dark {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--primary-navy);
  cursor: pointer;
  padding: 4px;
}

/* Dropdown Menu */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  list-style: none;
  z-index: 1100;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item a {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
}

.dropdown-item a:hover {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

/* --- Hero Section (2-Column Restored Layout) --- */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 50px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 100%;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-amber);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  word-break: break-word;
}

.hero-title span {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.stat-item h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-amber);
}

.stat-item p {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Lead Form Card */
.lead-form-card {
  background: #ffffff;
  color: var(--text-dark);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
}

.form-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 4px;
}

.form-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  outline: none;
}

/* Services Grid & Sections */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 10px;
}

.section-title p {
  font-size: 0.98rem;
  color: var(--text-muted);
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.service-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.service-features {
  list-style: none;
  margin-bottom: 20px;
}

.service-features li {
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 800;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.price-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.price-original {
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-orange);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-orange-hover);
}

.btn-secondary {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* Calculators Box */
.calc-box {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-color);
}

.calc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-body {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: none;
}

.faq-item.active .faq-body {
  display: block;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #080d1a 100%);
  color: #94a3b8;
  padding: 70px 0 30px;
  border-top: 3px solid var(--accent-amber);
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.footer-title {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 2px;
  background: var(--accent-amber);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-amber);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-bottom a {
  color: #fbbf24;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  position: relative;
  z-index: 100;
  transition: all 0.2s ease;
}

.footer-bottom a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  padding: 20px 16px;
  overflow-y: auto;
}

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

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* ==========================================================================
   STRICT MEDIA QUERIES FOR COMPREHENSIVE RESPONSIVENESS (NO HORIZONTAL OVERFLOW)
   ========================================================================== */

@media (max-width: 1200px) {
  .nav-links-dark {
    gap: 12px;
  }
  .nav-link-dark {
    font-size: 0.82rem;
  }
  .logo-img-dark {
    max-width: 180px;
  }
}

@media (max-width: 1024px) {
  .nav-links-dark {
    display: none;
  }
  .mobile-toggle-dark {
    display: block;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .calc-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }
  .top-announcement-text {
    display: none;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-subtitle {
    font-size: 0.92rem;
  }
  .hero-stats {
    gap: 16px;
  }
  .stat-item h3 {
    font-size: 1.2rem;
  }
  .btn-consult-expert {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  .btn-login-outline {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo-img-dark {
    max-width: 130px;
    height: 40px;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .lead-form-card {
    padding: 18px;
  }
  .calc-box {
    padding: 16px;
  }
}

/* Service Detail Page Responsive Overrides */
@media (max-width: 992px) {
  .service-detail-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Floating WhatsApp Button (Global All Devices) */
.floating-whatsapp {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.floating-whatsapp:hover {
  transform: scale(1.08);
}

.whatsapp-icon-bg {
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  position: relative;
  animation: whatsappPulse 2s infinite;
}

.whatsapp-tooltip {
  background: #ffffff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

@keyframes whatsappPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (max-width: 640px) {
  .floating-whatsapp {
    bottom: 18px;
    right: 18px;
  }
  .whatsapp-tooltip {
    display: none;
  }
  .whatsapp-icon-bg {
    width: 52px;
    height: 52px;
  }
}


