/**
 * Estilos para la plantilla single-contacto.php
 * Template individual del CPT Contacto
 *
 * @format
 */

.contacto-page {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #333;
}

/* ========== SECCIÓN HERO ========== */
.contacto-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 35, 126, 0.7);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ========== SECCIÓN PRINCIPAL ========== */
.contacto-main {
  padding: 80px 0;
  background: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.contacto-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contacto-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.contacto-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a237e;
  margin-bottom: 20px;
  line-height: 1.2;
  text-align: center;
  direction: rtl;
}

.contacto-description {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.7;
}

.contacto-image {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.team-image {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  z-index: 1;
}

.overlay-circle {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border-radius: 50%;
  opacity: 0.9;
}

/* ========== SECCIÓN SERVICIOS ========== */
.contacto-services {
  padding: 60px 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-item {
  text-align: center;
  padding: 40px 30px;
  background: #f8f9fa;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  background: white;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
}

.service-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a237e;
  margin-bottom: 15px;
}

.service-description {
  color: #666;
  line-height: 1.6;
}

/* ========== SECCIÓN CONTACTO ========== */
.contacto-contact {
  padding: 60px 0;
  background: #1a237e;
  color: white;
}

.contact-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: block;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: white;
  font-weight: 600;
  text-align: center;
  direction: rtl;
}
h3.titulo_empresa {
  text-align: center;
  font-size: 48px;
  margin-bottom: 37px
  
}
.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.contact-text {
  flex: 1;
}

.contact-text strong {
  display: block;
  font-size: 0.85rem;
  color: #64b5f6;
  margin-bottom: 5px;
  font-weight: 600;
  letter-spacing: 1px;
}

.whatsapp-link {
  color: #25d366;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.whatsapp-link:hover {
  color: #128c7e;
  text-decoration: underline;
}

.whatsapp-link::before {
  content: '💬';
  margin-right: 5px;
  font-size: 1.1em;
}

.contact-text a {
  color: white;
  text-decoration: none;
}

.contact-text a:hover {
  text-decoration: underline;
}

/* ========== INFORMACIÓN ADICIONAL DE LA EMPRESA ========== */
.company-details {
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border-left: 4px solid #007bff;
}

.detail-item {
  line-height: 1.6;
  font-size: 0.85rem;
}

.detail-item strong {
  color: #64b5f6;
  font-weight: 600;
}

/* ========== SECCIÓN MANTENGÁMONOS EN CONTACTO ========== */
.contacto-social {
  padding: 80px 0;
  background: #f8f9fa;
}

.social-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.social-left {
  padding-right: 20px;
}

.social-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a237e;
  margin-bottom: 20px;
  line-height: 1.2;
}

.social-description {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.7;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  color: #1a237e;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
  background: #f8f9ff;
}

.social-link svg {
  width: 24px;
  height: 24px;
  color: #007bff;
}

.social-link.facebook:hover {
  border-color: #1877f2;
  background: #f0f8ff;
}

.social-link.facebook svg {
  color: #1877f2;
}

.social-link.linkedin:hover {
  border-color: #0077b5;
  background: #f0f8ff;
}

.social-link.linkedin svg {
  color: #0077b5;
}

.social-right {
  padding-left: 20px;
}

.contact-form {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.contact-form h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a237e;
  margin-bottom: 25px;
  text-align: center;
}

.form {
  display: grid;
  gap: 20px;
}

.form-group {
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form .btn {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  width: 100%;
  max-width: 200px;
  margin-top: 10px;
}

.contact-form .btn:disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========== MENSAJES DEL FORMULARIO ========== */
#form-messages {
  margin-top: 20px;
  padding: 0;
  border-radius: 8px;
  font-weight: 500;
}

#form-messages.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 15px;
}

#form-messages.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 15px;
}

#form-messages p {
  margin: 0;
  font-size: 0.95rem;
}

/* ========== SECCIÓN MAPA ========== */
.contacto-map {
  padding: 0;
  background: #1a237e;
}

.map-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.map-header {
  background: #1a237e;
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-header h4 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: white;
  font-weight: 600;
}

.map-info {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.map-info p {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.map-container {
  height: 400px;
  background: #f5f5f5;
}

/* ========== ESTILOS RESPONSIVOS ========== */
@media (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .contacto-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .social-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .social-left,
  .social-right {
    padding: 0;
  }

  .contact-form {
    padding: 30px;
  }

  .map-wrapper {
    grid-template-columns: 1fr;
  }

  .map-container {
    height: 300px;
  }

  .map-header {
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .contacto-title {
    font-size: 2rem;
  }

  .social-title {
    font-size: 2rem;
  }

  .contacto-main {
    padding: 60px 0;
  }

  .contacto-services {
    padding: 40px 0;
  }

  .contacto-social {
    padding: 60px 0;
  }

  .service-item {
    padding: 30px 20px;
  }

  .contact-form {
    padding: 25px;
  }

  .social-links {
    gap: 12px;
  }

  .social-link {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .map-header {
    padding: 30px 20px;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .contacto-title {
    font-size: 1.5rem;
  }

  .social-title {
    font-size: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 20px;
  }

  .social-links {
    gap: 10px;
  }

  .social-link {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .container {
    padding: 0 0.5rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .contacto-title {
    font-size: 1.8rem;
  }

  .service-item {
    padding: 20px 15px;
  }

  .service-icon {
    width: 50px;
    height: 50px;
  }

  .service-title {
    font-size: 1.1rem;
  }

  .service-description {
    font-size: 0.85rem;
  }
}

/* Mejoras para dispositivos extra pequeños */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.4rem;
  }
  
  .contacto-title {
    font-size: 1.6rem;
  }
  
  .social-title {
    font-size: 1.6rem;
  }
  
  .hero-content {
    padding: 0 15px;
  }
  
  .service-contact-link {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* Mejoras para dispositivos muy pequeños */
@media (max-width: 320px) {
  .hero-title {
    font-size: 1.3rem;
  }
  
  .contacto-title {
    font-size: 1.5rem;
  }
  
  .social-title {
    font-size: 1.5rem;
  }
  
  .hero-content {
    padding: 0 10px;
  }
  
  .container {
    padding: 0 0.25rem;
  }
  
  .service-item {
    padding: 15px 10px;
  }
  
  .service-icon {
    width: 45px;
    height: 45px;
  }
  
  .service-title {
    font-size: 1rem;
  }
  
  .service-description {
    font-size: 0.8rem;
  }
}

/* Mejoras para tablets en orientación landscape */
@media (max-width: 1024px) and (orientation: landscape) {
  .hero {
    min-height: 50vh;
  }
  
  .contacto-hero {
    height: 50vh;
    min-height: 350px;
  }
}

/* Mejoras para tablets en orientación portrait */
@media (max-width: 834px) and (orientation: portrait) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .contacto-content {
    gap: 30px;
  }
}

/* ========== ESTILOS PARA ENLACE DE CONTACTO EN SERVICIOS ========== */
.service-contact-link {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.service-contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  color: white;
  text-decoration: none;
}

.service-contact-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.service-item:hover .service-contact-link {
  background: linear-gradient(135deg, #128C7E, #075E54);
}
