/* Custom Stylesheet for Agunsa ABX Static Site */

:root {
  --primary-color: #0f2240; /* Corporate Dark Blue */
  --primary-light: #1c3d70;
  --accent-color: #2563eb; /* Royal Blue */
  --accent-light: #eff6ff;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --white: #ffffff;
  --red-accent: #b91c1c;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.25;
}

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

a:hover {
  color: var(--primary-light);
}

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

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

/* Header & Navigation */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  height: 48px;
  width: auto;
}

.logo-subtext {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 2px solid var(--border-color);
  padding-left: 12px;
  display: inline-block;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 16px; /* Reduced gap to fit all items horizontally */
}

.nav-link {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 14px; /* Slightly smaller size for safety on smaller laptops */
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 4px;
  position: relative;
  display: inline-block;
  text-align: center;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-smooth);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent-color);
  font-weight: 600;
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1010;
}

.mobile-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 50vh;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 34, 64, 0.9) 0%, rgba(15, 34, 64, 0.4) 100%);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  text-align: left;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  max-width: 650px;
}

/* Sections Base Styling */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  margin-bottom: 16px;
}

/* Grid & Cards System */
.grid {
  display: grid;
  gap: 30px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Card Styling */
.card {
  background-color: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.card-description {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-btn {
  font-weight: 600;
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Two Column Section */
.two-column-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.two-column-text h4 {
  font-size: 14px;
  color: var(--accent-color);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.two-column-text h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.two-column-text p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 24px;
}

.two-column-img-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.two-column-img {
  width: 100%;
  object-fit: cover;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--primary-color);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Text Block Page Styling */
.text-block-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--text-muted);
}

.text-block-content h2 {
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.text-block-content p {
  margin-bottom: 24px;
}

/* Team Section */
.team-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.team-item {
  padding: 20px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.team-role {
  font-size: 14px;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
}

.team-name {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0;
}

.team-contact {
  font-size: 14px;
}

.services-list-wrapper {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 30px;
  border-radius: 12px;
}

.services-list-wrapper h3 {
  color: var(--white);
  margin-bottom: 20px;
}

.services-bullets {
  list-style: none;
}

.services-bullets li {
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
}

.services-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Map Block */
.map-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: stretch;
}

.map-info-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-info-pane h3 {
  margin-bottom: 20px;
  font-size: 28px;
}

.map-info-item {
  margin-bottom: 24px;
}

.map-info-item h4 {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.map-iframe-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 400px;
}

.map-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Contact Page Form */
.contact-form-wrapper {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr;
  gap: 50px;
}

.contact-form {
  background-color: var(--bg-light);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

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

.form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--white);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Denuncias Section */
.denuncias-intro-pane {
  background-color: var(--bg-light);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

/* Custom Select for Dropdowns */
.select-custom {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

/* File Upload Selector */
.file-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
}

.btn-file-upload {
  display: inline-flex;
  align-items: center;
  background-color: #121e30;
  color: var(--white);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-file-upload:hover {
  background-color: var(--accent-color);
}

.file-name-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* Phone input styling with country flag */
.tel-input-wrapper {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--white);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.tel-input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tel-flag-container {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f3f4f6;
  border-right: 1px solid var(--border-color);
  padding: 0 16px;
  user-select: none;
}

.flag-icon {
  font-size: 18px;
}

.flag-code {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.tel-control {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
}

/* Form Feedback Notification */
.form-feedback {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
}

.form-feedback.success {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid #2ecc71;
  color: #27ae60;
}

.form-feedback.error {
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid #e74c3c;
  color: #c0392b;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Leftover rules removed */

/* Footer styling */
.main-footer {
  background-color: var(--primary-color);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
  border-top: 5px solid var(--accent-color);
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-info h3 {
  color: var(--white);
  margin-bottom: 20px;
}

.footer-info p {
  margin-bottom: 12px;
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 20px;
}

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

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

.footer-links ul li a {
  color: rgba(255,255,255,0.7);
}

.footer-links ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 30px 0;
  background-color: rgba(0,0,0,0.15);
}

.footer-bottom-container {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .two-column-wrapper,
  .map-wrapper,
  .team-container,
  .contact-form-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Mobile menu active at 992px and below */
  .mobile-toggle {
    display: flex;
  }
  
  .main-nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }
  
  .main-nav.active {
    max-height: 450px;
  }
  
  .nav-list {
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: 10px 0;
    text-align: left; /* Align text left in mobile list view */
  }

  .nav-link::after {
    display: none; /* Hide active/hover underlines on mobile dropdown */
  }
  
  /* hamburger transformation */
  .mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 768px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  #btn-toggle-denuncia {
    width: 100%;
  }
}


/* Card Flip Effect */
.card-flip {
  background-color: transparent;
  perspective: 1000px;
  cursor: pointer;
  height: 440px; /* Uniform height for cards */
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
}

.card-flip.flipped .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-flip-front {
  background-color: var(--bg-card);
  color: var(--text-dark);
}

.card-flip-back {
  background-color: var(--primary-color);
  color: var(--white);
  transform: rotateY(180deg);
  padding: 30px;
  justify-content: center;
  align-items: center;
  text-align: left;
}

.card-flip-back h3 {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 8px;
  width: 100%;
}

.card-flip-back ul {
  list-style: none;
  width: 100%;
}

.card-flip-back ul li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.card-flip-back ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Image Zoom Modal Styling */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 34, 64, 0.95);
  backdrop-filter: blur(10px);
}

.image-modal-content {
  margin: auto;
  display: block;
  max-width: 85%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-modal.active .image-modal-content {
  transform: scale(1);
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 50px;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.image-modal-close:hover {
  color: var(--accent-color);
  transform: scale(1.1);
}

.image-modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ffffff;
  padding: 15px 0;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

/* Add pointer to zoomable images */
.card-img-wrapper {
  cursor: zoom-in;
}

